Bean A is not really needed. The test was originally intended to test some of the typical behaviors of an EJB such as call another bean, talk to the database, etc. I just tested without bean A and got the same behavior. I'm testing with 50 client threads. It seems to take a high number of threads to get the behavior. This makes me think it is a concurrency issue that is uncommon under lower load.
I also find that about 1 in every 10 runs I get this oddball exception. I wonder if this one is a concurrency problem when 2 connections are created at the same time. I know that Weblogic has a workaround for a problem like this. You can tell the Weblogic pool to serialize connection creation and to put a delay between creation of connections. The way I deal with this exception right now is to restart the server with no changes and hope it goes away. Usually it does. 2003-01-22 15:19:23,646 ERROR [STDERR] org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: Invalid Oracl e URL specified: OracleDataSource.makeURL); - nested throwable: (org.jboss.resou rce.ResourceException: Could not create connection; - nested throwable: (java.sq l.SQLException: Invalid Oracle URL specified: OracleDataSource.makeURL)) 2003-01-22 15:19:23,646 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.Wrapp erDataSource.getConnection(WrapperDataSource.java:106) 2003-01-22 15:19:23,647 ERROR [STDERR] at com.synxis.srms.ejbs.util.ServicesLoc ator.getJdbcConnection(ServicesLocator.java:266) 2003-01-22 15:19:23,647 ERROR [STDERR] at com.synxis.srms.ejbs.junit.SrmsTestSe rviceBean.containerTestInner(SrmsTestServiceBean.java:309) 2003-01-22 15:19:23,647 ERROR [STDERR] at java.lang.reflect.Method.invoke(Nativ e Method) 2003-01-22 15:19:23,647 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContain er$ContainerInterceptor.invoke(StatelessSessionContainer.java:606) 2003-01-22 15:19:23,648 ERROR [STDERR] at org.jboss.resource.connectionmanager. CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) 2003-01-22 15:19:23,648 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessio nInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77) 2003-01-22 15:19:23,648 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInter ceptor.invokeNext(AbstractTxInterceptor.java:108) 2003-01-22 15:19:23,649 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCM T.runWithTransactions(TxInterceptorCMT.java:237) 2003-01-22 15:19:23,649 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCM T.invoke(TxInterceptorCMT.java:101) 2003-01-22 15:19:23,649 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterce ptor.invoke(SecurityInterceptor.java:130) 2003-01-22 15:19:23,649 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor. invoke(LogInterceptor.java:204) 2003-01-22 15:19:23,650 ERROR [STDERR] at org.jboss.ejb.plugins.CleanShutdownIn terceptor.invoke(CleanShutdownInterceptor.java:265) 2003-01-22 15:19:23,651 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFin derInterceptor.invoke(ProxyFactoryFinderInterceptor.java:154) 2003-01-22 15:19:23,651 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContain er.invoke(StatelessSessionContainer.java:303) 2003-01-22 15:19:23,651 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Contai ner.java:680) 2003-01-22 15:19:23,651 ERROR [STDERR] at org.jboss.mx.server.MBeanServerImpl.i nvoke(MBeanServerImpl.java:549) 2003-01-22 15:19:23,652 ERROR [STDERR] at org.jboss.invocation.local.LocalInvok er.invoke(LocalInvoker.java:100) 2003-01-22 15:19:23,652 INFO [STDOUT] SrmsTestServiceBean.containerTest(13:0:0, 200, 800) begin 2003-01-22 15:19:23,652 ERROR [STDERR] at org.jboss.invocation.InvokerIntercept or.invoke(InvokerInterceptor.java:88) 2003-01-22 15:19:23,653 ERROR [STDERR] at org.jboss.proxy.TransactionIntercepto r.invoke(TransactionInterceptor.java:77) 2003-01-22 15:19:23,653 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.i nvoke(SecurityInterceptor.java:80) 2003-01-22 15:19:23,653 INFO [STDOUT] containerTestInner(13:0:0, 200, 800) begi n 2003-01-22 15:19:23,653 ERROR [STDERR] at org.jboss.proxy.ejb.StatelessSessionI nterceptor.invoke(StatelessSessionInterceptor.java:109) 2003-01-22 15:19:23,654 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invok e(ClientContainer.java:82) 2003-01-22 15:19:23,654 ERROR [STDERR] at $Proxy78.containerTestInner(Unknown S ource) Thanks, Matt Cleveland ----- Original Message ----- From: "Igor Fedorenko" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 21, 2003 4:35 PM Subject: Re: [JBoss-dev] 3.2RC1 Oracle XA Problem > This sounds like a bug. In order to set up similar test case, can you > explain how many threads run on a client and why do you need bean A. > > Matt Cleveland wrote: > > I'm running into a problem with Oracle XA in 3.2RC1. I'm asking here > > first because I know there are a bunch of frequent problems with the > > Oracle XA driver and I know some of them are supposed to be fixed in > > 3.2RC1 and I want to see if anyone has experience with this problem. > > > > I have a really simple test. I have a client that starts up N threads. > > Each thread calls bean A. Bean A calls bean B and bean B gets an Oracle > > connection (from an XA pool) and inserts a record into the database and > > then closes the connection and returns. This all works fine under lower > > load, but gets the stack trace below occasionally under heavy load. In > > some cases I then start getting "ORA-01591: lock held by in-doubt > > distributed transaction" on Oracle calls after the error. > > > > I've tried with and without TrackConnectionByTx. My oracle-xa-ds.xml is > > pasted below the stack trace. Is this a bug or am I missing something? > > > > 2003-01-21 21:42:09,141 WARN [org.jboss.tm.TransactionImpl] > > XAException: tx=Tra > > nsactionImpl:XidImpl [FormatId=257, GlobalId=malt//1809, BranchQual=] > > errorCode= > > XAER_RMERR > > oracle.jdbc.xa.OracleXAException > > at > > oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157 > > ) > > at > > oracle.jdbc.xa.client.OracleXAResource.commit(OracleXAResource.java:5 > > 90) > > at > > org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.commit(XAManag > > edConnection.java:140) > > at > > org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:142 > > 0) > > at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:349) > > at > > org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCM > > T.java:361) > > at > > org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep > > torCMT.java:247) > > at > > org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1 > > 01) > > at > > org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor. > > java:130) > > at > > org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204) > > at > > org.jboss.ejb.plugins.CleanShutdownInterceptor.invoke(CleanShutdownIn > > terceptor.java:265) > > at > > org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto > > ryFinderInterceptor.java:154) > > at > > org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContai > > ner.java:303) > > at org.jboss.ejb.Container.invoke(Container.java:680) > > at > > org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) > > at > > org.jboss.invocation.jrmp.server.JRMPInvokerHA.invoke(JRMPInvokerHA.j > > ava:163) > > at java.lang.reflect.Method.invoke(Native Method) > > at > > sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:236) > > at sun.rmi.transport.Transport$1.run(Transport.java:147) > > at java.security.AccessController.doPrivileged(Native Method) > > at sun.rmi.transport.Transport.serviceCall(Transport.java:143) > > at > > sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4 > > 60) > > at > > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport > > .java:701) > > at java.lang.Thread.run(Thread.java:479) > > > > oracle-xa-ds > > ------------------ > > <?xml version="1.0" encoding="UTF-8"?> > > > > <datasources> > > <xa-datasource> > > <jndi-name>XaOracleDS</jndi-name> > > <track-connection-by-tx>true</track-connection-by-tx> > > > > <managedconnectionfactory-class>org.jboss.resource.adapter.jdbc.xa.oracle.XA OracleManagedConnectionFactory</managedconnectionfactory-class> > > > > <!--xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasou rce-class--> > > <xa-datasource-property > > name="URL">jdbc:oracle:thin@server:port:sid</xa-datasource-property> > > <xa-datasource-property name="User">scott</xa-datasource-property> > > <xa-datasource-property name="Password">tiger</xa-datasource-property> > > <min-pool-size>0</min-pool-size> > > <max-pool-size>50</max-pool-size> > > <blocking-timeout-millis>20000</blocking-timeout-millis> > > <idle-timeout-minutes>15</idle-timeout-minutes> > > </xa-datasource> > > </datasources> > > > > Thanks, > > Matt Cleveland > > -- > Igor Fedorenko > Think smart. Think automated. Think Dynamics. > www.thinkdynamics.com > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Scholarships for Techies! > Can't afford IT training? All 2003 ictp students receive scholarships. > Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. > www.ictp.com/training/sourceforge.asp > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development ------------------------------------------------------- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
