I made the changes you suggested, but with no luck. I was still using the
OCI driver, so I also tried the thin driver. But no luck. Here is a dump
of my log file with some print statements and tracing of the datasource
enabled.
The code basically sees if a Product exists, then either UPDATES or INSERTS it,
then it finds the highest numbered DocumentVersion and creates a new one with
the highest number + 1. Then DocumentParts are created under the new version.
DocumentLoader is a session bean, all of the others are entity beans.
What is distrubing to me is that all of my stuff seems to use the same connection
oracle.jdbc.xa.client.OracleXAConnection@238f4 but I get many different
oracle.jdbc.xa.client.OracleXAResources. Should'nt I be getting the
same Resource consistently. It's almost like everything is it's own distributed
transaction.
Thanks
Dave
[Default] jBoss 2.0 FINAL Started
[EmbeddedTomcat] path="/staff" :Controller: init
[ddc/Product] ProductEJB.ejbFindByPrimaryKey() getting connection
[ddc/Product] getConnection() getting from datasource
[StaffingDB] Resource 'oracle.jdbc.xa.client.OracleXAResource@472243' enlisted for 'oracle.jdbc.xa.client.OracleXAConnection@238f4'.
[StaffingDB] Pool StaffingDB [1/25/500] gave out pooled object: oracle.jdbc.xa.client.OracleXAConnection@238f4
[ddc/Product] ProductEJB.ejbFindByPrimaryKey() got connection
[ddc/Product] ProductEJB.ejbFindByPrimaryKey() freeing connection
[StaffingDB] Pool StaffingDB [0/25/500] returned object oracle.jdbc.xa.client.OracleXAConnection@238f4 to the pool.
[ddc/Product] ProductEJB.ejbCreate()
[ddc/Product] getConnection() getting from datasource
[StaffingDB] Resource 'oracle.jdbc.xa.client.OracleXAResource@5c9766' enlisted for 'oracle.jdbc.xa.client.OracleXAConnection@238f4'.
[StaffingDB] Pool StaffingDB [1/25/500] gave out pooled object: oracle.jdbc.xa.client.OracleXAConnection@238f4
[ddc/Product] ProductEJB.ejbCreate() connection obtained
[ddc/Product] ProductEJB.ejbCreate() releasing connection
[StaffingDB] Pool StaffingDB [0/25/500] returned object oracle.jdbc.xa.client.OracleXAConnection@238f4 to the pool.
[ddc/DocumentVersion] DocumentVersionEJB.findLatestVersion getting connection
[ddc/DocumentVersion] getConnection() getting from datasource
[StaffingDB] Resource 'oracle.jdbc.xa.client.OracleXAResource@58ca48' enlisted for 'oracle.jdbc.xa.client.OracleXAConnection@238f4'.
[StaffingDB] Pool StaffingDB [1/25/500] gave out pooled object: oracle.jdbc.xa.client.OracleXAConnection@238f4
[ddc/DocumentVersion] DocumentVersionEJB.findLatestVersion got connection
[ddc/DocumentVersion] DocumentVersionEJB.findLatestVersion dropping connection
[StaffingDB] Pool StaffingDB [0/25/500] returned object oracle.jdbc.xa.client.OracleXAConnection@238f4 to the pool.
[ddc/DocumentVersion] DocumentVersionEJB.ejbCreate() getting connection
[ddc/DocumentVersion] getConnection() getting from datasource
[StaffingDB] Resource 'oracle.jdbc.xa.client.OracleXAResource@46b6db' enlisted for 'oracle.jdbc.xa.client.OracleXAConnection@238f4'.
[StaffingDB] Pool StaffingDB [1/25/500] gave out pooled object: oracle.jdbc.xa.client.OracleXAConnection@238f4
[ddc/DocumentVersion] DocumentVersionEJB.ejbCreate() got connection
[ddc/DocumentVersion] DocumentVersionEJB.ejbCreate() first INSERT
[ddc/DocumentVersion] DocumentVersionEJB.ejbCreate() dropping connection
[StaffingDB] Pool StaffingDB [0/25/500] returned object oracle.jdbc.xa.client.OracleXAConnection@238f4 to the pool.
[ddc/DocumentLoader] Failed to create version ORA-02049: timeout: distributed transaction waiting for lock
[ddc/DocumentPart] DocumentPartEJB.ejbCreate() getting connection
[ddc/DocumentPart] getConnection() getting from datasource
[ddc/DocumentPart] javax.transaction.RollbackException: Already marked for rollback
[ddc/DocumentPart] at org.jboss.tm.TxCapsule.enlistResource(TxCapsule.java:543)
[ddc/DocumentPart] at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:114)
[ddc/DocumentPart] at org.jboss.minerva.factories.XAConnectionFactory.prepareObject(XAConnectionFactory.java:254)
[ddc/DocumentPart] at org.jboss.minerva.pools.ObjectPool.getObject(ObjectPool.java:539)
[ddc/DocumentPart] at org.jboss.minerva.datasource.XAPoolDataSource.getConnection(XAPoolDataSource.java:169)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.ejb.DocumentPartEJB.getConnection(DocumentPartEJB.java:755)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.ejb.DocumentPartEJB.ejbCreate(DocumentPartEJB.java:68)
[ddc/DocumentPart] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentPart] at org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManager.java:120)
[ddc/DocumentPart] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
[ddc/DocumentPart] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentPart] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
[ddc/DocumentPart] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
[ddc/DocumentPart] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:86)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[ddc/DocumentPart] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:126)
[ddc/DocumentPart] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[ddc/DocumentPart] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:200)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:198)
[ddc/DocumentPart] at $Proxy11.create(Unknown Source)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.ejb.DocumentLoaderEJB.createPart(DocumentLoaderEJB.java:498)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.ejb.DocumentLoaderEJB.processDocument(DocumentLoaderEJB.java:229)
[ddc/DocumentPart] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentPart] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:472)
[ddc/DocumentPart] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:87)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[ddc/DocumentPart] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:144)
[ddc/DocumentPart] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
[ddc/DocumentPart] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:271)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:163)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:228)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:152)
[ddc/DocumentPart] at $Proxy7.processDocument(Unknown Source)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.controller.LoadDocumentCommand.execute(LoadDocumentCommand.java:40)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.controller.Controller.handleRequest(Controller.java:73)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.controller.Controller.doPost(Controller.java:56)
[ddc/DocumentPart] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[ddc/DocumentPart] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[ddc/DocumentPart] at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
[ddc/DocumentPart] at org.apache.tomcat.core.Handler.service(Handler.java:286)
[ddc/DocumentPart] at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
[ddc/DocumentPart] at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
[ddc/DocumentPart] at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
[ddc/DocumentPart] at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
[ddc/DocumentPart] at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
[ddc/DocumentPart] at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
[ddc/DocumentPart] at java.lang.Thread.run(Thread.java:484)
[ddc/DocumentPart] java.lang.RuntimeException: Unable to register with TransactionManager: javax.transaction.RollbackException: Already marked for rollback
[ddc/DocumentPart] at org.jboss.minerva.factories.XAConnectionFactory.prepareObject(XAConnectionFactory.java:262)
[ddc/DocumentPart] at org.jboss.minerva.pools.ObjectPool.getObject(ObjectPool.java:539)
[ddc/DocumentPart] at org.jboss.minerva.datasource.XAPoolDataSource.getConnection(XAPoolDataSource.java:169)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.ejb.DocumentPartEJB.getConnection(DocumentPartEJB.java:755)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.ejb.DocumentPartEJB.ejbCreate(DocumentPartEJB.java:68)
[ddc/DocumentPart] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentPart] at org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManager.java:120)
[ddc/DocumentPart] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
[ddc/DocumentPart] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentPart] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
[ddc/DocumentPart] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
[ddc/DocumentPart] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:86)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[ddc/DocumentPart] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:126)
[ddc/DocumentPart] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[ddc/DocumentPart] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:200)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:198)
[ddc/DocumentPart] at $Proxy11.create(Unknown Source)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.ejb.DocumentLoaderEJB.createPart(DocumentLoaderEJB.java:498)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.ejb.DocumentLoaderEJB.processDocument(DocumentLoaderEJB.java:229)
[ddc/DocumentPart] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentPart] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:472)
[ddc/DocumentPart] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:87)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
[ddc/DocumentPart] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[ddc/DocumentPart] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:144)
[ddc/DocumentPart] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
[ddc/DocumentPart] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:271)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:163)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:228)
[ddc/DocumentPart] at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:152)
[ddc/DocumentPart] at $Proxy7.processDocument(Unknown Source)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.controller.LoadDocumentCommand.execute(LoadDocumentCommand.java:40)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.controller.Controller.handleRequest(Controller.java:73)
[ddc/DocumentPart] at mil.army.atsc.atia.ddc.controller.Controller.doPost(Controller.java:56)
[ddc/DocumentPart] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[ddc/DocumentPart] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[ddc/DocumentPart] at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
[ddc/DocumentPart] at org.apache.tomcat.core.Handler.service(Handler.java:286)
[ddc/DocumentPart] at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
[ddc/DocumentPart] at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
[ddc/DocumentPart] at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
[ddc/DocumentPart] at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
[ddc/DocumentPart] at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
[ddc/DocumentPart] at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
[ddc/DocumentPart] at java.lang.Thread.run(Thread.java:484)
[ddc/DocumentPart] DocumentPartEJB.ejbCreate() drop connection
[ddc/DocumentLoader] Failed to create part Unable to register with TransactionManager: javax.transaction.RollbackException: Already marked for rollback
[ddc/DocumentLoader] TRANSACTION ROLLBACK EXCEPTION:null; nested exception is:
javax.ejb.EJBException
[ddc/DocumentLoader] javax.ejb.CreateException: Failed to create part Unable to register with TransactionManager: javax.transaction.RollbackException: Already marked for rollback
[ddc/DocumentLoader] at mil.army.atsc.atia.ddc.ejb.DocumentPartEJB.ejbCreate(DocumentPartEJB.java:123)
[ddc/DocumentLoader] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.BMPPersistenceManager.createEntity(BMPPersistenceManager.java:120)
[ddc/DocumentLoader] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:441)
[ddc/DocumentLoader] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentLoader] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:86)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:126)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[ddc/DocumentLoader] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:200)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:198)
[ddc/DocumentLoader] at $Proxy11.create(Unknown Source)
[ddc/DocumentLoader] at mil.army.atsc.atia.ddc.ejb.DocumentLoaderEJB.createPart(DocumentLoaderEJB.java:498)
[ddc/DocumentLoader] at mil.army.atsc.atia.ddc.ejb.DocumentLoaderEJB.processDocument(DocumentLoaderEJB.java:229)
[ddc/DocumentLoader] at java.lang.reflect.Method.invoke(Native Method)
[ddc/DocumentLoader] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:472)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:87)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:144)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
[ddc/DocumentLoader] at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:271)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:163)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:228)
[ddc/DocumentLoader] at org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:152)
[ddc/DocumentLoader] at $Proxy7.processDocument(Unknown Source)
[ddc/DocumentLoader] at mil.army.atsc.atia.ddc.controller.LoadDocumentCommand.execute(LoadDocumentCommand.java:40)
[ddc/DocumentLoader] at mil.army.atsc.atia.ddc.controller.Controller.handleRequest(Controller.java:73)
[ddc/DocumentLoader] at mil.army.atsc.atia.ddc.controller.Controller.doPost(Controller.java:56)
[ddc/DocumentLoader] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
[ddc/DocumentLoader] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[ddc/DocumentLoader] at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
[ddc/DocumentLoader] at org.apache.tomcat.core.Handler.service(Handler.java:286)
[ddc/DocumentLoader] at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
[ddc/DocumentLoader] at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
[ddc/DocumentLoader] at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
[ddc/DocumentLoader] at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
[ddc/DocumentLoader] at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
[ddc/DocumentLoader] at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
[ddc/DocumentLoader] at java.lang.Thread.run(Thread.java:484)
[EmbeddedTomcat] javax.transaction.TransactionRolledbackException: null; nested exception is:
javax.ejb.EJBException
-----Original Message-----
From: Jean-Michel DELSAUX [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 25, 2001 7:15 AM
To: [EMAIL PROTECTED]
Subject: Re: [jBoss-User] JBOSS and Oracle
Hi,
I use Oracle 8.1.7 and its thin driver. For BMP, it runs. It tooks such a
long time to find the solution but now, it is OK.
For CMP use, i have still a couple of problems but i start a new testing
session ;-) ...
I use Win2000 and jboss 2.0 final
The main thing i got was "id may not be null" The mistake was in my code
when i getConnection. Here is the good code:
private Connection getConnection() throws SQLException {
DataSource ds = null;
try {
Context ctx = new InitialContext();
ds = (DataSource)ctx.lookup("java:/oracleDB");
} catch(NamingException ne) {
} finally {
return ds.getConnection();
}
}
Perhaps this could help somebody
JMi
----Original Message Follows----
From: Ole Husgaard <[EMAIL PROTECTED]>
Reply-To: "jBoss" <[EMAIL PROTECTED]>
To: jBoss <[EMAIL PROTECTED]>
Subject: Re: [jBoss-User] JBOSS and Oracle
Date: Thu, 25 Jan 2001 11:57:54 +0100
MIME-Version: 1.0
Received: from [205.227.191.14] by hotmail.com (3.2) with ESMTP id
MHotMailBC3950B5000DD821EED5CDE3BF0ED0F60; Thu Jan 25 02:54:10 2001
Received: from sparre.dk by cgi.clearink.com with SMTP; Thu, 25 Jan 2001
02:29:58 -0800
From [EMAIL PROTECTED] Thu Jan 25 02:56:09 2001
Sender: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Organization: Sparre Software
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i586)
X-Accept-Language: da,sv,no,de
References:
<[EMAIL PROTECTED]>
Precedence: Bulk
List-Software: LetterRip Pro 3.0.7 by Fog City Software, Inc.
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Digest: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
Hi,
> "Bolt, Dave" wrote:
> I've tried the 8.1.7 drivers against the 8.1.6 database both with and
without the
> jboss.conf change. The end result is no difference. I've downloaded the
8.1.7 server
> too, but we haven't installed it anywhere as a test.
>
> Another user suggested that I try the OCI driver instead of the thin
driver. I've
> placed the following URL in my jboss.jcml file for my datasource
Since Darius Davidavicius has the 8.1.6 OCI driver
working, it must be possible to make that work for
other people.
Darius has classes12.zip in the CLASSPATH, and having
it in the boot class path should work too. However, I
am not sure if declaring it in the MLET will work.
Please try to remove classes12.zip from your MLET
declaration, and add it to your CLASSPATH, or copy
it to lib/ext.
> As another test, we were going to try another DB server (PostGresQL) if
we could find
> one that claimed to have true XA support, to see if it really is an
Oracle problem.
Being a PostgreSQL user, I had a look at the source
of the early XA driver. It looked to me like it just
did the same hack as the Minerva XA driver shim, so
I stayed with Minerva XA over non-XA PostgreSQL driver.
Don't know if this has changed.
But I guess it should work, except maybe for the
isolation problem if the PostgreSQL XA drivers still
work like the Minerva XA shim.
> The only other issue, is that it could be something in my code. For
reference here is the
> code that is getting the connection from JNDI. I am turning off
autocommit manually, because
> I saw somewhere that the pool provided connections with autocommit ON.
It makes sense to turn autocommit off, but that could
also be the source of your problem: The error message
of your second problem indicates that Oracle may be
using some kind of master connection to control the XA
transaction, and hand out subordinate connections to
the user. The transactions in the subordinate
connections would then be nested transactions to the
XA transaction controlled by JBoss and a hidden Oracle
master connection.
Not sure if this is true. But if it is, I guess turning
off autocommit on your connections could result in your
isolation problem.
I would try the OCI driver without changing the
autocommit property of the connections.
Please let us know how this works out, even if your
problems disappear. Seems like there are lots of
people currently having problems with the Oracle XA
datasource.
Best Regards,
Ole Husgaard.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]
