Hi L,
Success at last after having upgraded JBoss to 4.0.5 (full support for EJB 3.0) which may
have fixed the problem. Anyhow the main sticking point was not referencing TravelAgentBean
correctly using JNDI. Below is the only slight modification needed from the original code
from the Client:
Context ctx = getInitialContext();
| Object ref = (TravelAgentRemote)
ctx.lookup("TravelAgentBean/remote");
| TravelAgentRemote dao = (TravelAgentRemote)
| PortableRemoteObject.narrow(ref,TravelAgentRemote.class);
or
InitialContext ctx = new InitialContext();
| TravelAgentRemote dao = (TravelAgentRemote)
ctx.lookup("TravelAgentBean/remote");
No need for any JNDI bootstraping properties as in EJB 2.1 or earlier.
Likewise, I didn't need these libraries in the Client's classpath either:
/client/jboss-j2ee.jar
/client/jbossall-client.jar
/server/default/lib/jnpserver.jar
/lib/jboss-common.jar.
I also learnt a lot on creating EJB using Netbeans & JBoss to lookup JNDI that was
largely my problem.
Again a Big thank you for all your suggestions,
Henry
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4015534#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...