OutOfMemoryError in the bean access in wl6.0sp2
we query a table ,the result is almost 3000 records,at the same time there are
5 clients to call the bean to execute the query.
but every time we catch the OutOfMemoryError at runtime so what can we do with
it and avoid the error,in depoly the bean or in programming the bean?
the memory of our PC is 528MB, is it not enough?
3kx a lot!
Rob Woollen <[email protected]> wrote:
tony wrote:
we query a table ,the result is almost 3000 records,at the same timethere are
5 clients to call the bean to execute the query.So you need to be able to store >= 15000 records in memory. How big
is a record?
but every time we catch the OutOfMemoryError at runtime so what canwe do with
it and avoid the error,in depoly the bean or in programming the bean?
the memory of our PC is 528MB, is it not enough?How large is the java heap size? (the -mx parameter to the java vm)the heap size is the default 64m, i will try more than it.
3ks
>
-- Rob
3kx a lot!
Similar Messages
-
Remote Delta link setup problem with Bean / Access Service
Hello,
I am trying to setup Remote Delta Link (RDL) between two portals. (Both portals same version - EP 7.0 EHP1 SP 05 - are in the same domain)
I already have the Remote Role Assignment working without any issues.
The following have been done successfully:
1. Same user repository has been setup for both the portals
2. Setup trust between producer and consumer (SSO working fine)
3. Producer added and registered succesfully on consumer
4. Permissions setup on producer and consumer
4. pcd_service user with required UME actions setup
I am able to see all the remote content in the Consumer portal.
When I try to copy the remote content and paste it as local content, I am getting the following error:
Could not create remote delta link to object 'page id'. Could not connect to the remote portal. The remote portal may be down, there may be a network problem, or your connection settings to the remote portal may be configured incorrectly.
After increasing the log severity, I am able to see the following in Default Trace:
com.sap.portal.fpn.transport.Trying to lookup access service (P4-RMI) for connecting to producer 'ess_int' with information: com.sap.portal.fpn.remote.AccessServiceInformation@31c92207[connectionURL=hostname.mycompany.com:50004, shouldUseSSL=false, RemoteName=AccessService]
com.sap.portal.fpn.transport.Unable to lookup access service (P4-RMI) with information: com.sap.portal.fpn.remote.AccessServiceInformation@31c92207[connectionURL=hostname.mycompany.com:50004, shouldUseSSL=false, RemoteName=AccessService]
AbstractAdvancedOperation.handleDirOperationException
[EXCEPTION]
com.sap.portal.pcm.admin.exceptions.DirOperationFailedException: Could not retrieve the bean / access service to connect with producer
Could not retrieve the bean / access service to connect with producer
Like you can see above, there is some bean / access service which is not retrieved successfully. I am not sure if this is a permission problem on the consumer.
I have checked that the P4 ports are configured correctly (standard - not changed) and I am able to telnet from producer to consumer (and vice versa) on the P4 port.
I am stuck at this point and am not able to find any information on this.
I would really appreciate if some one can point me in the right direction.
Thank you for reading.
- RajHi Raj,
Please check your config of the P4 port on the producer. Is it really 50004 (check SystemInfo of the producer)?
I do think there's a problem with the P4 communication since RDL requires P4 connection.
Do you have load balanced consumer-producer connection? Please refer to this blog for further details
Little known ways to create a load balanced Consumer Producer connection in a FPN scenario
Regards,
Dao -
Input caching using wl:cache taglib in WL6.0sp2
I have been using the output caching in WL6.0sp2, using the <wl:cache>
taglib, and have been very impressed by the performance improvements.
However, the documentation for input caching is very sparse, and no examples
are given at all. I am not at all sure how this feature is to be used. Does
anyone have any experience or examples of caching input (vars)?
Dima,
Thank you! You have explained it quite well.
I have one more question about the cache taglib: can you nest them? I am
imagining that, if the server cannot hit the first cache, then there might
be another level of caches further down that it could hit and still achieve
some performance boost.
"Dimitri I. Rakitine" <[email protected]> wrote in message
news:[email protected]...
> Actually, it is very simple. Instead of using wl:cache tag around parts
> of your JSP which produce output :
>
> <wl:cache>
> <%= new Date().toString() %>
> </wl:cache>
>
> you can place them around parts of your JSP which calculate JSP scripting
> variables - for example, some logic calculates "foo" (variable scope is
"request"
> and wl:cache caches calculated results in the "application" scope:
>
> <%@ taglib uri="/WEB-INF/taglib.tld" prefix="wl" %>
> <wl:cache timeout="10s" scope="application" vars="request.foo">
> <%
> // this happens inside the wl:cache tag, so calculated results
> // will be cached
> request.setAttribute("foo", new Date().toString());
> %>
> </wl:cache>
>
> <html><body>
> Cached foo variable:<%= request.getAttribute("foo") %>
> </body></html>
>
> Michael Greer <[email protected]> wrote:
> > I have been using the output caching in WL6.0sp2, using the <wl:cache>
> > taglib, and have been very impressed by the performance improvements.
> > However, the documentation for input caching is very sparse, and no
examples
> > are given at all. I am not at all sure how this feature is to be used.
Does
> > anyone have any experience or examples of caching input (vars)?
>
> --
> Dimitri
>
-
Accessing the bean in JSPDynPage of PAI event
Hi friends,
In the PAI event of JSPDynpage component iam accessing the bean thru the following stmt.
dynpagebean myNameContainer=(dynpagebean)myProfile.getValue("MyNameBean");
What string have to pass in the getValue() method?
Iam giving the input in the first page.and storing this value in bean.accessing the value stored in bean to display it in the second page.but its giving error while requesting the second page.can anybody please help me?
with regards
sireesha.Hi
dynpagebean myNameContainer=(dynpagebean)myProfile.getValue("MyNameBean");
Here the string to be passed in getValue method shoild be the id of the bean that you see in jsp:useBean tag.
you can set the attributes of the bean using its setter methods:
e.g.I have a setter method which sets the attribute Name in my bean with type as string.
myNameContainer.setName("ABC");
now I put the bean in profile as follows:
myProfile.putValue("myBean",myNameContainer);
Now you can access the bean in both the JSPs by using jsp:useBean tag.
Here you will have to remove
<property name="ComponentType" value="jspnative"/>
<property name="JSP" value="pagelet/<jspname>.jsp"/>
properties in component config in order to be able to access both the JSPs.
You can also use IPortalComponentContext instead of IPortalComponentProfile since the getValue and putValue methods of IPortalComponentProfile are depricated.
Regards,
Ajay -
To Create a EJB Client program to access the Bean deployed in the Sun app
Hi
I am new to the EJB.I need to write a Client ,to access the bean deployed in the Sun application Server 9.0. The Client Program will be running in a Different machine on the Network.
1)What all things i need to consider along with writing the client program?
2)Is there any link which provides the Sample client programs/Documents for the Sun Application Server.
Please help me
Regards
RajuProbably the simplest way is to replace the MessageServerThread with a synchronized method. The method should be in the MessageServer class.
-
Is there any way to avoid restoring the beans that are in the request scop?
Hi!
The problem is that I don't want to have my beans reloaded by the Restore View lifecycle's fase. I CAN'T put them into the session and if I don't do so, every time I click in a commandLink or commandButton for example, the first thing the JSF does is to reconstruct the bean used in the previous view before following to the next view.
Some properties of the beans are populated through data base access. The problem is that when I just want to go from a page to another I don't want to have this kind of bean reconstructed.
Any ideas? I'm I doing anything wrong?
Thank you all!In a valuechangelistener you can do this. I've tried it and it works well
PhaseId phaseId = event.getPhaseId();
//incorrect phase
if (phaseId.equals(PhaseId.ANY_PHASE))
event.setPhaseId(PhaseId.UPDATE_MODEL_VALUES);
event.queue();
// correct phase
else if (PhaseId.UPDATE_MODEL_VALUES.equals(event.getPhaseId()))
load backing bean here -
How to obtain PROVIDER_URL in the bean
I want to get access in my bean to the Context.PROVIDER_URL property which
was used by the client to create the initial context.
I know the ejbContext.getEnvironment() method is deprecated so I tried the
following:
javax.naming.InitialContext ctx = new InitialContext();
String sURL =
(String)ctx.lookup("java:comp/env/"+javax.naming.Context.PROVIDER_URL);
This gives me a null back. What am I doing wrong?
Or is there another way to get the provider url inside the bean code?
Ashish P. Narvekar
email: [email protected]Ashish,
FWIW, this is how we're doing it...
InputStream inp =
ClassLoader.getSystemResourceAsStream("weblogic.properties");
if(inp != null)
Properties env = new Properties();
env.load(inp);
String icf = env.getProperty("databroker.initialContextFactory");
env.put(Context.INITIAL_CONTEXT_FACTORY, icf);
String url = env.getProperty("databroker.providerUrl");
env.put(Context.PROVIDER_URL, url);
entCtx = new InitialContext(env);
We then use entCtx to lookup the home interface. This allows us to "soft code"
our icf and url values in the weblogic.properties file. To my knowledge, nothing
here is deprecated. If anyone knows differently, please let me know.
Guy :)
Jim Zhou wrote:
You probably need to do:
javax.naming.InitialContext ctx = new InitialContext("t3"//host:port");
new InitialContext() will only works when client and server are in the same
JVM.
Regards,
Jim Zhou.
Ashish P. Narvekar <[email protected]> wrote in message
news:[email protected]..
I want to get access in my bean to the Context.PROVIDER_URL property which
was used by the client to create the initial context.
I know the ejbContext.getEnvironment() method is deprecated so I tried the
following:
javax.naming.InitialContext ctx = new InitialContext();
String sURL =
(String)ctx.lookup("java:comp/env/"+javax.naming.Context.PROVIDER_URL);
This gives me a null back. What am I doing wrong?
Or is there another way to get the provider url inside the bean code?
Ashish P. Narvekar
email: [email protected] -
How to download a file/contents through a session bean to the bean client
Hi All,
I'm a newbie to enterprise beans and facing a problem. I have a requirement where an excel file saved on the server will be a accessed by a session bean and return it to the bean client (developed in swing). Client will display the file contents, user edits the contents and saves. Pressing the save button will save the excel on the server again using the same session bean.
As far as displaying the contents of excel on the form/panel is concerned I have developed this part and able to load files and save them on my local machine.
But my main requirement is to load it through Session Bean and then save it back on the server. An EJB 2.0 code snippet addressing this part would be a great help.
Thanks,and where's the problem?
I see 2 EJB calls, one to retrieve the data and another one to send it back to the server.
That's the simplest scenario, easy to implement using a stateless session bean (though if you want to prevent concurrent modification of the file there's a bit more work to do, like keeping a record of open files).
A more complex solution would have the client send only the changes to the file (for network performance reasons maybe) and have the EJB merge those in some way with the original document.
Complex, possibly error prone, probably not worth the effort.
First scenario should pose no problem if you're familiar with Java and have a passing familiarity with EJB. -
Unable get the bean in Controller of the item created through OAF Personalization
Hello Folks,
I have a requirement to create an Static Styled Text item through OAF Personalization and that item should be shown if it meets some particular condition.
So I tried to extend the controller of the page and tried to get the reference of the bean but I am not getting the bean in the controller class.
I have seen the main page and some external regions are there in the page.
Main Page has the controller attached in its page layout region and other regions don't have any CO attached.
Whenever I create the item it is under that particular region.
When I try to access some seeded item created under that region and I am able to get the bean in the controller but not the one created by me.
Here is the scenario:
Suppose Page Name is TestPG, it includes some external region like XyzPG, whenever I create the item it gets created under XyzRN with name XyzRN.item1 but whatever seeded items are there those are there with name item2,item3 etc. For item2, item3 I am able to get the bean but not not for XyzRN.item1 in the controller.
Could you please tell me how to get the bean for XyzRN.item1 in the main page controller.
Please reply soon. Its urgent.
Thanks,
Raja DuttaHi Shobit,
I have tried the workaround given by you at the 4th reply.
a) In your base page controller, try to get bean instance of child embeded region top ui element.
b) Now use this bean instance to find child region instance from your base page CO
But it didn't work for me :-( :'(
Here is the information about the page and region:
The page includes the region like this:
<page xmlns="http://xmlns.oracle.com/jrad" xmlns:oa="http://xmlns.oracle.com/oa" xmlns:ui="http://xmlns.oracle.com/uix/ui" xmlns:jrad="http://xmlns.oracle.com/jrad" version="10.1.3_1086" xml:lang="en-US" file-version="$Header: AccountInfoPG.xml 120.8.12010000.2 2009/06/01 12:05:24 vnetan ship $" xmlns:user="http://xmlns.oracle.com/jrad/user">
<oa:pageLayout id="PageLayoutRN" windowTitle="Account Information" amDefName="oracle.apps.ce.bankaccount.server.BankAccountAM" controllerClass="oracle.apps.ce.bankaccount.webui.AccountInfoCO" warnAboutChanges="true">
<oa:defaultSingleColumn id="AccountInfoRN" extends="/oracle/apps/ce/bankaccount/webui/AccountInfoRN"/>
I have check the /oracle/apps/ce/bankaccount/webui/AccountInfoRN through Functional Administration, it doesn't have any controller attached.
I have tried like this:
1. I have created one static styled text item through the main page personalization:
Static Styled Text: IBAN Message which has id XxIBANMessage
2. Another static styled text item through the region (included in the main page )personalization:
Static Styled Text: (AccountInfoRN.XxIBANMessage1) [ When viewed at page level ]
Static Styled Text: (XxIBANMessage1) [ When viewed at region level ]
Controller Code is:
try{
// Get bean of Static Styled Text item using findChildRecursive
OAStaticStyledTextBean ibanMessageBean2 = (OAStaticStyledTextBean)webBean.findChildRecursive("XxIBANMessage");
if(ibanMessageBean2!=null && !ibanMessageBean2.equals(""))
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:found 1",2);
ibanMessageBean2.setRendered(true);
else
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:not found at page level 1",2);
OAStaticStyledTextBean ibanMessageBean = (OAStaticStyledTextBean)webBean.findChildRecursive("AccountInfoRN.XxIBANMessage1");
if(ibanMessageBean!=null && !ibanMessageBean.equals(""))
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:found 2",2);
ibanMessageBean.setRendered(true);
else
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:Not found with alias 2",2);
OADefaultSingleColumnBean bean = (OADefaultSingleColumnBean)webBean.findChildRecursive("AccountInfoRN");
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:bean="+bean,2);
OAStaticStyledTextBean ibanMessageBean1 = (OAStaticStyledTextBean)bean.findChildRecursive("XxIBANMessage1");
if(ibanMessageBean1!=null && !ibanMessageBean1.equals(""))
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:found 3",2);
ibanMessageBean1.setRendered(true);
else
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:Not found through region 3",2);
/*===========with findIndexedChildRecursive ===========*/
OAStaticStyledTextBean ibanMessageBean3 = (OAStaticStyledTextBean)webBean.findIndexedChildRecursive("XxIBANMessage");
if(ibanMessageBean3!=null && !ibanMessageBean3.equals(""))
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:findIndexedChildRecursive:found 1",2);
ibanMessageBean3.setRendered(true);
else
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:findIndexedChildRecursive:not found at page level 1",2);
OAStaticStyledTextBean ibanMessageBean4 = (OAStaticStyledTextBean)webBean.findIndexedChildRecursive("AccountInfoRN.XxIBANMessage1");
if(ibanMessageBean4!=null && !ibanMessageBean4.equals(""))
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:findIndexedChildRecursive:found 2",2);
ibanMessageBean4.setRendered(true);
else
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:findIndexedChildRecursive:Not found with alias 2",2);
OADefaultSingleColumnBean bean1 = (OADefaultSingleColumnBean)webBean.findIndexedChildRecursive("AccountInfoRN");
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:bean1="+bean1,2);
OAStaticStyledTextBean ibanMessageBean5 = (OAStaticStyledTextBean)bean1.findIndexedChildRecursive("XxIBANMessage1");
if(ibanMessageBean5!=null && !ibanMessageBean5.equals(""))
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:findIndexedChildRecursive:found 3",2);
ibanMessageBean5.setRendered(true);
else
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:findIndexedChildRecursive:Not found through region 3",2);
catch(Exception e)
pageContext.writeDiagnostics(this,"XXAccountInfoCO:processRequest:catch:Erro:"+e.getMessage(),2);
O/p through diagnostics:
XXAccountInfoCO:processRequest:not found at page level 1
XXAccountInfoCO:processRequest:Not found with alias 2
XXAccountInfoCO:processRequest:bean=OADefaultSingleColumnBean, localName='header'
XXAccountInfoCO:processRequest:Not found through region 3
XXAccountInfoCO:processRequest:findIndexedChildRecursive:not found at page level 1
XXAccountInfoCO:processRequest:findIndexedChildRecursive:Not found with alias 2
XXAccountInfoCO:processRequest:bean1=OADefaultSingleColumnBean, localName='header'
XXAccountInfoCO:processRequest:findIndexedChildRecursive:Not found through region 3
Please advise. its urgent. meanwhile I will try the workaround given at 3rd reply.
Thanks
Raja Dutta -
NON-transactional session bean access entity bean
We are currently profiling our product using Borland OptmizeIt tool, and we
found some interesting issues. Due to our design, we have many session beans which
are non transactional, and these session beans will access entity beans to do
the reading operations, such as getWeight, getRate, since it's read only, there
is no need to do transaction commit stuff which really takes time, this could
be seen through the profile. I know weblogic support readonly entity bean, but
it seems that it only has benefit on ejbLoad call, my test program shows that
weblogic still creates local transaction even I specified it as transaction not
supported, and Transaction.commit() will always be called in postInvoke(), from
the profile, we got that for a single method call, such as getRate(), 80% time
spent on postInvoke(), any suggestion on this? BTW, most of our entity beans are
using Exclusive lock, that's the reason that we use non-transactional session
bean to avoid dead lock problem.
ThanksSlava,
Thanks for the link, actually I read it before, and following is what I extracted
it from the doc:
<weblogic-doc>
Do not set db-is-shared to "false" if you set the entity bean's concurrency
strategy to the "Database" option. If you do, WebLogic Server will ignore the
db-is-shared setting.
</weblogic-doc>
Thanks
"Slava Imeshev" <[email protected]> wrote:
Hi Jinsong,
You may want to read this to get more detailed explanation
on db-is-shared (cache-between-transactions for 7.0):
http://e-docs.bea.com/wls/docs61/ejb/EJB_environment.html#1127563
Let me know if you have any questions.
Regards,
Slava Imeshev
"Jinsong HU" <[email protected]> wrote in message
news:[email protected]...
Thanks.
But it's still not clear to me in db-is-shared setting, if I specifiedentity
lock as database lock, I assumed db-is-shared is useless, because foreach
new
transaction, entity bean will reload data anyway. Correct me if I amwrong.
Jinsong
"Slava Imeshev" <[email protected]> wrote:
Jinsong,
See my answers inline.
"Jinsong Hu" <[email protected]> wrote in message
news:[email protected]...
Hi Slava,
Thanks for your reply, actually, I agree with you, we need to
review
our db
schema and seperate business logic to avoid db lock. I can not say,guys,
we need
to change this and that, since it's a big application and developedsince
EJB1.0
spec, I think they are afraid to do such a big change.Total rewrite is the worst thing that can happen to an app. The
better aproach would be identifying the most critical piece and
make a surgery on it.
Following are questions in my mind:
(1) I think there should be many companies using weblogic serverto
develop
large enterprise applications, I am just wondering what's the maintransaction/lock
mechanism that is used? Transional session / database lock,
db-is-shared
entity
I can't say for the whole community, as for my experience the standard
usage patthern is session fasades calling Entity EJBs while having
Required TX attribute plus plain transacted JDBC calls for bulk
reads or inserts.
is the dominant one? It seems that if you speficy database lock,
the
db-is-shared
should be true, right?Basically it's not true. One will need db-is-shared only if thereare
changes
to the database done from outside of the app server.
(2) For RO bean, if I specify read-idle-timeout to 0, it shouldonly
load
once at the first use time, right?I assume read-timeout-seconds was meant. That's right, but if
an application constantly reads new RO data, RO beans will be
constantly dropped from cache and new ones will be loaded.
You may want to looks at server console to see if there's a lot
of passivation for RO beans.
(3) For clustering part, have anyone use it in real enterpriseapplication?
My concern, since database lock is the only way to choose, how aboutthe
affect
of ejbLoad to performance, since most transactions are short live,if high
volume
transactions are in processing, I am just scared to death about
the
ejbLoad overhead.
ejbLoad is a part of bean's lifecycle, how would you be scared ofit?
If ejbLoads take too much time, it could be a good idea to profile
used SQLs. Right index optimization can make huge difference.
Also you may want cosider using CMP beans to let weblogic
take care about load optimization.
(4) If using Optimization lock, all the ejbStore need to do
version
check
or timestamp check, right? How about this overhead?As for optimistic concurrency, it performs quite well as you can
use lighter isolation levels.
HTH,
Slava Imeshev
"Jinsong Hu" <[email protected]> wrote in message
news:[email protected]...
We are using Exclusive Lock for entity bean, because of we do
not
want
to
load
data in each new transaction. If we use Database lock, that means
we
dedicate
data access calls to database, if database deadlock happens,
it's
hard
to
detect,
while using Exclusive lock, we could detect this dead lock in
container
level.
The problem is, using Exclusive concurrency mode you serialize
access to data represented by the bean. This aproach has negative
effect on ablity of application to process concurrent requests.As
a
result the app may have performance problems under load.
Actually, at the beginnning, we did use database lock and usingtransactional
The fact that you had database deadlocking issues tells that
application logic / database schema may need some review.
Normally to avoid deadlocking it's good to group database
operations mixing in updattes and inserts into one place so
that db locking sequence is not spreaded in time. Moving to
forced serialized data access just hides design/implementation
problems.
session bean, but the database dead lock and frequent ejbLoad
really
kill
us,
so we decided to move to use Exclusive lock and to avoid dead
lock,
we
change
some session bean to non-transactional.Making session beans non-transactions makes container
creating short-living transactions for each call to entity bean
methods. It's a costly process and it puts additional load to
both container and database.
We could use ReadOnly lock for some entity beans, but since weblogicserver will
always create local transaction for entity bean, and we found
transaction
commit
is expensive, I am arguing why do we need create container leveltransaction for
read only bean.First, read-only beans still need to load data. Also, you may seeRO
beans
contanly loading data if db-is-shared set to true. Other reason
can
be
that
RO semantics is not applicable the data presented by RO bean (forinstance,
you have a reporting engine that constantly produces "RO" data,
while
application-consumer of that data retrieves only new data and neverasks
for "old" data). RO beans are good when there is a relatively stable
data
accessed repeatedly for read only access.
You may want to tell us more about your app, we may be of help.
Regards,
Slava Imeshev
I will post the performance data, let's see how costful
transaction.commit
is.
"Cameron Purdy" <[email protected]> wrote:
We are currently profiling our product using Borland
OptmizeIt
tool,
and we
found some interesting issues. Due to our design, we have
many
session
beans which
are non transactional, and these session beans will access
entity
beans
to
do
the reading operations, such as getWeight, getRate, since
it's
read
only,
there
is no need to do transaction commit stuff which really takes
time,
this
could
be seen through the profile. I know weblogic support readonly
entity
bean,
but
it seems that it only has benefit on ejbLoad call, my test
program
shows
that
weblogic still creates local transaction even I specified
it
as
transaction not
supported, and Transaction.commit() will always be called
in
postInvoke(),
from
the profile, we got that for a single method call, such as
getRate(),
80%
time
spent on postInvoke(), any suggestion on this? BTW, most of
our
entity
beans are
using Exclusive lock, that's the reason that we use
non-transactional
session
bean to avoid dead lock problem.I am worried that you have made some decisions based on an improper
understand of what WebLogic is doing.
First, you say "non transactional", but from your description
you
should
have those marked as tx REQUIRED to avoid multiple transactions
(since
non-transactional just means that the database operation becomesits
own
little transaction).
Second, you say you are using exclusive lock, which you shouldonly
use
if
you are absolutely sure that you need it, (and note that it
does
not
work in
a cluster).
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com/coherence.jsp
Tangosol Coherence: Clustered Replicated Cache for Weblogic
"Jinsong Hu" <[email protected]> wrote in message
news:[email protected]...
> -
How to map AM method return values in the bean
Hello -
I have this requirement to map AM method return values in the bean as explained below. Please suggest a solution.
Scenario: I am calling an AM method, which returns a String object on page load.
AMImpl Method-
public String getProfileName (){
return "Profile";
I wish to catch this retun value in the Bean Variable on page Load. I have created a methodAction biding on page and invokeAction to call this method on Page Load, but I don't know how to catch this value in the bean. Please suggest how to achieve this. Also, I need to achieve this in jsp page. I can't use TaskFlow for this.
I am using ADF 11g.
Regards -
Rohit
Edited by: Rohit Makkad on Apr 21, 2010 12:23 AMHi, I think there are two ways, from the data control drag n drop the methods return value to the page. This way a binding for that will be created at the page definition eg retVal.
and in the backing bean you can access it by calling resolveExpression("#{bindings.retVal.inputValue}")
You can also call your method directly from the backbean
((YourAppModuleImpl) getBindings().getDataControl().getApplicationModule()).yourMethod();
public DCBindingContainer getBindings() {
return (DCBindingContainer) resolveExpression("#{bindings}");
I dont know if the second method suits you
Tilemahos -
Make sure that your bean is implementing the serializable interface and that
you are accessing the bean from the session with the same name.
Bryan
"Sandeep Suri" <[email protected]> wrote in message
news:[email protected]..
Hi, I have quick question about use of USEBEAN tag in SP2. When I
specify a scope of SESSION for the java bean, it does not keep the
values that I set for variable in the bean persistent.Thanks,Sonny
Try our New Web Based Forum at http://softwareforum.sun.com
Includes Access to our Product Knowledge Base! -
Can I change the record an EJB points to from within the bean?
I have a problem which I hope someone can help with.
I'm programming an EJB application which references several 'price list' type tables. An order will contain several option selections, which reference options, which each have an associated price. A system administrator is going to have to change and update these prices as tim egoes on, and may want to remove options etc. In order to ensure that existing orders don't have their values changed as a result of this we've decided that, when options have their price changed, we actually create a new option record, setting an end_date on the old option record to signify that it's no longer valid for new orders being raised. In the option Beans set cost method, I set the end_date property of the bean and call the create method of the options own home interface.
My problem is this: At the moment I return the newly created option as a return value of the setCost method but I feel this is a little graceless. Ideally I'ld like to change the bean to point at the new record as part of the set method itself, that way, to the client it would appear as if tey were still looking at the same bean but with an updated price, which is what you'ld normally expect from a set method. Can this be done?Um, yeah - graceless is a good word. Essentially, you've stuck business logic into the EntityBean (I'm guess that's what you're using for data persistence). What you need to do is move the Option.create() method out of the EntityBean and use a StatelessSessionBean to execute the logic: update the old Option record, create the new one, then return the result.
As an aside, it's considered Not Very Good Practice to have client applications directly accessing EntityBeans: serializable DataObjects (e.g. JavaBeans, not EJB) or ValueObjects (non-"changeable" DOs) are better at passing data back and forth between client applications and application container. Ideally, this flow is like this:
client <- VO -> SSB <- DO -> EntB
This lets the EntityBean just worry about getting data in/out of storage, the (business) logic resides in the StatelessSessionBean and the client interacts/shows the data. -
How to get af:column in the bean using findComponent
Hi
I am getting null if I find the component using id in the bean. The component does exist in the JSP though. Can someone tell me how it can be done please? I am trying to set the header text in the bean.
<af:panelCollection id="pc1" inlineStyle="width:900px;">
<f:facet name="menus"/>
<f:facet name="toolbar"/>
<f:facet name="statusbar"/>
<af:table value="#{bindings.Invoice.collectionModel}"
var="row" rows="#{bindings.Invoice.rangeSize}"
emptyText="#{bindings.Invoice.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.Invoice.rangeSize}"
rowBandingInterval="0"
selectedRowKeys="#{bindings.Invoice.collectionModel.selectedRow}"
selectionListener="#{bindings.Invoice.collectionModel.makeCurrent}"
rowSelection="single" id="invoiceTable">
<af:column sortProperty="OrganizationName"
sortable="true"
headerText="#{bindings.Invoice.hints.OrganizationName.label}"
id="c16">in the bean
RichColumn crdWrtRfncolumn = (RichColumn)context.getViewRoot().findComponent("c26");
if(crdWrtRfncolumn != null){
log.info(">>>>> Column 2 " + ((RichColumn)context.getViewRoot().findComponent("c16")).getId());
crdWrtRfncolumn.setHeaderText(crdWrtRfndamountColumnLabel);
I refered
http://kr.forums.oracle.com/forums/thread.jspa?threadID=970889 and it is resolved. -
Cross Bean Access gives me NoClassDefFoundError error
Hi Everyone,
I am trying to access a CMP bean from a session bean and when I try to
access it, I get the "NoClassDefFoundError". I am attaching the code here
as a .zip file. please someone have a look at it and let me know where I
went wrong, I looked at all the examples provided by the Iplanet people in
the ias-samples/j2eeguide directory, I could not get a satisfied result till
now. I tried to set the classpath using the kregedit tool and modifying the
classpath under the java node. I even tried with extracting the other bean
class files and dumping them in the classes directory of the IPlanet. still
my bean is unable to look for the class.. I also tried by deploying my first
bean and then deploying this bean, but still no luck. same error. I
modified the ejb-jar.xml and the ias-ejb-jar .xml files and gave the bean
references and still then my luck doesn;t favour me.
I am pasting the error what I am getting when I try to deploy the bean
Customer which in turn accesses the UserMaster bean.
D:\final\Customer\assemble\jar>iasdeploy deployapp j2eeguide-customerEjb.jar
iasdeploy for iPlanet Application Server 6.0 SP3 Test Drive
Connected to LDAP server on shravan port 389
208.28.177.39:null
208.28.177.39:10 kas> deployment action ''J2EEInstallEar''
(d:/iplanet/ias6/ias/JAR/j2eeguide-customerEjb.jar) running.
208.28.177.39:j2eeappreg -nodeprecated
d:/iplanet/ias6/ias/JAR/j2eeguide-customerEjb.jar 2>&1
208.28.177.39:10 Connected to LDAP server on shravan port 389
208.28.177.39:10 ------ Register EJB Module ------
208.28.177.39:10 ------Register Enterprise Beans: ------
208.28.177.39:10 MyCustomer
208.28.177.39:10 java.lang.NoClassDefFoundError:
com/se/sales/customer/UserMaster
208.28.177.39:10 at java.lang.Class.getMethods0(Native Method)
208.28.177.39:10 at java.lang.Class.getMethods(Class.java:718)
208.28.177.39:10 at
com.netscape.server.deployment.EjbMetaUtil.addMethods(Unknown Source)
208.28.177.39:10 at
com.netscape.server.deployment.EjbJARGDSUtil.setupMethodFromClass(Unknown
Source)
208.28.177.39:10 at
com.netscape.server.deployment.EjbReg.registerEjbJar(Unknown Source)
208.28.177.39:10 at
com.netscape.server.deployment.J2eeAppReg.run(Unknown Source)
208.28.177.39:10 at
com.netscape.server.deployment.J2eeAppReg.main(Unknown Source)
208.28.177.39:10 j2eeappreg done.
208.28.177.39:20 kas> deployment action ''J2EEInstallEar''
(d:/iplanet/ias6/ias/JAR/j2eeguide-customerEjb.jar) complete.
208.28.177.39:
Finished deploying to 208.28.177.39 at [18/Sep/2001 11:50:54]
Thanks everyone in advance
Shravan
[Attachment UserMaster.zip, see below]
[Attachment Customer.zip, see below]Hi, I have exact the same problem. Have you got any answer for this problem yet? Please forward it to me if you have one. Many thanks.
Maybe you are looking for
-
Adobe Premiere Elements 11 Editor: how to get support when you purchase at Apple Store?
[Moving to Premiere Elements... JTS] I purchased Adobe Premiere Elements 11 Editor software at Apple Store in May/11/2013. I could use the product no more than 2 times because it started to have problems to open, since then I could not use anymore. I
-
Hello I am not able to published to the web using an FTP the test has a negative response I do not know what is required in Directory/path Protocol and port
-
Time series analysis in Numbers
Has anyone done any chart showing time series analysis in Numbers? I could not find a way to change the axis to reflect the right data series.
-
Hello, Is it possible to set the logging trace level(FATAL, ERROR, ...DEBUG) for the following jolt components : JRLY, JRAD, JSL, JSH ? If yes how ? If no how can we debbug this component ? or make the logs more talkative ? Thanks in advance for your
-
Iphone 5 using burning data and battery
I have an Iphone 5 which uses abnormal amounts of data. even with no programs running in the background it uses around 1 mb pr second. this is monitored in an app. the phone is hot and the battery goes from full to empty withing 5-6 hours. using the