InitialContext ic = new InitialContext();
| Object ojb= ic.lookup("java:comp/env/ejb/CMPHome");
| home = (CMPHome)PortableRemoteObject.narrow(ojb, EmpBean.class);
JMS- Console tree view
[img]java:comp namespace of the Employee Session bean:
+- UserTransaction (class: javax.transaction.UserTransaction)
+- env (class: org.jnp.interfaces.NamingContext)
| +- jdbc (class: org.jnp.interfaces.NamingContext)
| | +- MySql[link -> java:/DefaultDS] (class: javax.naming.LinkRef)
| +- ejb (class: org.jnp.interfaces.NamingContext)
| | +- CMPHome[link -> CMPHome] (class: javax.naming.LinkRef)[/img]
The Exception we are getting INFO: Exception in ejbCreate javax.naming.NamingException:
Could not dereference object [Root exception is javax.naming.NameNotFoundException:
CMPHome not bound]
1. Does the Initinal Context requires any properties as we do in the client side?
2. Is the lookup path correct?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150940#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...