Link to home
Start Free TrialLog in
Avatar of prabudoss
prabudoss

asked on

Listner ports - number of session problem

Hi,
We are developing EJB app with WAS 5.0 We have  MDB listening to MQ. We have strange problem like when we set the maximum sessions on listener port as 1, the transactions are working as expected (transaction includes few read, insert and updates of about 10,000 records in DB2 database). But when sessions increased to 2 or 3, it throws the following exception randomly. But few transactions are going through fine. Please let me know if you find anything fishy.

[9/11/04 1:00:17:553 GMT]   6d3b92 ConnectionFac I J2CA0107I: Component-managed authentication alias not specified for connection factory or datasource delqncyDS.
[9/11/04 1:00:22:250 GMT]   6d3b92 WSRdbDataSour u Database version is
                                 08.01.0006
[9/11/04 1:00:22:251 GMT]   6d3b92 WSRdbDataSour u JDBC Driver version is
                                 08.01.0006
[9/11/04 1:00:22:572 GMT]   6d3b92 XATransaction E J2CA0026E: Method addSync caught javax.transaction.RollbackException
        at com.ibm.ejs.jts.jta.TransactionImpl.registerSynchronization(TransactionImpl.java:993)
        at com.ibm.ejs.jts.jta.JTSXA.registerSynchronization(JTSXA.java:1096)
        at com.ibm.ejs.j2c.XATransactionWrapper.addSync(XATransactionWrapper.java:256)
        at com.ibm.ejs.j2c.ConnectionManager.initializeForUOW(ConnectionManager.java:906)
        at com.ibm.ejs.j2c.ConnectionManager.involveMCInTran(ConnectionManager.java:723)
        at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:468)
        at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:215)
        at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:190)
        at com.pmigroup.framework.persistence.ApplConnectionManager.getDBConnection(ApplConnectionManager.java:341)
        at com.pmigroup.framework.persistence.ApplConnectionManager.getDBConnection(ApplConnectionManager.java:298)
        at com.pmigroup.framework.persistence.ApplDBPersistence.getUserCtxBasedConnection(ApplDBPersistence.java:76)
        at com.pmigroup.framework.persistence.ApplDBPersistence.retrieve(ApplDBPersistence.java:156)
        at com.pmigroup.framework.persistence.ApplQuery.executeQueryWithoutMap(ApplQuery.java:207)
        at com.pmigroup.framework.persistence.ApplQuery.executeQuery(ApplQuery.java:170)
        at com.pmigroup.pmifwrk.common.helper.PmiFwrkCodeValueLoader.refresh(PmiFwrkCodeValueLoader.java:384)
        at com.pmigroup.pmifwrk.common.helper.PmiFwrkCodeValueLoader.initialize(PmiFwrkCodeValueLoader.java:83)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.pmigroup.framework.bootstrap.FwrkEJBApplInitializer.initializeClass(FwrkEJBApplInitializer.java:220)
        at com.pmigroup.framework.bootstrap.FwrkEJBApplInitializer.initialize(FwrkEJBApplInitializer.java:183)
        at com.pmigroup.framework.startup.StartupBean.start(StartupBean.java:67)
        at com.ibm.websphere.startupservice.EJSRemoteStatelessStartup_62d21f31.start(Unknown Source)
        at com.ibm.websphere.startupservice._AppStartUp_Stub.start(Unknown Source)
        at com.ibm.ws.startupservice.StartBeanInfo.start(StartBeanInfo.java:255)
        at com.ibm.ws.startupservice.StartUpModule.start(StartUpModule.java:100)
        at com.ibm.ws.startupservice.StartUpApplication.start(StartUpApplication.java:101)
        at com.ibm.ws.startupservice.StartUpService.stateChanged(StartUpService.java:393)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:385)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:791)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:157)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:153)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:589)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:268)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:246)
        at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:543)
        at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:418)
        at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:126)
        at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:543)
        at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:418)
        at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
        at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
        at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
 while trying to register the Resource Adapter with the Synchronization Manager for the current transaction, and threw a ResourceException.
[9/11/04 1:00:22:975 GMT]   6d3b92 StartBeanInfo E STUP0006E: Exception calling startup bean named ejb/com/ibm/websphere/startupservice/AppStartUpHome, exception was javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
        org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException:    minor code: 0  completed: No
org.omg.CORBA.TRANSACTION_ROLLEDBACK: javax.transaction.TransactionRolledbackException:    minor code: 0  completed: No
        at java.lang.reflect.Constructor.newInstance(Native Method)
        at com.ibm.CORBA.iiop.UtilDelegateImpl.copyObjectByProxy(UtilDelegateImpl.java:1163)
        at com.ibm.CORBA.iiop.UtilDelegateImpl.copyObject(UtilDelegateImpl.java:781)
        at javax.rmi.CORBA.Util.copyObject(Util.java:277)
        at com.ibm.websphere.startupservice._AppStartUp_Stub.start(Unknown Source)
        at com.ibm.ws.startupservice.StartBeanInfo.start(StartBeanInfo.java:255)
        at com.ibm.ws.startupservice.StartUpModule.start(StartUpModule.java:100)
        at com.ibm.ws.startupservice.StartUpApplication.start(StartUpApplication.java:101)
        at com.ibm.ws.startupservice.StartUpService.stateChanged(StartUpService.java:393)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:385)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:791)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:157)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:153)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:589)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:268)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:246)
        at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:543)
        at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:418)
        at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:126)
        at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:543)
        at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:418)
        at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
        at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
        at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
Avatar of damonf
damonf

I think this might be a threading issue.  Once you increase the number of sessions past 1, you may have multiple threads trying to access the same transactions.  I'd need to have a better idea of your design to be sure.  DB2 is sensitive about inserts, although I don't see a deadlock exception.
Avatar of prabudoss

ASKER

Thanks for your comments. We somehow addressed the issue in changing the transaction logic. Like intially we had a batch of 50 read/insert/update as one transaction with RequiresNew transaction attribute. Now we made each one read/insert/update as transaction with RequiresNew transaction attribute. This design works fine with 4 sessions on listener ports.
ASKER CERTIFIED SOLUTION
Avatar of Computer101
Computer101
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial