prreddy
asked on
Local JNDI lookup
Hi,
I am using j2ee application with session ejbs on WSAD5.0. I have both remote and local interfaces in my bean. Initiall i used jndi lookup using remotehome object,it works fine.Later,i tried using localhome look up... I am getting following exception...Is there something i missed..I would appreciate if anybody help on this...
javax.naming.NameNotFoundE xception: Name "ejb/ejb/us/ds/ejb/person/ PersonLoca lHome" not found in context "local
//client code
InitialContext context = new InitialContext();
perHome = (PersonLocalHome)context.l ookup("loc al:ejb/ejb /us/ds/ejb /person/Pe rsonLocalH ome");
In ejb-jar-bnd.xmi,i have something like this..
<ejbBindings xmi:id="EnterpriseBeanBind ing_109457 9280078" jndiName="ejb/us/ds/ejb/pe rson/Perso nLocalHome ">
<enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml #Person"/>
<ejbRefBindings xmi:id="EjbRefBinding_1094 580260062" jndiName="local:ejb/ejb/us /ds/ejb/pe rson/Perso nLocalHome ">
<bindingEjbRef xmi:type="common:EJBLocalR ef" href="META-INF/ejb-jar.xml #EJBLocalR ef_1094580 260062"/>
</ejbRefBindings>
</ejbBindings>
thanks.
I am using j2ee application with session ejbs on WSAD5.0. I have both remote and local interfaces in my bean. Initiall i used jndi lookup using remotehome object,it works fine.Later,i tried using localhome look up... I am getting following exception...Is there something i missed..I would appreciate if anybody help on this...
javax.naming.NameNotFoundE
//client code
InitialContext context = new InitialContext();
perHome = (PersonLocalHome)context.l
In ejb-jar-bnd.xmi,i have something like this..
<ejbBindings xmi:id="EnterpriseBeanBind
<enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml
<ejbRefBindings xmi:id="EjbRefBinding_1094
<bindingEjbRef xmi:type="common:EJBLocalR
</ejbRefBindings>
</ejbBindings>
thanks.
ASKER
you mean JNDI_NAME is local jndiname right, but its not accepting if i say PersonLocalHome.JNDI_NAME
ASKER
Any help appreciated for the above problem!!!!!!!
Are you getting the same error?
one suggestion: You can post this Question in Java TopicArea, where you can get earlier & excellent responses than here. https://www.experts-exchange.com/Programming/Programming_Languages/Java/
You can also post a "20 points" Question there with the link of this Question in the body. (and subject - something like - Link to EJB Question.)
one suggestion: You can post this Question in Java TopicArea, where you can get earlier & excellent responses than here. https://www.experts-exchange.com/Programming/Programming_Languages/Java/
You can also post a "20 points" Question there with the link of this Question in the body. (and subject - something like - Link to EJB Question.)
ASKER
I appreciate your help... I tried different ways ,it works fine...Actually we need to specify local reference in web.xml, that solved the problem.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
InitialContext context = new InitialContext();
perHome = (PersonLocalHome)context.l