This content has been marked as final.
Show 3 replies
-
1. Re: ejb3 binding
jaikiran Nov 20, 2007 1:41 AM (in response to filosganga)When i deploy it, my ejb are bind to "application/EjbName".
That's the default.It is possible, remove the ear filename from the jndi, or change it?
Yes, its possible. You can specify any jndi name of your choice for the EJBs. You can either use annotations (for EJB3) or jboss.xml to do this. Here's an example using annotations:@Stateless @Remote ({UserManager.class}) @RemoteBinding (jndiBinding = "RemoteUserManagerBean") public class UserManagerBean implements UserManager { .... }
See the use of @RemoteBinding, above. With this annotation the UserManagerBean is now bound to "RemoteUserManagerBean" jndi name(you can specify any unique jndi name of your choice).
The other way to do this is adding an entry in the jboss.xml (as follows):<session> <ejb-name>UserManagerBean</ejb-name> <jndi-name>RemoteUserManagerBean</jndi-name> </session>
For more details refer to the jboss.xml dtd. -
2. Re: ejb3 binding
filosganga Nov 20, 2007 4:07 AM (in response to filosganga)Tank you, so i've looked the jboss.xml dtd, the item <jndi-name /> is equivalent to RemoteBinding annotation, and <local-jndi-name /> to LocalBinding, it's right?
Tanks a lot -