I tried this and it failed. I get the following error:
java.lang.NoClassDefFoundError: org/jnp/server/NamingServer
Any idea what I am doing wrong? I copied the suggested code.
Thanks,
Jim
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=3835384#3835384
Reply
Hi,
If you use a standalone Tomcat server, it depends on the version but it does not have
a native JTA driver. Verify you have Tyrex installed and check Tomcat documentation to
use it.
Pascal
View the original post :
http://www.jboss.org/index.html?module=bbop=viewtopicp=3835409#3835409
InitialContext initial = new InitialContext();
UserTransaction transaction = (UserTransaction)
initial.lookup(java:comp/UserTransaction);
YourSessionAhome homeA = (YourSessionAHome)
javax.rmi.PortableRemoteObject.narrow(initial.lookup(java:comp/env/ejb/SampleA),
YourSessionAHome.class);