• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JNDI and local EJB

 
Valentin Jacquemin
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am wondering whether when developing a Local EJB the container will register the bean in JNDI also or not?

Actually I deployed a simple bean in Glassfish and then browsing JNDI I couldn't find the bean, any idea why? When deploying it as a Remote bean, I can see it in the JNDI browser of Glassfish admin console....
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

All the beans can be located with JNDI, I also think that every time when you inject a resource(with an annotation) the container does a jndi look up.


Regards,
Mihai
 
Bernhard Huber
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion all ejbs are available via JNDI, the local and the remote available ejbs.

In the jndi browser of glassfish v2 you see only the remotly available ejbs.

If you switch to JBoss and browse JNDI tree there you will notice jndi entries having:
* having no prefix - these are remotly available
* having prefix java: - these are only locally available
* having prefix java:comp/env pre ejb - these are the ejb locally available entiries like env-entry, etc

that's what I experienced so far

regards bernhard
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic