This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Server independent JNDI name annotation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Server independent JNDI name annotation" Watch "Server independent JNDI name annotation" New topic
Author

Server independent JNDI name annotation

Varun Chopra
Ranch Hand

Joined: Jul 10, 2008
Posts: 211
I am using JBOss server.
In one tutorial on net it is mentioned that @org.jboss.ejb3.LocalBinding or @org.jboss.ejb3.remoting.RemoteBinding can be used to specify local/remote JNDI name.
Is there a server independent way (annotation)?


-Varun -
(My Blog) - Online Certifications - Webner Solutions
Luciano A. Pozzo
Ranch Hand

Joined: Jun 20, 2005
Posts: 112
You can use the mappedName attribute of the @EJB annotation. The problem is that is not required to be supported by all implementations.

So, i don't think there is a standard way to do this.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Server independent JNDI name annotation
 
Similar Threads
jndi name in ejb3?
Requesting help in connecting a DataSource(DSSDEV)
Still having problem with my first EJB3
mappedName and name attributes
Specifying EJB JNDI name - Vendor dependent?