Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lookup for local interfaces from the other EJB module

3 views
Skip to first unread message

Tihomir

unread,
Oct 11, 2002, 8:56:46 AM10/11/02
to
From: Tihomir <tihomi...@eurodyn.com>
Newsgroups: weblogic.developer.interest.ejb
Subject: Lookup for local interfaces from the other EJB module
References:
NNTP-Posting-Host: 216.148.48.151
X-Original-NNTP-Posting-Host: 216.148.48.151
Message-ID: <3da6...@newsgroups.bea.com>
Date: 11 Oct 2002 05:56:46 -0700
X-Trace: newsgroups.bea.com 1034341006 216.148.48.151 (11 Oct 2002 05:56:46 -0700)
X-Original-Trace: 11 Oct 2002 05:56:46 -0700, 216.148.48.151
Organization: BEA NEWS SITE
Lines: 6
XPident: Unknown
Path: newsgroups.bea.com!not-for-mail
Xref: newsgroups.bea.com weblogic.developer.interest.ejb:35549

I have two EJB modules (two JARs) deployed on BEA WebLogic 7.0. The first module contains session bean, and the other one contains entity bean. Entity bean has local interfaces and I want to lookup it from the session bean. It is OK when I have EAR archive, but it is not when I have separately deployed EJB modules. I would like to have possibility to lookup entity bean on the former way too, because it is more convenient in the development phase.
Can somebody help me?
In the problematic situation the following message occurs:
javax.naming.LinkException: . Root exception is javax.naming.LinkException: . Root exception is javax.naming.NameNotFo
undException: Unable to resolve 'app/ejb/entities.jar#EMMExpert/local-home' Resolved: 'app/ejb' Unresolved:'entities.jar
#EMMExpert' ; remaining name 'entities.jar#EMMExpert/local-home'

Eddie Chui

unread,
Oct 13, 2002, 10:26:11 AM10/13/02
to

Hi Tihomir,

You should be able to do so if you have put the ejb ref in the deployment descriptors
(ejb-jar.xml and weblogic-ejb-jar.xml). Here is the samples for references:

ejb-jar.xml:

<ejb-ref>
<ejb-ref-name>ejb/entityBean01</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.examples.EntityBeanHome</home>
<remote>com.examples.EntityBean</remote>
<ejb-link>ejb.EntityBeanHome</ejb-link>
</ejb-ref>

weblogic-ejb-jar.xml:
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name>ejb/entityBean01</ejb-ref-name>
<jndi-name>ejb.EntityBeanHome</jndi-name>
</ejb-reference-description>
</reference-descriptor>

Give it a try and good luck,

Eddie

Tihomir

unread,
Oct 14, 2002, 7:51:47 AM10/14/02
to

Thanks Eddie but it has not solved my problems:

Pay attention that my entity bean has local interfaces and it is deployed separately
(entities.jar). I want to access it from the session bean from the other module
deployed separately (manageexperts.jar) on the same weblogic server. I don't have
EAR archive (when I have EAR the problem disappears but because of development
process I want keep them deployed separately) - so, I don't have the same application.

The way you suggest doesn't help because you say that I should put <ejb-ref> with
appropriate <ejb-link> value (JNDI name). But, such value for ejb-link is not
recognized because it is outside my module that contains session bean. I also
tried something like this: <ejb-link>entities.jar#EMMExpert</ejb-link> with the
same result. Also, I think that for <ejb-ref> it is NOT ALLOWED to have local
and local home interfaces as you suggest.

Regards, Tihomir

Tihomir

unread,
Oct 14, 2002, 8:25:38 AM10/14/02
to

I mean, since the <ejb-ref> defines a remote reference from one bean to another
(deployed independently of the calling EJB's application EAR file) and the <ejb-local-ref>
defines a local reference from one bean to another (as a part of the same EAR),
maybe I'm trying something impossible because I dont't have any of these cases
because I have local interfaces which I'm trying access to from the other module,
and don't have the same EAR?
Regards, Tihomir
0 new messages