Igor, thanks for your help. My code has many places where a SLSB puts data into a DB, all with Transaction set as Required.

My app is basically like this (sorry for the ASCII art):

HttpServletRequest
|
V
HttpServlet
- Look up and start UserTransaction
- Translate and hand-off call to SLSB
|
V
Stateless SessionBean (TX=Required)
- Delegates work to Application processors
|
V
Application processors
- Some might do JDBC via DataSource; - Some might use CMP
| |
| |
V V
Custom JDBC CMP EntityBeans (TX=Required)

V
HttpServlet (Flow returns)
- If no errors, commit UserTransaction
- If errors, rollback UserTransaction


The JDBC work delegated to the application processors uses the same JNDI-looked-up DataSource as the CMP Entity Beans are configured to use. We also have a custom login module that uses the same JNDI looked up DataSource.

I will create a small test case as you mentioned. I just thought that describing how my app is set up might spark some thoughts from you or others though while I'm doing that.

I've used earlier version of JBoss (2.4.x) that do all of the above fine. Of course, that was with Oracle 8i + classes12.zip instead of 9i + ojdbc14.jar, and using jdk 1.3.1 instead of jdk 1.4.1.

Thanks again,
David

--

Igor Fedorenko escribió::
I've never tried it with UserTransaction. Could you check that basic container managed transaction works? (simple SSB that inserts one row into a db). If CMT works I'll look into UserTransaction issues.

-----Original Message-----
From: David Ward [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 16, 2003 12:11 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Could not enlist in transaction on entering
meta-aware object


I am getting the following error using jboss-3.2.0RC1_tomcat-4.1.18, JDK 1.4.1_01 hitting Oracle 9.2.0.1.0 (with initjvm), using the matching thin jdbc driver. All requests go through a servlet that wraps everything in a JNDI-looked-up UserTransaction.

"Could not enlist in transaction on entering meta-aware object"

Here is my oracle-xa-ds.xml:

<datasources>
<xa-datasource>
<jndi-name>MyDS</jndi-name>
<track-connection-by-tx>true</track-connection-by-tx>
<managedconnectionfactory-class>
org.jboss.resource.adapter.jdbc.xa.oracle.XAOracleManagedConnectionFactory
</managedconnectionfactory-class>
<xa-datasource-property name="URL">jdbc:oracle:thin:@foo:1521:bar</xa-datasource-property>
<xa-datasource-property name="User">user</xa-datasource-property>
<xa-datasource-property name="Password">password</xa-datasource-property>
</xa-datasource>
</datasources>

I changed transaction-service.xml to pad=true:

<mbean code="org.jboss.tm.XidFactory" name="jboss:service=XidFactory">
<attribute name="Pad">true</attribute>
</mbean>

Any ideas?

Thanks,
David


-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com
Understand how to protect your customers personal information by implementing
SSL on your Apache Web Server. Click here to get our FREE Thawte Apache
Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to