[EJB] Stateful session bean--- strange error

hi guys,
here s my problem. i m trying to developp a stateful session bean with two ejbcreate method. one with parameters ( ejbcreate(int val)) and another one without (ejbcreate()).
The client can call ejbcreate without any pbs. everything s allright.
but when i try to get a remote access to the bean via a
MY_BEAN.create(5); then i got an error saying :
FAILED TO FIND METHOD FOR HASH ......
i dont understand cuz i checked my files many times and the two methods are implemented and declared in the home interface.
what should i do ?
please.
tery

Hi Tery,
You are in the wrong forum. This forum is for the Sun Java Studio Creator.
Cheers :-)!!!

Similar Messages

  • 1) Second thread call to stateful session bean.

    Hi Friend,
    I read your threads on otn and i compared your problem with us and i analysed that your application and my application is same, So Plese can you help me in some issues.
    Friend, Please help me in these issues, Thanks for this
    We have very big ADF Swing+BC Application and deployed as Stateful Session Bean. in my application there are 500 Application Modules,For each application module i created Stateful session beans and deployed it on OC4J Container but when working on deployed application then i am getting time out error after 15 min of working.
    1). I set that parameter that you mentioned i.e jbo.ejb.txntimeout = 86400,but still it is giving me same error.
    2). Second Issue is of ---ORA-01000: maximum open cursors exceeded
    For this issue i chaged the Database Parameter i.e OpenCurser=2000, but still it is giving me same error,
    is there any parameter on application module required to change so that this error will not come.
    3). When i close the form then application module is not releasing database connection.
    4). (oracle.oc4j.rmi.OracleRemoteException) Second thread call to stateful session bean
    This error is also coming when I am using deployed application for long time i.e more than 15 min for Heavy Transactions

    Hi Suyog,
    How r u?
    We all are fine.
    I alerady tried for the Max Curser Property but it is not helpfull.
    I think again i have to go for closing opened db RS and statements.
    Thanks
    Vijay

  • Error in updating secondary stateful session bean

              Hi all,
              I have set up a cluster of 2 managed servers with WebLogic 6.1. I have a
              stateful session bean and several stateless session beans. the stateful
              session bean keeps user info and limited cached objects, all are
              serializable. it seems working fine, even after killing any one of the
              servers, as long as one is alive. a java application client creates a
              stateful session bean first, then calls stateless session beans with the
              remote interface of the stateful bean as a method parameter. No problem
              when stateful session bean is created. However, each stateless bean method
              generates the following error message if I turn the debug on (level 64). No
              exception stack traces, and all methods execute successfully.
              <Error> <EJB> <Failed to update the secondary copy of a stateful session
              bean from home:clientsession>
              I wonder what causes the error, and why it tries to update the stateful
              session bean. in all stateless session beans, only read into the stateful
              bean.
              Thank you,
              Fujin
              

    This has been fixed in WLS 6.1 SP2.
              jagdip Talla wrote:
              > Hi Fujin,
              > please let me know, if u were able to solve the problem..
              >
              > hi guys,
              > appreciate if you could give me some clues
              > how to solve this problem ?
              >
              > i hv 2 WLS instances in a cluster,
              > when one server instance is shut down, i keep getting these errors ?
              > is it normal ?
              > <Feb 19, 2002 2:57:53 PM SGT> <Error> <EJB> <Failed to update the secondary copy of a stateful session bean from home:ejb/xyzrel1_2/xxxxHome>
              >
              > appreciate if u can let me know, if u could solve it..?
              >
              > thanks n regads
              > jagdip
              Rajesh Mirchandani
              Developer Relations Engineer
              BEA Support
              

  • Deploy Error when using Stateful Session Bean inside Webdynpro

    Hi,
    I'm trying to create a webdynpro project that uses a stateful session bean
    I have created DC's for a EJB Module project, Enterprise Application and Webdynpro component. Created the bean, built it, added it's package to the public part, added the EJB Module to the EAR project. Built the EAR project. Added the EJB Module project and Enterprise Application project as a used DC in the Webdynpro DC.
    In the Webdynpro DC I added com.sap.archive-packaging.default.update-descriptors=true in the build.properties file of the cfg directory. (using the navigator view) That resolved an error while building it.
    Deployed the Enterprise Application DC without problems.
    Tried to deploy the Webdynpro DC but I get the following error:
    Jun 16, 2008 9:40:46 AM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] WARNING:
    [012]Deployment finished with warning
    Settings
    SDM host : 10.64.36.74
    SDM port : 50018
    URL to deploy : file:/C:/DOCUME~1/JESCHA~1/LOCALS~1/Temp/temp59822company.nl~projempactcmp.ear
    Result
    => deployed with warning : file:/C:/DOCUME~1/JESCHA~1/LOCALS~1/Temp/temp59822company.nl~projempactcmp.ear
    Finished with warnings: development component 'projempactcmp'/'company.nl'/'local'/'20080616094022':Caught exception during application startup from SAP J2EE Engine's deploy service:java.rmi.RemoteException: Error occurred while starting application company.nl/projempactcmp and wait. Reason: Clusterwide execption: server ID 6060950:<--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='Failed implicit start for company.nl/projempejb : Unknown state(5)', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key Failed implicit start for company.nl/projempejb : Unknown state(5) (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment exception : Got problems during deployment
    Does anyone know what this error means and how to resolve it. I searched the forum but only found errors that look like this relating to XI not to Webdynpro.......
    Thansk,
    Jeschael
    Edited by: J.V. Lebbink on Jun 17, 2008 6:52 AM

    Default is 30mts.
    This is done as a parameter in orion-ejb-jar.xml. Please look at the EJB Guide at http://otn.oracle.com/docs/products/ias/doc_library/903doc_otn/generic.903/a97677/dtdxml.htm#634197 for details
    regards
    Debu

  • 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)

  • Error execute query from stateful session bean

    Hi,
    I created a stateful session bean, it's flow are as following:
    - client invoke open()
    - client "iterate" using method next()
    - client invoke close()
    In open, I get Connection to db-source, create a PreparedStatement, and execeute the query, store in a resultset.
    In next(), I traverse the resultSet using next().
    In close(), I close both resultset, statemtn, and connection.
    Here's the snippet of my code:public SynchCatalogBean implements SessionBean {
        private Connection conn;
        private PreparedStatement stmt;
        private ResultSet rs;
        private static final String = "SELECT ? FROM ?";
        public void openCategory() throws RemoteException {
            DataSource dataSource =
                (DataSource)jndiContext.lookup(DATASOURCE);
            con = dataSource.getConnection();
            stmt = con.prepareStatement(QUERY);
            stmt.setString(1, "id");
            stmt.setString(2, "category");
            rs = stmt.executeQuery(); //this throws exception
        public String next() throws ... {
            if (rs.next())
        public void close() throws ... {
            rs.close();
            stmt.close();
            conn.close();
    }Well, the problem is, once I test with a simple client, the line rs = stmt.executeQuery() produce exception like this:[SynchCatalog] TRANSACTION ROLLBACK EXCEPTION:Error opening category; nested exception is:
        java.rmi.RemoteException: Error opening category
    [SynchCatalog] java.rmi.RemoteException: Error opening category
    [SynchCatalog]  at matashop.product.ejb.SynchCatalogBean.openCategory(SynchCatalogBean.java:66)
    [SynchCatalog]  at java.lang.reflect.Method.invoke(Native Method)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:570)
    [SynchCatalog]  at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190)
    [SynchCatalog]  at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:209)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
    [SynchCatalog]  at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
    [SynchCatalog]  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
    [SynchCatalog]  at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:326)
    [SynchCatalog]  at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:392)
    ...My stateful-bean is "read-only" bean, it just execute a select statement, so why Jboss complain about transaction exception? Can anyone help me?
    -- Verdi March --

    agree, you cannot pass tablenames as ? parameters. Instead you should generate your SQL statement dynamically
    private static final String = "SELECT ? FROM ";
    public void openCategory() throws RemoteException {
    stmt = con.prepareStatement(QUERY + "category");
    stmt.setString(1, "id");

  • Error While passivating Stateful session bean

     

    I also have same problem when WL passivating. However, the exception throwing from
    WL saying the "Ignoring exception raised while passivating".
    My question is will that exception lead to failure of passivating and evenually
    lead to memory leakage? I just thought that the memory is still in cache either
    removed or passivated, as a result more and more memory will be used up as more
    failure occurs.
    Frank
    Rob Woollen <[email protected]> wrote:
    It looks like you have a reference to a DB Connection as a member
    variable. This reference should be transient. You can re-acquire it
    in
    ejbActivate.
    -- Rob
    Hemant Arora wrote:
    Hi
    Can anybody please clarify the error that I'm getting while runningthe
    stateful session bean with weblogic
    I have instantiated 20 stateful session beans all using the DB connection
    but if the connection is unaailable I'm making the beans to wait.
    I'm not removeing the beans and again making the instance of 20 another
    beans
    The max beans in cache is 25.
    Thanks
    Hemant
    This is the output at the console of the weblogic
    ejbPassivate()
    Tue Jul 17 20:58:00 GMT+05:30 2001:<I> <EJB JAR deployment
    d:/weblogic/myserver/romanCount.jar> Ignoring exception raised while
    passivating:
    java.io.NotSerializableException:
    weblogic.jdbc20.rmi.internal.ConnectionImpl
    at
    java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at
    java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
    at
    java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
    at
    java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1214)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at
    java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1841)
    at
    java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:480)
    Coming Soon: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnweblogic.com

  • How create  EJB 2.1 Stateful Session Bean in a EJB 3.0 Session Bean

    Hi All,
    We have been developing on EJB 2.1. We are now adding a module on EJB 3.0.
    How can we "create" a stateful session bean with create method signature similar to create(String id)?
    We have tried
    // this is the remote interface
    @EJB AddressBean abean;
    But not working
    Any help will be appreciated.

    There is no explicit create() call for EJB 3.0 session beans. It doesn't really matter though
    since you can accomplish the same thing by defining your own business method to act
    as an initializer for whatever state you'd like. E.g.
    @Remote
    public interface FooInterface {
    public void initialize(String id);
    // ... other business methods
    @EJB FooInterface fooRef;
    fooRef.initialize("foo");
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Creating multiple stateful session beans from a java client. (EJB 3.0)

    I'm having difficulties with the following:
    To access the ShoppingCartBean, I have to put the following annotation in my standalone java client:
    @EJB
    private static ShoppingCartRemote shoppingCartBean;
    The static must be there, thus only one ShoppingCartBean will exist within my java client. But as the ShoppingCartBean is a stateful session bean, I want to be able to get different beans of the same type.
    What is the correct way to do this in EJB 3.0?

    Great question. Because Home interfaces have been removed for the EJB 3.0 simplified
    API, stateful session bean creation happens as a side-effect of injection. However, the
    same is true of EJB 3.0 business interface lookups. The easiest way to create additional
    stateful session beans is to lookup the same dependency that was declared via your
    @EJB annotation.
    E.g.,
    // Assuming the declaring class is pkg1.ShoppingCartClient.java
    InitialContext ic = new InitialContext();
    ShoppingCartRemote scr1 = (ShoppingCartRemote)
    ic.lookup("java:comp/env/pkg1.ShoppingCartClient/shoppingCartBean");
    Note that the name relative to java:comp/env is the default associated with your
    @EJB annotation since the name() attribute wasn't used. Alternatively, you
    could have used :
    @EJB(name="scb") private static ShoppingCartRemote shoppingCartBean;
    InitialContext ic = new InitialContext();
    ShoppingCartRemote scr1 = (ShoppingCartRemote) ic.lookup("java:comp/env/scb");
    Yet another alternative is to declare the @EJB at the class-level. This just defines
    the dependency without any injection, which is fine if you want to create a bunch of
    them via lookup anyway.
    @EJB(name="scb", beanInterface=ShoppingCartRemote.class)
    public class .... {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • SAME EJB 3.0 Stateful Session bean for different JSP sessions returned

    Forum,
    I have a strange problem utilizing stateful session beans. Please note, that I am using jdeveloper for the following:
    1) Here is a basic stateful session bean:
    @Stateful(name = "DemoClass")
    public class DemoClassBean implements DemoClass,
               DemoClassLocal, SessionSynchronization {
          public static int id=0;
          public DemoClassBean() {
          id++;
          public int getId() {
             return id;
          //... other methods
    }2) This bean is accessed from a JSP for testing purpose, I am copying only the script used in JSP:
    <%
       DemoClass bean = null;
       try {
          bean = (DemoClass) ((new javax.naming.InitialContext()).
                       lookup("DemoClass "));
          System.out.println("ID=" + bean.getId() );
          } catch (javax.naming.NamingException e) {
             // TODO
    %>If this page is addressed by different clients, from different browsers, the same bean is returned.
    Here is what I see in the logs:
    ID=1
    ID=1
    ID=1
    The same problem is being observed when this session bean is accessed from a JSF Backing bean.
    What could be wrong? Is this a bug in oc4j / jdeveloper (version 10.1.3.3.0)?
    Edited by: smw000000001 on Nov 17, 2008 10:52 AM

    Hi,
    The code for stateful is perfectly fine and working in a normal way. The way you are trying to implement the stateful session bean in your application is wrong.
    think of binding the stateful session bean with HttpSession object.
    So that you will get a unique stateful session bean object.

  • Stateful Session Bean Initialization (EJB 3.0)

    Hi all!
    In EJB 2.1 the initialization was with create (args) methods. NOw, how is it exploited? Create methods are no more there and there must be a way to send parameters to the stateful session bean when it is newly created...isn't it?
    Thank you!

    There is no pre-defined equivalent of a create method in EJB 3.0. If you want to initialize a
    stateful session bean, just define a business method that the client should use as an initialization
    method.

  • How to intantiate Stateful session bean in EJB 3 ?

    In EJB 2.x, to instantiate a Stateful Session bean the process was:
    1. Lookup Home object
    2. call create(args) method on Home, that in turn would call corresponding ejbCreate(args) on the bean implementation.
    Now, in EJB 3, there is no concept of Home interaface, How can I instantiate a stateful session bean with some initialization parameters.
    Thanks

    Just the spec. NetBeans should only be providing the ability to add an ejbCreate method if the bean exposes a Local or Remote 2.x view.
    Each lookup or injection of a stateful session bean results in a new bean instance. As long as you call your methods to populate the additional
    state right after first acquiring the stateful session bean reference it will work.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • 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 bean hot deployment error?

    Hi,
    i'm getting an exception ...
    1. Deploy a stateful session bean.
    2. Hit the server and create an instance, then remove it.
    3. Change Stateful session bean source compile and hot deploy it.
    4. Hit the server and try creating an instance...exception !!!!
    "IllegalArgumentException: Object is not an instance of declaring class"
    Please help!!!
    Naveen

    Hi Navin,
    Firstly could you let me know , what option did you set in Jdeveloper to perform hot deploy ??
    I would like to hot deploy Stateless Session beans on Embedded OC4J using JDeveloper.
    Bhavesh

  • EJB 2.0 STATEFUL SESSION BEANS -- ejbPassivate or ejbActivate is not called

    Hi,
    am using Oracle Jdevloper 9i. When i use Stateful Session beans the ejbPassivate or ejbActivated methods are not being called. What is the reason?

    Hi Arun,
    The decision of when to passivate a stateful session bean is up to a particular vendor's implementation. Typically each vendor will have some configuration that controls this decision, but it's certainly common for passivation to not take place for a given workload. Your best bet is to look at the Oracle documentation to see how the container makes its passivation decision.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Windows vista not recognizing one of my iphones!!! wont import photos pleas

    i have windows vista home. i have two iphones and my bf has one. mine show up in the autoplay under devices and autoplay does start and import new photos when my iphones are plugged in . his iphone is never listed under devices in autoplay, never imp

  • BAPI_GOODS_MVT Problem MB1B

    Hello, I need some help please I use BAPI_GOODSMVT_CREATE gmhead-pstng_date = sy-datum. gmhead-doc_date   = sy-datum. gmhead-pr_uname   = sy-uname. gmcode-gm_code    = '04'.   "MB1B BAPI_ITEM-MATERIAL   =  <out>-matnr. BAPI_ITEM-PLANT      =  '5314'.

  • Java VM Version & Date for JDev 3.0

    Hi, I skimmed through the document: "JDeveloper 3.0 Oracle Business Components for Java Technical White Paper" and could not find out which version of the VM 3.0 is going to support. 2 questions: - 1: Which version of the JVM? - 2: General availabili

  • HTML applet and JAVA command

    hi, i have a problem that i can not solve.... i can execute my code in typing javac Myclass.java and then i type java Myclass then my game is running very well. but when i put all my classes in a HTML page it does not work. I see my class being charg

  • From HTML string to HtmlDocument?

    I have a String consists of a HTML string e.g. <br>Hello</br> How to convert it into a javax.swing.text.html.HtmlDocument?