Try changing this line:
ses = (Session) ctx.lookup("ws1/SessionTestBean/remote");
ses = (Session) ctx.lookup("SessionTestBean/remote");
How you deployed it?
ws1.ear or ?
ejb3 deployer deploys with jndi name as ..
Thanks, that´s the solution.
the ear file had a different name. After renaming everything works fine!
I ran into the same run-time error when trying the JBoss turtorial TrailEJB3.
I like to test out a very simple ejb3 case. Can you send me a little more details of your test code including directory structrue, build script etc.?
Thanks in advance!
The JMX Console will tell you where your objects are being stored...
Hit http://[servername]:8080/jmx-console (by default), find JNDIView, and print out the tree to see where everything is.
Also, in order to ensure your EJBs maintain the same JNDI name no matter the packaging, you can use @LocalBinding and @RemoteBinding to declare the location.
Thanks for your quick reply, but I don't have a ear file to be deployed yet.
I am looking for sample EJB3 java code that comes with build script.