mafentakis
asked on
how to configure a certain JNDI-Name with EJB3 Annotations (the JEE way)
If II annotate my session bean like that:
@Stateless ( name="UserFacadeBean", mappedName="UserFacadeRemo te/remote" )
public class UserFacadeBean implements UserFacadeLocal, UserFacadeRemote {
}
and deploy it in Webglogic 10, i get access to the remote interface with:
JNDI_NAME = "UserFacadeRemote/remote#" + UserFacadeRemote.class.get Name();
userFacade = (UserFacadeRemote) new InitialContext().lookup(JN DI_NAME);
that works fine, but is there an alternative (beyond unsing ejb.jar.xml) to define
a jndi name with annotations, without the full qualified classname of the remote interface?
so I want to have something like:
new InitialContext().lookup("m ySimpleNam e");
thanks
manolis
@Stateless ( name="UserFacadeBean", mappedName="UserFacadeRemo
public class UserFacadeBean implements UserFacadeLocal, UserFacadeRemote {
}
and deploy it in Webglogic 10, i get access to the remote interface with:
JNDI_NAME = "UserFacadeRemote/remote#"
userFacade = (UserFacadeRemote) new InitialContext().lookup(JN
that works fine, but is there an alternative (beyond unsing ejb.jar.xml) to define
a jndi name with annotations, without the full qualified classname of the remote interface?
so I want to have something like:
new InitialContext().lookup("m
thanks
manolis
ASKER
@Mr_It:
Thanks for your answer, but as i wrote i want the "J2EE Way" and not the custom Solution.
regards
manolis
Thanks for your answer, but as i wrote i want the "J2EE Way" and not the custom Solution.
regards
manolis
Yes I should better read titles ;-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@RemoteBinding(jndiBinding
@LocalBinding(jndiBinding=
I don't know if there is an annotations counterpart in WebLogic, but I'm sure the JNDI name for an EJB can be specified in the weblogic-ejb-jar.xml deployment descriptor as well. I guess you have to declare the bean in there and probably use the 'jndi-name' or 'local-jndi-name' element.