on 07-06-2005 3:34 PM
Hi,
I have a EJB with a local home interface according to the following ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<description>EJB JAR description</description>
<display-name>EJB JAR</display-name>
<enterprise-beans>
<session>
<ejb-name>MyTestModuleBean</ejb-name>
<home>com.sap.isdfps.d041422.modules.MyTestModuleHome</home>
<remote>com.sap.isdfps.d041422.modules.MyTestModule</remote>
<local-home>com.sap.isdfps.d041422.modules.MyTestModuleLocalHome</local-home>
<local>com.sap.isdfps.d041422.modules.MyTestModuleLocal</local>
<ejb-class>com.sap.isdfps.d041422.modules.MyTestModuleBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
when I try to look up the localhome-Interface with the following code:
obj = ic.lookup( "localejbs/TEST/MyTestModuleBean" );
I get the following exception:
com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of MyTestModuleBean.
I can see the TEST/MyTestModuleBean under the localejbs - Context in the Visual Admin and I can look up the remote home but I don't want that , I want the localhome.
Any ideas ?
Best Regards,
Frank
You may have to declare it twice in the descriptor:
once as remote and once as local so you would have 2 different jndi's for calling it from.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the problem was:
I tried to look up a localejbs - Home from a REMOTE JVM, so the BEAN and the Client were running in different JVM's on different machines.
So the remote lookup worked, of course and the locale lookup failed, of course.
I was just confused, but thanks for paying attention to my problem.
Best Regards,
Frank
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.