<ejb-ref>
<ejb-ref-name>ejb/EntityEjb</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>com.ejb.EntityEjbHome</home>
<remote>com.ejb.EntityEjb</remote>
</ejb-ref>
In weblogic-ejb-jar.xml include <jndi-name> for entity bean.
<ejb-reference-description>
<ejb-ref-name>ejb/EntityEjb</ejb-ref-name>
<jndi-name>ejb.EntityEjb</jndi-name>
</ejb-reference-description>
Tuan wrote:
> As I move to WLS7.0 from 5.1, I set up a WLS7.0 instance and everything is fine. Just
> for experiment I deployed minimal web components to see how WLS7.0 works. Here is
> my problem when Session Bean (stateless) lookup an CMP entity bean (why is it looking
> in "app/ejb" when I don't even have anything resemble it at all). Plz help:
>
> javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException:
> Unable to resolve 'app/ejb/SystemUs
> er.jar#SystemUser/local-home' Resolved: 'app/ejb' Unresolved:'SystemUser.jar#SystemUser'
> ; remaining name 'SystemUser.ja
> r#SystemUser/local-home'
> at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:858)
> at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:223)
> at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:187)
Do you have to define the entity reference in ejb-jar.xml for the session and ejb-description-ref
in entity weblogic-ejb-jar.xml?
Extra info: My stateless session is remote and my CMP entity bean is local. Thanks
in advance.
Using ejb-link is faster.
Emmanuel
"Tuan" <tuan_...@hotmail.com> wrote in message
news:3d21dc0f$1...@newsgroups2.bea.com...
I'm moving our system from WLS5.1 to WLS7.0. My session EJB is stateless and entity
is CMP. My session is remote but my entity is local. All the EJBs are moved from
1.1 spec to EJB 2.0 spec.
To learn and find what ahead before moving to WLS7.0, I have a simple servlet and
it has a remote stateless session bean. This beans then look for a CMP local entity.
In WLS6 has no problem but javax.naming.LinkException occurs in WLS7.0.
Make sure you look up "ejb.EntityEjb" (directly) or
"java:comp/env/ejb/EntityEJB" (using your reference). Use <ejb-link> an thus
avoid mapping the bean to an external JNDI name (don't need to specify
<ejb-reference-description>). This is faster.
Also, your entity EJB seems to have a remote interface. I suggest using a
local interface for all entity EJBs.
For example:
<ejb-local-ref>
<ejb-ref-name>ejb/EntityEjb</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.ejb.EntityEjbLocalHome</local-home>
<local>com.ejb.EntityEjbLocal</local>
<ejb-link>EntityEJB</ejb-link>
</ejb-local-ref>
and then look up "java:comp/env/ejb/EntityEJB".
Emmanuel
"Tuan" <tuan_...@hotmail.com> wrote in message
news:3d23305b$1...@newsgroups2.bea.com...