javax.naming.NameNotFoundException: UserTransaction
kc7bfi Jan 11, 2012 12:10 PMI have a SAR that is trying to begin a transaction. I try to get the UserTransaction object as:
tx = (UserTransaction)new InitialContext().lookup("UserTransaction");
but I get a javax.naming.NameNotFoundException: UserTransaction error. My jboss-deployment-structure.xml is
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="deployment.module.nested" export="true"/>
<module name="org.apache.commons.codec" export="true"/>
<module name="org.apache.commons.lang" export="true"/>
<module name="org.apache.commons.logging" export="true"/>
<module name="org.infinispan" export="true"/>
<module name="org.jboss.as.clustering.api" export="true"/>
<module name="org.jboss.as.clustering.impl" export="true"/>
<module name="org.jboss.as.clustering.infinispan" export="true"/>
<module name="org.jboss.as.clustering.service" export="true"/>
<module name="org.jboss.as.clustering.singleton" export="true"/>
<module name="org.jboss.as.server" export="true"/>
<module name="org.jboss.msc" export="true"/>
<module name="org.slf4j" export="true"/>
</dependencies>
</deployment>
<module name="deployment.module.nested">
<resources>
<resource-root path="activation-1.1.1.jar"/>
<resource-root path="concurrent-1.3.4.jar"/>
<resource-root path="DataGateway-ClientKit-2.0.jar"/>
<resource-root path="DataGateway-EDXL-1.0.jar"/>
<resource-root path="DataGateway-Toolkit-1.0.jar"/>
<resource-root path="hsqldb-1.8.0.7.jar"/>
<resource-root path="jzlib-1.0.7.jar"/>
<resource-root path="VATVD-DGListener-1.0.jar"/>
<resource-root path="xmlBlaster-1.6.2.1.jar"/>
</resources>
</module>
</jboss-deployment-structure>
I do not see the UserTransaction bound to JNDI in the server.log. Is there some dependency that I need to force the UserTransaction to startup and bind to JNDI?
Thanks, David