I have given the code that I used to lookup a bean by its COMP_NAME, after 
googling for several hours, posting this here to get some clues atleast. 

Code:

Context initial = new InitialContext();
  | Object objref = initial.lookup("java:comp/env/ejb/LicenseVerifier");
  | LicenseVerifierLocalHome home = (LicenseVerifierLocalHome) objref;
  | LicenseVerifierLocal license  = home.create();

Exception:
javax.naming.NameNotFoundException: env not bound

JNDI View
java:comp namespace of the LicenseVerifier bean:
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   +- LicenseVerifier[link -> LicenseVerifierLocalHome] (class: 
javax.naming.LinkRef)
  |   +- security (class: org.jnp.interfaces.NamingContext)
  |   |   +- subject[link -> java:/jaas/SecurityPolicy/subject] (class: 
javax.naming.LinkRef)
  |   |   +- security-domain[link -> java:/jaas/SecurityPolicy] (class: 
javax.naming.LinkRef)


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063988#4063988

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063988
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to