Dear all,
How do I lookup for an EJB on Jboss 4.0?
This is the code I write:
| InitialContext ctx=new InitialContext();
| Context ref=(Context)ctx.lookup("java:comp/env/ejb");
|
| DepartmentHome
home=(DepartmentHome)ref.lookup("DepartmentHome");
| Department ejb=home.create();
|
| System.out.println(ejb.getName());
|
This is my JNDI_NAME and COMP_NAME:
anonymous wrote : public static final String
COMP_NAME="java:comp/env/ejb/Department";
| public static final String JNDI_NAME="Department";
Thanks in advance.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977752#3977752
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977752
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user