From: David W. <dav...@do...> - 2003-01-16 21:49:15
|
Igor, thanks for your help. My code has many places where a SLSB puts=20 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=3DRequired) - 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=3DRequired) V HttpServlet (Flow returns) - If no errors, commit UserTransaction - If errors, rollback UserTransaction The JDBC work delegated to the application processors uses the same=20 JNDI-looked-up DataSource as the CMP Entity Beans are configured to use.=20 We also have a custom login module that uses the same JNDI looked up=20 DataSource. I will create a small test case as you mentioned. I just thought that=20 describing how my app is set up might spark some thoughts from you or=20 others though while I'm doing that. I've used earlier version of JBoss (2.4.x) that do all of the above=20 fine. Of course, that was with Oracle 8i + classes12.zip instead of 9i=20 + ojdbc14.jar, and using jdk 1.3.1 instead of jdk 1.4.1. Thanks again, David -- Igor Fedorenko escribi=F3:: > I've never tried it with UserTransaction. Could you check that basic co= ntainer managed transaction works? (simple SSB that inserts one row into = a db). If CMT works I'll look into UserTransaction issues. >=20 > -----Original Message----- > From: David Ward [mailto:dav...@do...] > Sent: Thursday, January 16, 2003 12:11 PM > To: jbo...@li... > Subject: [JBoss-user] Could not enlist in transaction on entering > meta-aware object >=20 >=20 > I am getting the following error using jboss-3.2.0RC1_tomcat-4.1.18, JD= K=20 > 1.4.1_01 hitting Oracle 9.2.0.1.0 (with initjvm), using the matching=20 > thin jdbc driver. All requests go through a servlet that wraps=20 > everything in a JNDI-looked-up UserTransaction. >=20 > "Could not enlist in transaction on entering meta-aware object" >=20 > Here is my oracle-xa-ds.xml: >=20 > <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.XAOracleManagedConnectionFact= ory > </managedconnectionfactory-class> > <xa-datasource-property=20 > name=3D"URL">jdbc:oracle:thin:@foo:1521:bar</xa-datasource-property> > <xa-datasource-property name=3D"User">user</xa-datasource-property> > <xa-datasource-property name=3D"Password">password</xa-datasource-prope= rty> > </xa-datasource> > </datasources> >=20 > I changed transaction-service.xml to pad=3Dtrue: >=20 > <mbean code=3D"org.jboss.tm.XidFactory" name=3D"jboss:service=3DXidFact= ory"> > <attribute name=3D"Pad">true</attribute> > </mbean> >=20 > Any ideas? >=20 > Thanks, > David >=20 |