cancel
Showing results for 
Search instead for 
Did you mean: 

localejbs lookup fails

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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.

Vlado
Advisor
Advisor
0 Kudos

Brandelik,

There's only one jndi-name per EJB type. The local home gets that of the remote home with the "localejbs/" prefix added. Anyway, the issue seems to be solved, just a clarification from my side...

Best regards,

Vladimir

Former Member
0 Kudos

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