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.Rollback Exception
at com.ibm.ejs.jts.jta.Transa ctionImpl. registerSy nchronizat ion(Transa ctionImpl. java:993)
at com.ibm.ejs.jts.jta.JTSXA. registerSy nchronizat ion(JTSXA. java:1096)
at com.ibm.ejs.j2c.XATransact ionWrapper .addSync(X ATransacti onWrapper. java:256)
at com.ibm.ejs.j2c.Connection Manager.in itializeFo rUOW(Conne ctionManag er.java:90 6)
at com.ibm.ejs.j2c.Connection Manager.in volveMCInT ran(Connec tionManage r.java:723 )
at com.ibm.ejs.j2c.Connection Manager.al locateConn ection(Con nectionMan ager.java: 468)
at com.ibm.ws.rsadapter.jdbc. WSJdbcData Source.get Connection (WSJdbcDat aSource.ja va:215)
at com.ibm.ws.rsadapter.jdbc. WSJdbcData Source.get Connection (WSJdbcDat aSource.ja va:190)
at com.pmigroup.framework.per sistence.A pplConnect ionManager .getDBConn ection(App lConnectio nManager.j ava:341)
at com.pmigroup.framework.per sistence.A pplConnect ionManager .getDBConn ection(App lConnectio nManager.j ava:298)
at com.pmigroup.framework.per sistence.A pplDBPersi stence.get UserCtxBas edConnecti on(ApplDBP ersistence .java:76)
at com.pmigroup.framework.per sistence.A pplDBPersi stence.ret rieve(Appl DBPersiste nce.java:1 56)
at com.pmigroup.framework.per sistence.A pplQuery.e xecuteQuer yWithoutMa p(ApplQuer y.java:207 )
at com.pmigroup.framework.per sistence.A pplQuery.e xecuteQuer y(ApplQuer y.java:170 )
at com.pmigroup.pmifwrk.commo n.helper.P miFwrkCode ValueLoade r.refresh( PmiFwrkCod eValueLoad er.java:38 4)
at com.pmigroup.pmifwrk.commo n.helper.P miFwrkCode ValueLoade r.initiali ze(PmiFwrk CodeValueL oader.java :83)
at java.lang.reflect.Method.i nvoke(Nati ve Method)
at com.pmigroup.framework.boo tstrap.Fwr kEJBApplIn itializer. initialize Class(Fwrk EJBApplIni tializer.j ava:220)
at com.pmigroup.framework.boo tstrap.Fwr kEJBApplIn itializer. initialize (FwrkEJBAp plInitiali zer.java:1 83)
at com.pmigroup.framework.sta rtup.Start upBean.sta rt(Startup Bean.java: 67)
at com.ibm.websphere.startups ervice.EJS RemoteStat elessStart up_62d21f3 1.start(Un known Source)
at com.ibm.websphere.startups ervice._Ap pStartUp_S tub.start( Unknown Source)
at com.ibm.ws.startupservice. StartBeanI nfo.start( StartBeanI nfo.java:2 55)
at com.ibm.ws.startupservice. StartUpMod ule.start( StartUpMod ule.java:1 00)
at com.ibm.ws.startupservice. StartUpApp lication.s tart(Start UpApplicat ion.java:1 01)
at com.ibm.ws.startupservice. StartUpSer vice.state Changed(St artUpServi ce.java:39 3)
at com.ibm.ws.runtime.compone nt.Applica tionMgrImp l.stateCha nged(Appli cationMgrI mpl.java:3 85)
at com.ibm.ws.runtime.compone nt.Deploye dApplicati onImpl.fir eDeployedO bjectEvent (DeployedA pplication Impl.java: 791)
at com.ibm.ws.runtime.compone nt.Deploye dApplicati onImpl.set State(Depl oyedApplic ationImpl. java:157)
at com.ibm.ws.runtime.compone nt.Deploye dApplicati onImpl.set State(Depl oyedApplic ationImpl. java:153)
at com.ibm.ws.runtime.compone nt.Deploye dApplicati onImpl.sta rt(Deploye dApplicati onImpl.jav a:589)
at com.ibm.ws.runtime.compone nt.Applica tionMgrImp l.startApp lication(A pplication MgrImpl.ja va:268)
at com.ibm.ws.runtime.compone nt.Applica tionMgrImp l.start(Ap plicationM grImpl.jav a:246)
at com.ibm.ws.runtime.compone nt.Contain erImpl.sta rtComponen ts(Contain erImpl.jav a:543)
at com.ibm.ws.runtime.compone nt.Contain erImpl.sta rt(Contain erImpl.jav a:418)
at com.ibm.ws.runtime.compone nt.Applica tionServer Impl.start (Applicati onServerIm pl.java:12 6)
at com.ibm.ws.runtime.compone nt.Contain erImpl.sta rtComponen ts(Contain erImpl.jav a:543)
at com.ibm.ws.runtime.compone nt.Contain erImpl.sta rt(Contain erImpl.jav a:418)
at com.ibm.ws.runtime.compone nt.ServerI mpl.start( ServerImpl .java:183)
at com.ibm.ws.runtime.WsServe r.start(Ws Server.jav a:128)
at com.ibm.ws.runtime.WsServe r.main(WsS erver.java :225)
at java.lang.reflect.Method.i nvoke(Nati ve Method)
at com.ibm.ws.bootstrap.WSLau ncher.main (WSLaunche r.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/star tupservice /AppStartU pHome, exception was javax.transaction.Transact ionRolledb ackExcepti on: CORBA TRANSACTION_ROLLEDBACK 0x0 No; nested exception is:
org.omg.CORBA.TRANSACTION_ ROLLEDBACK : javax.transaction.Transact ionRolledb ackExcepti on: minor code: 0 completed: No
org.omg.CORBA.TRANSACTION_ ROLLEDBACK : javax.transaction.Transact ionRolledb ackExcepti on: minor code: 0 completed: No
at java.lang.reflect.Construc tor.newIns tance(Nati ve Method)
at com.ibm.CORBA.iiop.UtilDel egateImpl. copyObject ByProxy(Ut ilDelegate Impl.java: 1163)
at com.ibm.CORBA.iiop.UtilDel egateImpl. copyObject (UtilDeleg ateImpl.ja va:781)
at javax.rmi.CORBA.Util.copyO bject(Util .java:277)
at com.ibm.websphere.startups ervice._Ap pStartUp_S tub.start( Unknown Source)
at com.ibm.ws.startupservice. StartBeanI nfo.start( StartBeanI nfo.java:2 55)
at com.ibm.ws.startupservice. StartUpMod ule.start( StartUpMod ule.java:1 00)
at com.ibm.ws.startupservice. StartUpApp lication.s tart(Start UpApplicat ion.java:1 01)
at com.ibm.ws.startupservice. StartUpSer vice.state Changed(St artUpServi ce.java:39 3)
at com.ibm.ws.runtime.compone nt.Applica tionMgrImp l.stateCha nged(Appli cationMgrI mpl.java:3 85)
at com.ibm.ws.runtime.compone nt.Deploye dApplicati onImpl.fir eDeployedO bjectEvent (DeployedA pplication Impl.java: 791)
at com.ibm.ws.runtime.compone nt.Deploye dApplicati onImpl.set State(Depl oyedApplic ationImpl. java:157)
at com.ibm.ws.runtime.compone nt.Deploye dApplicati onImpl.set State(Depl oyedApplic ationImpl. java:153)
at com.ibm.ws.runtime.compone nt.Deploye dApplicati onImpl.sta rt(Deploye dApplicati onImpl.jav a:589)
at com.ibm.ws.runtime.compone nt.Applica tionMgrImp l.startApp lication(A pplication MgrImpl.ja va:268)
at com.ibm.ws.runtime.compone nt.Applica tionMgrImp l.start(Ap plicationM grImpl.jav a:246)
at com.ibm.ws.runtime.compone nt.Contain erImpl.sta rtComponen ts(Contain erImpl.jav a:543)
at com.ibm.ws.runtime.compone nt.Contain erImpl.sta rt(Contain erImpl.jav a:418)
at com.ibm.ws.runtime.compone nt.Applica tionServer Impl.start (Applicati onServerIm pl.java:12 6)
at com.ibm.ws.runtime.compone nt.Contain erImpl.sta rtComponen ts(Contain erImpl.jav a:543)
at com.ibm.ws.runtime.compone nt.Contain erImpl.sta rt(Contain erImpl.jav a:418)
at com.ibm.ws.runtime.compone nt.ServerI mpl.start( ServerImpl .java:183)
at com.ibm.ws.runtime.WsServe r.start(Ws Server.jav a:128)
at com.ibm.ws.runtime.WsServe r.main(WsS erver.java :225)
at java.lang.reflect.Method.i nvoke(Nati ve Method)
at com.ibm.ws.bootstrap.WSLau ncher.main (WSLaunche r.java:94)
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.Rollback
at com.ibm.ejs.jts.jta.Transa
at com.ibm.ejs.jts.jta.JTSXA.
at com.ibm.ejs.j2c.XATransact
at com.ibm.ejs.j2c.Connection
at com.ibm.ejs.j2c.Connection
at com.ibm.ejs.j2c.Connection
at com.ibm.ws.rsadapter.jdbc.
at com.ibm.ws.rsadapter.jdbc.
at com.pmigroup.framework.per
at com.pmigroup.framework.per
at com.pmigroup.framework.per
at com.pmigroup.framework.per
at com.pmigroup.framework.per
at com.pmigroup.framework.per
at com.pmigroup.pmifwrk.commo
at com.pmigroup.pmifwrk.commo
at java.lang.reflect.Method.i
at com.pmigroup.framework.boo
at com.pmigroup.framework.boo
at com.pmigroup.framework.sta
at com.ibm.websphere.startups
at com.ibm.websphere.startups
at com.ibm.ws.startupservice.
at com.ibm.ws.startupservice.
at com.ibm.ws.startupservice.
at com.ibm.ws.startupservice.
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.WsServe
at com.ibm.ws.runtime.WsServe
at java.lang.reflect.Method.i
at com.ibm.ws.bootstrap.WSLau
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/star
org.omg.CORBA.TRANSACTION_
org.omg.CORBA.TRANSACTION_
at java.lang.reflect.Construc
at com.ibm.CORBA.iiop.UtilDel
at com.ibm.CORBA.iiop.UtilDel
at javax.rmi.CORBA.Util.copyO
at com.ibm.websphere.startups
at com.ibm.ws.startupservice.
at com.ibm.ws.startupservice.
at com.ibm.ws.startupservice.
at com.ibm.ws.startupservice.
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.compone
at com.ibm.ws.runtime.WsServe
at com.ibm.ws.runtime.WsServe
at java.lang.reflect.Method.i
at com.ibm.ws.bootstrap.WSLau
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.