Handling Transaction in Stateful Session Bean

I wrote a public method like public void doTransaction()
it will call 2 private method, like: methodA and methodB
Both private methods have db accesss statement and will update the db. They got different db connection and will close the connection when method call finished.
How to include them to one transaction? I want to be able to rollback the job of the first method when I catch exception thrown by the second method.
I tried simply define transaction type of the public method to be Container and Required. But it doesn't work, the first method doesn't rollback. Of course I can let the 2 private methods share a same connection and commit after finishing calling them. But how if they are in different DB?

Ok... Here it goes...
You can do it in the following manner.
As you said you have got 2 private methods doing d/b updates and these are called from a public method.
Stateful session beans since associated with a client across methods, you can take advantage of it. Write your own user defined transaction.
Begin the transaction scope in your public before calling the 1st private method. Call the 2 methods in a try block. Once you are done with these methods, you can commit and end the transaction. If you get any exception, rollback the transaction in the catch block. Otherwise if u get any exception in the 2nd method, you can rollback the transaction there itself.
Stateful session beans lets u allow to spawn the bean managed transaction across methods. you can begin your transaction in one method and end it in a differnt method or you can end the transaction after calling the methods.
The problem you are dealing with can typically very well handled by writing bean managed transaction.
Hope this helps. If you need anymore clarity on my solution, please let me know.
-amit

Similar Messages

  • Rolling back the transaction from stateful session bean

    Hi,
    How can I mark the transaction to be rolled back in a stateful session bean implementation?.
    Should I call setRollbackOnly method or throw a RemoteException or throw an EJBException, etc.?
    the configuration is :
    OC4J 9.0.4
    Stateful session bean
    Related method has transaction attribute - "Required"
    thanks & regards.
    ps : I couldn't find a related topic even if this has been discussed before (too many topics). if so, excuses.
    Erdem.

    Tried using Bean managed transactions but with the same result. Given below is the sample code.
    UserTransaction uts = null;
    try {
    uts = (UserTransaction)(ctx.getUserTransaction());
    uts.begin();
    Connection con = null;
    con = getCountConnection();
    PreparedStatement ps = con.prepareStatement(sqlselectUserId);
    ps.executeUpdate();
    PreparedStatement ps1 = con.prepareStatement(sqlselectUserDetails);
    ps1.executeUpdate();
    uts.commit();
    catch(SQLException e) {
         uts.rollback();

  • Transaction using stateful session bean.

    All,
    I was implementing "Transaction" part using statefull session(trying to understand how transaction work).
    I created a Statefull session bean, here in one method create 2 sql queries
    query1:update Employees set LastName='newname' where EmployeeID = 9
    query2:update Customers set CompanyName = 'newname Inc.' ContactName = 'Maria Anders'
    "query1" works fine, but "query2" is not correct(syntax error) hence will not be executed. This will throw a SQLException.
    According to EJBspec, rollback will happen if there is a system exception. And I guess SQLException is systemexception.
    But when I query "Employees" table, I get the data updated through the "query1".
    What I was excepting was the first query which was executed should have rolled back because the second query has thrown a SQLException.
    I tried using ContainerManaged transaction and BeanManaged transaction.
    But in both cases transaction is not getting rolled back.
    I have tried with REQUIRED and REQUIRESNEW attributes for container managed transactions with Isolation level as Read Commited.
    Is my understanding correct?
    TIA,
    Vijay

    Tried using Bean managed transactions but with the same result. Given below is the sample code.
    UserTransaction uts = null;
    try {
    uts = (UserTransaction)(ctx.getUserTransaction());
    uts.begin();
    Connection con = null;
    con = getCountConnection();
    PreparedStatement ps = con.prepareStatement(sqlselectUserId);
    ps.executeUpdate();
    PreparedStatement ps1 = con.prepareStatement(sqlselectUserDetails);
    ps1.executeUpdate();
    uts.commit();
    catch(SQLException e) {
         uts.rollback();

  • Accessing the same stateful session bean from multiple clients in a clustered environment

    I am trying to access the same stateful session bean from multiple
              clients. I also want this bean to have failover support so we want to
              deploy it in a cluster. The following description is how we have tried
              to solve this problem, but it does not seem to be working. Any
              insight would be greatly appreciated!
              I have set up a cluster of three servers. I deployed a stateful
              session bean with in memory replication across the cluster. A client
              obtains a reference to an instance of one of these beans to handle a
              request. Subsequent requests will have to use the same bean and could
              come from various clients. So after using the bean the first client
              stores the handle to the bean (actually the replica aware stub) to be
              used by other clients to be able to obtain the bean. When another
              client retrieves the handle gets the replica aware stub and makes a
              call to the bean the request seems to unpredictably go to any of the
              three servers rather than the primary server hosting that bean. If the
              call goes to the primary server everything seems to work fine the
              session data is available and it gets backed up on the secondary
              server. If it happens to go to the secondary server a bean that has
              the correct session data services the request but gives the error
              <Failed to update the secondary copy of a stateful session bean from
              home:ejb20-statefulSession-TraderHome>. Then any subsequent requests
              to the primary server will not reflect changes made on the secondary
              and vice versa. If the request happens to go to the third server that
              is not hosting an instance of that bean then the client receives an
              error that the bean was not available. From my understanding I thought
              the replica aware stub would know which server is the primary host for
              that bean and send the request there.
              Thanks in advance,
              Justin
              

              If 'allow-concurrent-call' does exactly what you need, then you don't have a problem,
              do you?
              Except of course if you switch ejb containers. Oh well.
              Mike
              "FBenvadi" <[email protected]> wrote:
              >I've got the same problem.
              >I understand from you that concurrent access to a stateful session bean
              >is
              >not allowed but there is a
              >token is weblogic-ejb-jar.xml that is called 'allow-concurrent-call'
              >that
              >does exactly what I need.
              >What you mean 'you'll get a surprise when you go to production' ?
              >I need to understand becouse I can still change the design.
              >Thanks Francesco
              >[email protected]
              >
              >"Mike Reiche" <[email protected]> wrote in message
              >news:[email protected]...
              >>
              >> Get the fix immediately from BEA and test it. It would be a shame to
              >wait
              >until
              >> December only to get a fix - that doesn't work.
              >>
              >> As for stateful session bean use - just remember that concurrent access
              >to
              >a stateful
              >> session bean is not allowed. Things will work fine until you go to
              >production
              >> and encounter some real load - then you will get a surprise.
              >>
              >> Mike
              >>
              >> [email protected] (Justin Meyer) wrote:
              >> >I just heard back from WebLogic Tech Support and they have confirmed
              >> >that this is a bug. Here is their reply:
              >> >
              >> >There is some problem in failover of stateful session beans when its
              >> >run from a java client.However, it is fixed now.
              >> >
              >> >The fix will be in SP2 which will be out by december.
              >> >
              >> >
              >> >Mike,
              >> >Thanks for your reply. I do infact believe we are correctly using
              >a
              >> >stateful session bean however it may have been misleading from my
              >> >description of the problem. We are not accessing the bean
              >> >concurrently from 2 different clients. The second client will only
              >> >come into play if the first client fails. In this case we want to
              >be
              >> >able to reacquire the handle to our stateful session bean and call
              >it
              >> >from the secondary client.
              >> >
              >> >
              >> >Justin
              >> >
              >> >"Mike Reiche" <[email protected]> wrote in message
              >news:<[email protected]>...
              >> >> You should be using an entity bean, not a stateful session bean
              >for
              >> >this application.
              >> >>
              >> >> A stateful session bean is intended to be keep state (stateful)
              >for
              >> >the duration
              >> >> of a client's session (session).
              >> >>
              >> >> It is not meant to be shared by different clients - in fact, if
              >you
              >> >attempt to
              >> >> access the same stateful session bean concurrently - it will throw
              >> >an exception.
              >> >>
              >> >> We did your little trick (storing/retrieving handle) with a stateful
              >> >session bean
              >> >> on WLS 5.1 - and it did work properly - not as you describe. Our
              >sfsb's
              >> >were not
              >> >> replicated as yours are.
              >> >>
              >> >> Mike
              >> >>
              >> >> [email protected] (Justin Meyer) wrote:
              >> >> >I am trying to access the same stateful session bean from multiple
              >> >> >clients. I also want this bean to have failover support so we want
              >> >to
              >> >> >deploy it in a cluster. The following description is how we have
              >tried
              >> >> >to solve this problem, but it does not seem to be working. Any
              >> >> >insight would be greatly appreciated!
              >> >> >
              >> >> >I have set up a cluster of three servers. I deployed a stateful
              >> >> >session bean with in memory replication across the cluster. A client
              >> >> >obtains a reference to an instance of one of these beans to handle
              >> >a
              >> >> >request. Subsequent requests will have to use the same bean and
              >could
              >> >> >come from various clients. So after using the bean the first client
              >> >> >stores the handle to the bean (actually the replica aware stub)
              >to
              >> >be
              >> >> >used by other clients to be able to obtain the bean. When another
              >> >> >client retrieves the handle gets the replica aware stub and makes
              >> >a
              >> >> >call to the bean the request seems to unpredictably go to any of
              >the
              >> >> >three servers rather than the primary server hosting that bean.
              >If
              >> >the
              >> >> >call goes to the primary server everything seems to work fine the
              >> >> >session data is available and it gets backed up on the secondary
              >> >> >server. If it happens to go to the secondary server a bean that
              >has
              >> >> >the correct session data services the request but gives the error
              >> >> ><Failed to update the secondary copy of a stateful session bean
              >from
              >> >> >home:ejb20-statefulSession-TraderHome>. Then any subsequent requests
              >> >> >to the primary server will not reflect changes made on the secondary
              >> >> >and vice versa. If the request happens to go to the third server
              >that
              >> >> >is not hosting an instance of that bean then the client receives
              >an
              >> >> >error that the bean was not available. From my understanding I
              >thought
              >> >> >the replica aware stub would know which server is the primary host
              >> >for
              >> >> >that bean and send the request there.
              >> >> >
              >> >> >Thanks in advance,
              >> >> >Justin
              >>
              >
              >
              

  • Transaction inside a stateful session bean

    I've a stateful session bean that represents a shopping cart.
    It has the following checkout method():
    <pre>
    /* em.getTransaction().begin(); */
    reasons.clear();
    for(CartEntry ce : entries){
    // get the book reference for the cart entry
    Book relbook = books.findById(ce.getBook().getId());
    if( ce.getQuantity()> relbook.getQuantity() ){
    reasons.add("Item not availabel in this quantity");
    // TODO: need to rollback
    /*em.getTransaction().rollback();*/
    throw new Exception();
    } else{
    // update book quantities
    relbook.setQuantity( relbook.getQuantity() - ce.getQuantity() );
    /*em.getTransaction().commit();*/
    // end of conversational state
    cancel();
    </pre>
    This method checks for the quantity of the items with respect to the quantity in the cart entries.
    How can I perform a transaction here?
    I'd like to rollback it before throwing the exception. And I'd like to commit it at the end,.
    If I use the entity manager to get the transaction, I get this error:
    Exception Description: Cannot use an EntityTransaction while using JTA.

    Its sad to see someone using EJB technology and then completely throw all benefits of it out of the window. I highly advise you to look into Container Managed Transactions; learn what they help you to do and then apply it. When you know how, it will put a smile on your face as you'll see the transaction management stuff disappear before your eyes.
    , from the time by which I decrement the item quantity in the database to the commit, no other transaction is decrementing the quantity of the same item as well??? Am I protected against this???Concurrency is a hard problem with no clearly defined answers to it other than "you need to design the code to guard against concurrency problems". In this specific case, the database protects against this happening by applying a row lock or a table lock while the transaction is active and you are making modifications. For more information about that, you should consult the documentation relating to your specific DBMS.

  • Cannot remove stateful session bean when transaction timed out

    The transaction timeout is set to 5 minutes. After several operations on the transactional
    stateful session bean(implements SessionSynchronization), the transaction timed out
    after 5 minutes and I got the IllegalStateException when calling another business
    method. After the transaction rolled back, weblogic.ejb20.locks.LockTimedOutException
    was thrown when attempting to remove the bean. It seems the lock on the bean was
    not released even though the transaction had been rolled back. Does anyone know how
    to remove the bean in this kind of situation?
    Here is the stacktrace:
    ####<Jun 11, 2002 2:39:35 PM PDT> <Notice> <EJB> <app1x.zaplet.cc> <server25044server>
    <ExecuteThread: '11' for queue: 'default'> <> <23168:7b09681c532dc7e3> <010015> <Error
    marking transaction for rollback: java.lang.IllegalStateException: Cannot mark the
    transaction for rollback. xid=23168:7b09681c532dc7e3, status=Rolled back. [Reason=weblogic.transaction.internal.TimedOutException:
    Transaction timed out after 299 seconds
    Xid=23168:7b09681c532dc7e3(3203140),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
    since begin=299,seconds left=60,activeThread=Thread[ExecuteThread: '11' for queue:
    'default',5,Thread Group for Queue: 'default'],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=ended,assigned=none),SCInfo[server25044+server25044server]=(state=active),properties=({weblogic.jdbc=t3://10.0.100.93:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=server25044server+10.0.100.93:7001+server25044+,
    Resources={})],CoordinatorURL=server25044server+10.0.100.93:7001+server25044+)]>
    java.lang.IllegalStateException: Cannot mark the transaction for rollback. xid=23168:7b09681c532dc7e3,
    status=Rolled back. [Reason=weblogic.transaction.internal.TimedOutException: Transaction
    timed out after 299 seconds
    Xid=23168:7b09681c532dc7e3(3203140),Status=Active,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds
    since begin=299,seconds left=60,activeThread=Thread[ExecuteThread: '11' for queue:
    'default',5,Thread Group for Queue: 'default'],ServerResourceInfo[weblogic.jdbc.jts.Connection]=(state=ended,assigned=none),SCInfo[server25044+server25044server]=(state=active),properties=({weblogic.jdbc=t3://10.0.100.93:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=server25044server+10.0.100.93:7001+server25044+,
    Resources={})],CoordinatorURL=server25044server+10.0.100.93:7001+server25044+)]
         at weblogic.transaction.internal.TransactionImpl.throwIllegalStateException(TransactionImpl.java:1486)
         at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(TransactionImpl.java:466)
         at weblogic.ejb20.manager.BaseEJBManager.handleSystemException(BaseEJBManager.java:255)
         at weblogic.ejb20.manager.BaseEJBManager.setupTxListener(BaseEJBManager.java:215)
         at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:371)
         at weblogic.ejb20.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:117)
         at weblogic.ejb20.internal.StatefulEJBObject.preInvoke(StatefulEJBObject.java:169)
         at mypackage.MyBean_wbr3eg_EOImpl.addRecipients(MyBean_wbr3eg_EOImpl.java:450)
    ####<Jun 11, 2002 2:39:37 PM PDT> <Info> <EJB> <app1x.zaplet.cc> <server25044server>
    <ExecuteThread: '11' for queue: 'default'> <> <> <010049> <EJB Exception in method:
    remove: weblogic.ejb20.locks.LockTimedOutException: The lock request from EJB:AppmailBean
    with primary key:21,775,960,933,010,237 timed-out after waiting 0 ms. The transaction
    or thread requesting the lock was:Thread[ExecuteThread: '11' for queue: 'default',5,Thread
    Group for Queue: 'default'].>
    weblogic.ejb20.locks.LockTimedOutException: The lock request from EJB:AppmailBean
    with primary key:21,775,960,933,010,237 timed-out after waiting 0 ms. The transaction
    or thread requesting the lock was:Thread[ExecuteThread: '11' for queue: 'default',5,Thread
    Group for Queue: 'default'].
         at weblogic.ejb20.locks.ExclusiveLockManager$LockBucket.lock(ExclusiveLockManager.java:448)
         at weblogic.ejb20.locks.ExclusiveLockManager.lock(ExclusiveLockManager.java:258)
         at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSessionManager.java:226)
         at weblogic.ejb20.manager.StatefulSessionManager.acquireLock(StatefulSessionManager.java:216)
         at weblogic.ejb20.manager.StatefulSessionManager.preInvoke(StatefulSessionManager.java:310)
         at weblogic.ejb20.manager.StatefulSessionManager.remove(StatefulSessionManager.java:754)
         at weblogic.ejb20.internal.StatefulEJBObject.remove(StatefulEJBObject.java:86)
         at mypackage.MyBean_wbr3eg_EOImpl.remove(MyBean_wbr3eg_EOImpl.java:7308)

    If a stateful session throws a RuntimeException (your rollback) the container destroys the instance of the bean and all
    associated state information is lost, as required by the EJB specification.
    If you want to maintain client state it is generally best to use HttpSession objects (if you have a web application)
    for short-lived, client-specific data and JPA entities or other database backed storage for long-lived data.

  • Losing UserTransaction state in Stateful session bean

    I have a UserTransaction I wish to begin and commit in different methods of a Stateful session bean. I have 2 methods to test this on the session bean:
    public void beginTransaction()
    trans = context.getUserTransaction() ;
    trans.begin() ;
    public void commitTransaction()
    trans = context.getUserTransaction() ;
    trans.commit() ;
    If I call these methods from one Perform method in a Struts action all works fine. If I call the methods in different Struts actions (storing the session bean handle on the HTTPSession in the first for retrieval in the second) the second call fails with the following exception:
    java.lang.IllegalStateException: No active Transaction
    The state of the transaction on the second call is STATUS_NO_TRANSACTION. I am certain that I have lost no state on the session bean and that using handles gives me the correct bean since I have written some state to test this. Basically something seems to close the transaction between the end of the first Perform method and the beginning of the second (I am of course assuming this is a valid thing to do).
    My session bean descriptor has <transaction-type>Bean</transaction-type>, and I am using OC4J.
    If anyone can point out what it is I am doing wrong I would be grateful!
    James.

    Sorry, I have re-checked my code and I believe I found the problem.
    I was beginning my transaction inside ejbCreate() and trying to commit/rollback in another method. This works in JBoss 3.2 but does not work in either OC4J or WebLogic 7.
    If I begin my transaction in a business method and commit/rollback in another method, everything works fine. (It also seems to work fine in 9.0.3 this way).
    So I am not sure whether this is a bug in 9iAS/WLS, or a bug in JBoss, or something that is left "vague" in the J2EE spec. Unfortunately, examples on bean-managed transactions are thin on the ground generally (the usual advice being not to use them, which I definitely agree with!).
    If you believe that the behaviour I describe is a bug in 9iAS, I can send a simple EJB test case.
    Keith

  • Timout error when ADF Swing+BC deployed as Stateful Session Bean

    i deploy the AM as stateful session bean onto OC4J 10.1.3,and the Client access them by Java Web Start.
    the error message is
    Exception in thread "AWT-EventQueue-0" oracle.jbo.JboException: JBO-29000: Error resuming transaction; nested exception is:
         javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.processRemoteJboException(RootApplicationModuleImpl.java:435)
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:333)
         at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
         at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequestReceiveResponse(ApplicationModuleImpl.java:1234)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequestReceiveValues(ApplicationModuleImpl.java:1250)
         at oracle.jbo.client.remote.ApplicationModuleImpl.isRangeAt(ApplicationModuleImpl.java:3856)
         at oracle.jbo.client.remote.RowSetIteratorImpl.isRangeAtTop(RowSetIteratorImpl.java:1109)
         at oracle.jbo.client.remote.RowSetImpl.isRangeAtTop(RowSetImpl.java:861)
         at oracle.jbo.client.remote.ViewUsageImpl.isRangeAtTop(ViewUsageImpl.java:968)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:409)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:247)
         at com.kunteng.fabric.jclientview.MyJUNavigationBar._isEnabled(MyJUNavigationBar.java:1558)
         at com.kunteng.fabric.jclientview.MyJUNavigationBar._updateButtonStates(MyJUNavigationBar.java:1506)
         at com.kunteng.fabric.jclientview.MyJUNavigationBar$1.run(MyJUNavigationBar.java:1419)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    ## Detail 0 ##
    oracle.oc4j.rmi.OracleRemoteException: Error resuming transaction
         at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:202)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
         at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
         at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    at connection to /192.168.1.254
         at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:110)
         at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:128)
         at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:472)
         at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:416)
         at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
         at com.evermind.server.ejb.StatefulSessionRemoteInvocationHandler.invoke(StatefulSessionRemoteInvocationHandler.java:31)
         at __Proxy6.doMessage(Unknown Source)
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.invokeDoMessage(RootApplicationModuleImpl.java:485)
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:325)
         at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
         at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequestReceiveResponse(ApplicationModuleImpl.java:1234)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequestReceiveValues(ApplicationModuleImpl.java:1250)
         at oracle.jbo.client.remote.ApplicationModuleImpl.isRangeAt(ApplicationModuleImpl.java:3856)
         at oracle.jbo.client.remote.RowSetIteratorImpl.isRangeAtTop(RowSetIteratorImpl.java:1109)
         at oracle.jbo.client.remote.RowSetImpl.isRangeAtTop(RowSetImpl.java:861)
         at oracle.jbo.client.remote.ViewUsageImpl.isRangeAtTop(ViewUsageImpl.java:968)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.isOperationEnabled(JUCtrlActionBinding.java:409)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.isActionEnabled(JUCtrlActionBinding.java:247)
         at com.kunteng.fabric.jclientview.MyJUNavigationBar._isEnabled(MyJUNavigationBar.java:1558)
         at com.kunteng.fabric.jclientview.MyJUNavigationBar._updateButtonStates(MyJUNavigationBar.java:1506)
         at com.kunteng.fabric.jclientview.MyJUNavigationBar$1.run(MyJUNavigationBar.java:1419)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
         Nested exception is:
    javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
         at com.evermind.server.ApplicationServerTransaction.resume(ApplicationServerTransaction.java:330)
         at com.evermind.server.ApplicationServerTransactionManager.resume(ApplicationServerTransactionManager.java:494)
         at com.evermind.server.ApplicationServer$2.resume(ApplicationServer.java:4559)
         at com.evermind.server.ejb.EJBTransactionManager.resume(EJBTransactionManager.java:209)
         at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:200)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
         at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
         at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    at connection to /192.168.1.254
         at oracle.oc4j.rmi.OracleRemoteException.receive(OracleRemoteException.java:123)
         at oracle.oc4j.rmi.RmiTransport.annotateException(RmiTransport.java:141)
         at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:812)
         at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:242)
         at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:197)
         at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:179)
         at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:154)
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:126)
         at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:105)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Unknown Source)

    when i use BC4J Test tool to connect to the Stateful Session Bean ,meet the same error .The full error message is
    oracle.jbo.JboException: JBO-29000: Error resuming transaction; nested exception is:
         javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.processRemoteJboException(RootApplicationModuleImpl.java:435)
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:333)
         at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
         at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
         at oracle.jbo.client.remote.ApplicationModuleImpl.createAndInitRow(ApplicationModuleImpl.java:3989)
         at oracle.jbo.client.remote.RowSetIteratorImpl.createAndInitRow(RowSetIteratorImpl.java:1602)
         at oracle.jbo.client.remote.RowSetIteratorImpl.createRow(RowSetIteratorImpl.java:1553)
         at oracle.jbo.client.remote.RowSetImpl.createRow(RowSetImpl.java:1022)
         at oracle.jbo.client.remote.ViewUsageImpl.createRow(ViewUsageImpl.java:1168)
         at oracle.jbo.jbotester.NavBar$rsInsert.doAction(NavBar.java:151)
         at oracle.jbo.jbotester.AbstractJboAction.actionPerformed(AbstractJboAction.java:81)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    ## Detail 0 ##
    oracle.oc4j.rmi.OracleRemoteException: Error resuming transaction
         at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:202)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
         at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
         at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    at connection to FUWUQI/192.168.1.254
         at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:110)
         at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:128)
         at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:472)
         at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:416)
         at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
         at com.evermind.server.ejb.StatefulSessionRemoteInvocationHandler.invoke(StatefulSessionRemoteInvocationHandler.java:31)
         at __Proxy2.doMessage(Unknown Source)
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.invokeDoMessage(RootApplicationModuleImpl.java:485)
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:325)
         at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
         at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
         at oracle.jbo.client.remote.ApplicationModuleImpl.createAndInitRow(ApplicationModuleImpl.java:3989)
         at oracle.jbo.client.remote.RowSetIteratorImpl.createAndInitRow(RowSetIteratorImpl.java:1602)
         at oracle.jbo.client.remote.RowSetIteratorImpl.createRow(RowSetIteratorImpl.java:1553)
         at oracle.jbo.client.remote.RowSetImpl.createRow(RowSetImpl.java:1022)
         at oracle.jbo.client.remote.ViewUsageImpl.createRow(ViewUsageImpl.java:1168)
         at oracle.jbo.jbotester.NavBar$rsInsert.doAction(NavBar.java:151)
         at oracle.jbo.jbotester.AbstractJboAction.actionPerformed(AbstractJboAction.java:81)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
         Nested exception is:
    javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
         at com.evermind.server.ApplicationServerTransaction.resume(ApplicationServerTransaction.java:330)
         at com.evermind.server.ApplicationServerTransactionManager.resume(ApplicationServerTransactionManager.java:494)
         at com.evermind.server.ApplicationServer$2.resume(ApplicationServer.java:4559)
         at com.evermind.server.ejb.EJBTransactionManager.resume(EJBTransactionManager.java:209)
         at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:200)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
         at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
         at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    at connection to FUWUQI/192.168.1.254
         at oracle.oc4j.rmi.OracleRemoteException.receive(OracleRemoteException.java:123)
         at oracle.oc4j.rmi.RmiTransport.annotateException(RmiTransport.java:141)
         at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:812)
         at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:242)
         at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:197)
         at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:179)
         at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:154)
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:126)
         at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:105)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Thread.java:595)
    ----- LEVEL 1: DETAIL 0 -----
    oracle.oc4j.rmi.OracleRemoteException: Error resuming transaction
         at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:202)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
         at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
         at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    at connection to FUWUQI/192.168.1.254
         at com.evermind.server.rmi.RMICall.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMICall.java:110)
         at com.evermind.server.rmi.RMICall.throwRecordedException(RMICall.java:128)
         at com.evermind.server.rmi.RMIClientConnection.obtainRemoteMethodResponse(RMIClientConnection.java:472)
         at com.evermind.server.rmi.RMIClientConnection.invokeMethod(RMIClientConnection.java:416)
         at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:63)
         at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:28)
         at com.evermind.server.ejb.StatefulSessionRemoteInvocationHandler.invoke(StatefulSessionRemoteInvocationHandler.java:31)
         at __Proxy2.doMessage(Unknown Source)
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.invokeDoMessage(RootApplicationModuleImpl.java:485)
         at oracle.jbo.client.remote.ejb.RootApplicationModuleImpl.doMessage(RootApplicationModuleImpl.java:325)
         at oracle.jbo.client.remote.ejb.EJBApplicationModuleImpl.doMessage(EJBApplicationModuleImpl.java:194)
         at oracle.jbo.client.remote.ApplicationModuleImpl.doMessage(ApplicationModuleImpl.java:6887)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1122)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendServiceMessage(ApplicationModuleImpl.java:1150)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest2(ApplicationModuleImpl.java:1219)
         at oracle.jbo.client.remote.ApplicationModuleImpl.sendRequest(ApplicationModuleImpl.java:1187)
         at oracle.jbo.client.remote.ApplicationModuleImpl.createAndInitRow(ApplicationModuleImpl.java:3989)
         at oracle.jbo.client.remote.RowSetIteratorImpl.createAndInitRow(RowSetIteratorImpl.java:1602)
         at oracle.jbo.client.remote.RowSetIteratorImpl.createRow(RowSetIteratorImpl.java:1553)
         at oracle.jbo.client.remote.RowSetImpl.createRow(RowSetImpl.java:1022)
         at oracle.jbo.client.remote.ViewUsageImpl.createRow(ViewUsageImpl.java:1168)
         at oracle.jbo.jbotester.NavBar$rsInsert.doAction(NavBar.java:151)
         at oracle.jbo.jbotester.AbstractJboAction.actionPerformed(AbstractJboAction.java:81)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234)
         at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
         Nested exception is:
    javax.transaction.InvalidTransactionException: Cannot resume transaction that has been rolledback, rollback cause=Timed out
         at com.evermind.server.ApplicationServerTransaction.resume(ApplicationServerTransaction.java:330)
         at com.evermind.server.ApplicationServerTransactionManager.resume(ApplicationServerTransactionManager.java:494)
         at com.evermind.server.ApplicationServer$2.resume(ApplicationServer.java:4559)
         at com.evermind.server.ejb.EJBTransactionManager.resume(EJBTransactionManager.java:209)
         at com.evermind.server.ejb.EJBTransactionManager.resumeRemote(EJBTransactionManager.java:200)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_transactionPostSuspend(StatefulSessionEJBObject.java:784)
         at com.evermind.server.ejb.interceptor.system.TxBeanManagedInterceptor.invoke(TxBeanManagedInterceptor.java:44)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:69)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:840)
         at RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.doMessage(RemoteBaseManageAppModule_StatefulSessionBeanWrapper4.java:491)
         at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    at connection to FUWUQI/192.168.1.254
         at oracle.oc4j.rmi.OracleRemoteException.receive(OracleRemoteException.java:123)
         at oracle.oc4j.rmi.RmiTransport.annotateException(RmiTransport.java:141)
         at com.evermind.server.rmi.RMIClientConnection.handleMethodInvocationResponse(RMIClientConnection.java:812)
         at com.evermind.server.rmi.RMIClientConnection.handleOrmiCommandResponse(RMIClientConnection.java:242)
         at com.evermind.server.rmi.RMIClientConnection.dispatchResponse(RMIClientConnection.java:197)
         at com.evermind.server.rmi.RMIClientConnection.processReceivedCommand(RMIClientConnection.java:179)
         at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:154)
         at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:126)
         at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:105)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:814)
         at java.lang.Thread.run(Thread.java:595)

  • EJB 3.0 Stateful session bean shared between Servlet's

    Hello
    I have a bit of a noob question regarding Stateful sessions beans.
    I am wanting to know if there is a way that I can share an instance of a session bean between multiple HttpServlet instances?
    I am sending XML messages from a mobile J2ME application, there will be several http POST's made from the mobile client to the server. I would like these multiple POST's to be passed from the handling servlet instance to the same uniquely identified single stateful session bean instance (i can then @Remove the stateful bean when I have finished my several requests).
    I would greatly appreciate any tips anyone could give me.

    If not, your only option is to maintain the
    association yourself by creating a unique id for
    each
    conversation and storing that id along with the SFSB
    reference in the ServletContext. Then you'll
    need to pass the id in along with each invocation to
    retrieve the appropriate SFSB reference.Thanks for your reply.
    Will I always be presented with the same ServletContext instance? Even if the time between requests might be many minutes? Where can I learn more about how to use the ServletContext?
    Thanks!

  • Stateful Session Beans are not passivated / serialized when cache idle time

    Technology: Sun Application Server version 7.0.0_01; JDK 1.4.1; developed on Windows 2000; Tested on Sun Solaris.
    Initial error on Sun Solaris:
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr: Exception in thread "service-j2ee-25" org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 1015 completed: No
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.POA.GenericPOAServerSC.preinvoke(GenericPOAServerSC.java:389)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.POA.ServantCachePOAClientSC.initServant(ServantCachePOAClientSC.java:112)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.POA.ServantCachePOAClientSC.setOrb(ServantCachePOAClientSC.java:95)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.createDelegate(CDRInputStream_1_0.java:760)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.internalIORToObject(CDRInputStream_1_0.java:750)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:669)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:890)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:884)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream.read_abstract_interface(CDRInputStream.java:307)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:228)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:381)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.enterprise.iiop.IIOPHandleDelegate.getStub(IIOPHandleDelegate.java:58)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.enterprise.iiop.IIOPHandleDelegate.readEJBObject(IIOPHandleDelegate.java:38)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.ejb.portable.HandleImpl.readObject(HandleImpl.java:91)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:908)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:981)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:287)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.copyObject(Util.java:598)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at javax.rmi.CORBA.Util.copyObject(Util.java:314)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.telstra.nodeman.ejb._NodeMaint_Stub.getHandle(Unknown Source)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.telstra.nodeman.arch.NMAViewBeanProxy.checkBeans(NMAViewBeanProxy.java:631)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.telstra.nodeman.view.html.NMAStandardButton.handleRequest(NMAStandardButton.java:143)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.telstra.nodeman.arch.NMAViewBeanBase.handleRequest(NMAViewBeanBase.java:1573)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:824)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:637)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:595)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:772)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:446)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:324)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.telstra.nodeman.view.ViewServlet.doPost(ViewServlet.java:243)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at java.security.AccessController.doPrivileged(Native Method)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
    [10/Aug/2004:08:04:57] WARNING (17227): CORE3283: stderr:      at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
    The above error caused the server to use all available memory and required a reboot to proceed.
    Subsequent testing against the Sun Appliucation Server 7 on Windows 2000 dev environment using the Sun Studio IDE for debugging and trace statements inserted in the code indicate that the Application Server is removing the Stateful Session Beans when they time out without an ejbPassivate event and without serializing the beans to the data-store. cache-idle-timeout-in-seconds set to 180 and removal-timeout-in-seconds set to 1800.
    The server.log indicates that the beans are timing out:
    [19/Aug/2004:18:15:10] WARNING ( 1664): [NRU-com.telstra.nodeman.ejb.AddressMaintBean]: IdleBeanCleanerTask finished after removing 2 idle beans
    Trace statements inserted in ejbPassivate do not appear in the log.
    It is my understanding that the above timeout should have caused an ejbPasssivate and serialization of the beans.
    The beans have been validated using Sun Java Studio Enterprise 6 with 'EJB validate'.
    My reading of the problem is that the beans are not being serialized and the error occurs when the application attempts to reference (getHandle) the bean after timeout.
    Any suggestions would be appreciated.

    Thanks Thorick.
    I am using NRU caching. WL 7.0 SP2.
    I have not defined idle-timeout-seconds in my weblogic-ejb-jar.xml. As I understand
    the default value for this is 600secs. So the ejbs should be removed after this
    time. Below is the
    weblogic-ejb-jar.xml that I am using.
    <!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
    'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
    <!-- Generated XML! -->
    <weblogic-ejb-jar>
    <weblogic-enterprise-bean>
    <ejb-name>Cart</ejb-name>
    <stateful-session-descriptor>
    <stateful-session-clustering>
    <home-is-clusterable>true</home-is-clusterable>
    <replication-type>InMemory</replication-type>
    </stateful-session-clustering>
    </stateful-session-descriptor>
    <transaction-descriptor>
         <trans-timeout-seconds>
              60
         </trans-timeout-seconds>
    </transaction-descriptor>
    <jndi-name>CartHome</jndi-name>
    </weblogic-enterprise-bean>
    </weblogic-ejb-jar>
    "thorick" <[email protected]> wrote:
    >
    The idle-timeout-seconds property controls the timeout/removal behavior.
    which stateful session cache type are you using ? LRUCache or NRUCache

  • Reentrant call to a stateful session bean

    Hi,
    I have a problem that seems to be a very common problem but I
    steel didn't find any solution for it.
    We have a jsp page that call to stateful session been, the
    problem occur when I click twice on any link/button then I get
    java.rmi.RemoteException: Illegal attempt to make a reentrant call to a stateful
    session bean from home:....
    I have tried to set the <allow-concurrent-calls> to true but it doesn't help,
    I am getting this exception no matter the value of this tag.
    I am using WL61 sp2 (the last version) , Does anybody find a solution for that,
    I don't want to use javascript in order to work around this problem.
    Thanks,

    I think this is a different error from concurrent access (when client's
    attempt to access the same bean concurrently WebLogic throws LockTimedOut error
    (or client blocks if allow-concurrent-calls is true)).
    This error probably means that your code attempetd to reenter bean in the same
    transaction - how do you invoke it and what is the stack trace?
    Haim Cohen <[email protected]> wrote:
    Hi,
    I have a problem that seems to be a very common problem but I
    steel didn't find any solution for it.
    We have a jsp page that call to stateful session been, the
    problem occur when I click twice on any link/button then I get
    java.rmi.RemoteException: Illegal attempt to make a reentrant call to a stateful
    session bean from home:....
    I have tried to set the <allow-concurrent-calls> to true but it doesn't help,
    I am getting this exception no matter the value of this tag.
    I am using WL61 sp2 (the last version) , Does anybody find a solution for that,
    I don't want to use javascript in order to work around this problem.
    Thanks, --
    Dimitri

  • Passivation of Connection Object in Stateful Session Bean

    Hi all,
    I am developing a Stateful session bean that has a Connection object as its instance variable. And this bean starts transaction that spans across multiple method calls and finally either commit or rollback.
    BeanClass
    UserTransaction utx;
    Connection conn;
    ejbCreate()
    allocateconnection();
    ejbRemove()
    closeconnection();
    ejbActivate()
    allocateconnection();
    ejbpassivate()
    closeconnection();
    StartTransaction()
    utx = getusertransaction();
    utx.begin();
    Method1()
    do something with database
    Method2()
    do something with database
    CommitTransaction()
    utx.commit();
    For example, the typical usage of this bean would be:
    bean.StartTransaction();
    bean.Method1();
    bean.Method2();
    bean.CommitTransaction();
    Here are my two questions:
    1. General Question: In order for a Connection object to join a Transaction, Do I have to create the connection after the transaction has started?
    2. If the answer to the above question is yes, then: I understand that when this bean get passivated, the UserTransaction instance object would be passivated. And since the connection object can't not be passivated, I have to recreate the connection object in ejbactivate() method, would newly created connection participate in the same Transaction that was being passivated and now activated?

    >
    Hi all,
    I am developing a Stateful session bean that has a
    Connection object as its instance variable. And this
    bean starts transaction that spans across multiple
    method calls and finally either commit or rollback.
    BeanClass
    UserTransaction utx;
    Connection conn;
    ejbCreate()
    allocateconnection();
    ejbRemove()
    closeconnection();
    ejbActivate()
    allocateconnection();
    ejbpassivate()
    closeconnection();
    StartTransaction()
    utx = getusertransaction();
    utx.begin();
    Method1()
    do something with database
    Method2()
    do something with database
    CommitTransaction()
    utx.commit();
    For example, the typical usage of this bean would be:
    bean.StartTransaction();
    bean.Method1();
    bean.Method2();
    bean.CommitTransaction();
    Here are my two questions:
    1. General Question: In order for a Connection object
    to join a Transaction, Do I have to create the
    connection after the transaction has started?Strictly NO. In fact, the connection is obtained first and then can a transaction begin.
    2. If the answer to the above question is yes, then: I
    understand that when this bean get passivated, the
    UserTransaction instance object would be passivated.
    And since the connection object can't not be
    passivated, I have to recreate the connection object
    in ejbactivate() method, would newly created
    connection participate in the same Transaction that
    was being passivated and now activated?
    The answer to first question being NO, your argument for question 2 does not hold true. According to the EJB specification, a stateful session bean can only be passivated between the transaction and not within a transaction. Your implementation for the stateful EJB is good to work.

  • Lock Timed out exception in stateful Session Bean

    Hi All,
    We have a stateful session bean and put the reference of the bean in HttpSession
    and retrieve it from other JSP.
    While calling a method from bean, we are often getting the following exception.
    Any help please?
    weblogic.ejb.extensions.LockTimedOutException: Lock for primaryKey:1018581328443_46
    could not be acquired without waiting.
    at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:134)
    at weblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
    at weblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:447)
    at weblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObject.java:159)
    at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:487)
    at com.elink.jbe.savejobses.SaveJobSesBeanEOImpl.getJobHeaderData(SaveJobSesBeanEOImpl.java:1258)
    at jsp_servlet._jobentry._jbeenquirydefaults._jspService(_jbeenquirydefaults.java:243)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:123)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:761)
    at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:708)
    at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:346)
    at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:246)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)

    Hi Arjuna,
    Thanks for your suggestions. But can you also help me how to make the session
    bean thread safe?
    Thanks in Advance
    Srinath
    "Arjuna Chala" <[email protected]> wrote:
    Looks like you have two threads accessing the bean at the same time.
    You
    need to make it thread safe. Also, store the handle of the session bean
    instead of the session bean itself in the session.
    By the way, session beans (handle or otherwise) are not meant to be stored
    in the HttpSession, and here is why:
    http://groups.google.com/groups?q=stateful+session+bean+httpsession&hl=en&se
    lm=3b72acb9%40newsgroups.bea.com&rnum=6
    "srinath" <[email protected]> wrote in message
    news:[email protected]...
    Hi All,
    We have a stateful session bean and put the reference of the bean inHttpSession
    and retrieve it from other JSP.
    While calling a method from bean, we are often getting the followingexception.
    Any help please?
    weblogic.ejb.extensions.LockTimedOutException: Lock forprimaryKey:1018581328443_46
    could not be acquired without waiting.
    atweblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:134)
    atweblogic.ejb.internal.LockManagerImpl.lock(LockManagerImpl.java:81)
    atweblogic.ejb.internal.StatefulEJBCache.bind(StatefulEJBCache.java:447)
    atweblogic.ejb.internal.StatefulEJBObject.getContextForInvoke(StatefulEJBObjec
    t.java:159)
    atweblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:487)
    atcom.elink.jbe.savejobses.SaveJobSesBeanEOImpl.getJobHeaderData(SaveJobSesBea
    nEOImpl.java:1258)
    atjsp_servlet._jobentry._jbeenquirydefaults._jspService(_jbeenquirydefaults.ja
    va:243)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :123)
    atweblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:761)
    atweblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:708)
    atweblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:252)
    atweblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:346)
    atweblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:246)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)

  • Stateful Session Bean accesed by two JSPs.

    Hi there,
    We are having quite an issue; we have an application that stores session
    state in an stateful session bean. And we have noticed some parts of the
    application create a situation where is possible that two frames -and so two
    jsp- access the session bean at the same time. And, of course, it´s going to
    be the same instance of the session bean..... what will be the behaviour in
    this case?. Will the requests be serialized, an exception will be thrown or
    the EJB will be destroyed?. Not very sure of what would happen. I suppose
    there could be some problems with this-. I would appreciate any help.
    Many thanks. Best regards.

    Hrm. EJB spec is quite clear on what will happen (RemoteException thrown) if
    the second client attempts to use Stateful Session bean which is already in
    use (and the bean will not be destroyed - container will simply throw an
    exception after failing to acquire a lock on the bean instance without waiting
    (allow-concurrent-calls option in WebLogic allows client call to wait to acquire
    lock - this was probably added as a convinience feature for applications which
    use frames)).
    So, normally your application has to ensure that no 2 clients are able to use
    the same stateful session bean concurrently, or use allow-concurrent-calls option,
    which will do that for you, but the application will become non portable.
    Dimitri
    PS: Thanks. Maine Coon cats are the best. Ours is a 22-pound giant ;-)
    Pinklon Thomas <[email protected]> wrote:
    Hi Dimitri,
    Thnaks a lot for the help:one thing that I do not know if it´s an issue is
    that calls come from different JSPs; the strategy I have seen in another Web
    application servers is trying to activate the EJB in the middle of another
    transaction... In this situation, the container cannot activate the EJB,
    roolback the transaction and destroys the EJB.... Would Weblogic feature
    avoid this?. I will investigate on my part....
    Many many thnaks. Nice cats.
    "Dimitri Rakitine" <[email protected]> wrote in message
    news:[email protected]...
    In 6.1 you can set allow-concurrent-calls to true in this situation:
    <!--
    The allow-concurrent-calls specifies whether a stateful session bean
    instance will allow concurrent method calls. The value of this
    element may be either "True" or "False". The default value is
    "False". When a stateful session bean instance is currently in a
    method call and another (concurrent) method call arrives on the
    server, the EJB specification requires that the server throw a
    RemoteException. By default, allow-concurrent-calls is false, and the
    EJB container will follow the EJB specification. When this value is
    set to true, the EJB container will block the concurrent method call
    and allow it to proceed when the previous call has completed.
    Used in: stateful-session-descriptor
    -->
    Pinklon Thomas <[email protected]> wrote:
    Hi there,
    We are having quite an issue; we have an application that stores
    session
    state in an stateful session bean. And we have noticed some parts of the
    application create a situation where is possible that two frames -and sotwo
    jsp- access the session bean at the same time. And, of course, it´sgoing to
    be the same instance of the session bean..... what will be the behaviourin
    this case?. Will the requests be serialized, an exception will be thrownor
    the EJB will be destroyed?. Not very sure of what would happen. Isuppose
    there could be some problems with this-. I would appreciate any help.
    Many thanks. Best regards.--
    Dimitri

  • Stateful Session Bean Question

    I have a stateful session bean being invoked by my web tier on several request/response transactions. What would be the best way to locate the same session bean ? Would that be the create method in the Home i/f or would i need to supply a finder method for locating an existing bean?

    Hi,
    Store HomeObject or EJB Object in the Session in the WebTier.
    Anil

Maybe you are looking for

  • Facebook On Nokia N8

    I am not sure about the Nokia strategy here. I mean, if you want to improve, you have to check what others are doing, no? I know the browser sucks, the battery sucks, in call touch screen sucks and there are 100 more things which sucks in the much an

  • How do i run an .exe from inside java?

    Thanks for any help maggie

  • Requisition import

    Hai all, i want total details of Requisition import,once i import the data in requisiton Interface Tables ,then execute the statndard concurrent program Requisiton import after complte this program maily which tables will effect,once i use internal r

  • How to enable 24 hour clock on Verizon STB?

    Whilst I appreciate i'm in a country that appears unable to tell the time in any other way than using AM / PM symbols, I would very much like to have my time displayed in the format I - and other europeans - are used to: the 24 hour clock. How do I e

  • Default signature not automatically showing up

    I have three email accounts configured in Mail.app. Each of them has a default signature assigned, so that when I create a new message from that account or reply to a message sent to that account, the signature is automatically attached. However, on