David Ward wrote:
Using jboss-3.0.4_tomcat-4.1.12, JDK 1.4.1_01 on W2K, Linux, Solaris 9, hitting Oracle 9.2.0.1.0...To the best of my knowledge DataSource should do. JBoss correlates all ds.getConnection coming from the same transaction and returns references to the same physical db connection. XADataSource is necessary if you want to access more then one dabase or if your transactions include other resources, like, for example, JMS.
We have an app where all traffic goes through a single Servlet that wraps all application calls in a UserTransaction gotten from JNDI. All database work gets done through a single DataSource mapped in JNDI, but unforunately some of that jdbc work is done in CMP's, some in SLSB, and some (gasp) in JSP's. There is only one app server hitting one database, and we are using the latest ojdbc.jar (using thin) from Oracle.
My first question is, given the above scenario, do I have to use an XADataSource or is DataSource sufficient? We have upgraded our
architecture from JBoss 2.4.7 to 3.0.4, and in 2.4.7 we used XADataSource, though granted with the (I think Minerva?) wrapper. We also had to configure to use Oracle's Xid class, not sure if that's necessary now or not.You do not need Oracle Xid any more but you do need to configure XidFactory in transaction-service.xml to do "padding". 3.0 has some known problems working with oracle in xa, you should go to at least 3.2beta3.
My second question is, if we need to use an XADataSource, does oracle-xa-service.xml work in JBoss 3.0.4? I think I remember seeing some questionable threads on this list about it.
There are two issues here. First, there is a known problem with jdbc wrapper in 3.x -- it always reports "autocommit=on". This problem is fixed in 4.0 and should not cause any problems othen then confusion ;-). Second, "stuff" should not get committed before UserTransaction commits. If you could provide a simple example that demontrates this behaviour, I'd take a look.
The problem we're seeing now is that even though we're using a single UserTransaction around everything, it doesn't matter since Connections are being retured from the DataSource with autocommit ON, and stuff is being committed in the database before the UserTransaction commits it. I'm assuming this is because we're not using an XADataSource, but could I get by with a regular DataSource, but configure the oracle-service.xml somehow to hand out Connections with autocommit off? Trying to turn autocommit off programatically throws an Exception since the server realizes we're using a UserTransaction.
--
Igor Fedorenko
Think smart. Think automated. Think Dynamics.
www.thinkdynamics.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user