File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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.
Don't get me started about those stupid light bulbs.
subject: Server independent JNDI name annotation
Similar Threads
Requesting help in connecting a DataSource(DSSDEV)
jndi name in ejb3?
Still having problem with my first EJB3
mappedName and name attributes
Specifying EJB JNDI name - Vendor dependent?