WebSphere Application Server - jndi and CMP entity bean

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > May 2004 > jndi and CMP entity bean





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author jndi and CMP entity bean
Olivier Demaine

2004-05-24, 4:31 pm

Hello I am a beginner on wsad, and I have a problem for using CMP entity
bean.

I writed and deployed basic EJB session, and it work fine. Then I tried to
write a CMP entity called by the session bean. The problem is jndi name of
the entity bean is never writen in the naming space of websphere. I verified
it with the dumpNameSpace.bat utility. Server and DB mapping (bottom to up)
seems to be fine.

I tried with in process testing server, and a mapped server and the problem
is with both.

a Idea ?

Olivier



Felix Wong

2004-05-25, 4:30 pm

If you're using WSAD 5.1 or later, you may want to look at the Auction
sample (File->New->Example->Enterprise Applications 1.3). It
demonstrates how to call CMP beans from seession beans.

Felix

Olivier Demaine wrote:

> Hello I am a beginner on wsad, and I have a problem for using CMP entity
> bean.
>
> I writed and deployed basic EJB session, and it work fine. Then I tried to
> write a CMP entity called by the session bean. The problem is jndi name of
> the entity bean is never writen in the naming space of websphere. I verified
> it with the dumpNameSpace.bat utility. Server and DB mapping (bottom to up)
> seems to be fine.
>
> I tried with in process testing server, and a mapped server and the problem
> is with both.
>
> a Idea ?
>
> Olivier
>
>
>


Henrik Sjostrand

2004-05-26, 4:31 pm

"Olivier Demaine" <olivier.demaine@club-internet.fr> wrote in message news:<40b22e5e$0$309$7a628cd7@news.club-internet.fr>...
> Hello I am a beginner on wsad, and I have a problem for using CMP entity
> bean.
>
> I writed and deployed basic EJB session, and it work fine. Then I tried to
> write a CMP entity called by the session bean. The problem is jndi name of
> the entity bean is never writen in the naming space of websphere. I verified
> it with the dumpNameSpace.bat utility. Server and DB mapping (bottom to up)
> seems to be fine.
>
> I tried with in process testing server, and a mapped server and the problem
> is with both.
>
> a Idea ?
>
> Olivier


Is your CMP EJB using Local Interfaces? In that case you can not look
them up in the JNDI tree as if you were using Remote Interfaces (and
dumpnamespace won't show them). If this is the case, set up an EJB
reference from the Session EJB to the CMP EJB and use that reference
for looking up the CMP EJB.

Take a look at the EJB 2.0 Redbook SG24-6819 on www.redbooks.ibm.com.
It has good examples on how to write the EJB client code.

Henrik Sjostrand
henrik ".at-" sjostrand ";dot." net
Olivier Demaine

2004-05-26, 4:31 pm


"> Is your CMP EJB using Local Interfaces? In that case you can not look
> them up in the JNDI tree as if you were using Remote Interfaces (and
> dumpnamespace won't show them). If this is the case, set up an EJB
> reference from the Session EJB to the CMP EJB and use that reference
> for looking up the CMP EJB.
>
> Take a look at the EJB 2.0 Redbook SG24-6819 on www.redbooks.ibm.com.
> It has good examples on how to write the EJB client code.
>


Yes, the CMP EJB has only a local interface.
Thanks
Olivier


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com