I'm having trouble working with UserTransactions from outside the jboss jvm. My situation is this: On application server A I have a servlet that performs some work via stateless session beans deployed on application server A. The servlet also performs some work via stateless session beans deployed on application server B. server A is weblogic, server B is jboss 3.0.6. Presumably I must have two separate transactions since the application servers are different, that's fine. the transaction on server A works fine, but when I attempt to begin a transaction on server B (jboss), I get the following error:
javax.transaction.SystemException: java.lang.RuntimeException: UT factory lookup failed: javax.naming.NameNotFoundException: 'UserTransactionSessionFactory'; remaining name 'UserTransactionSessionFactory'
at org.jboss.tm.usertx.client.ClientUserTransaction.begin(ClientUserTransaction.java:107)
The only information that i could find was a post on this list:
<snip>
- From: Scott M Stark
- Subject: Re: [JBoss-dev] UserTransaction requires jndi.properties???
- Date: Sun, 30 Mar 2003 08:20:53 -0800
Its just a limitiation of how the ClientUserTransaction will look to JNDI to
obtain the UserTransactionSessionFactory. This class should allow this info
to be assigned as a static property of the class so that ths
UserTransactionSessionFactory
can be looked up once from the JBoss JNDI namespace and set, or something like that.
</snip>
If I understand correctly, since ClientUserTransaction calls new InitalContext(), it'll pick up the InitialContext from the jvm in which it is running, in my case, server A's (weblogic) context. In my case, this is the incorrect context. Is there a work around?
Thanks
Greg
