Guys,
I kinda stumbled into to this mid-stream. Sorry if I
force a restatement of the problem....
Can you distill the problem by simply saying that you
cannot lookup, create and invoke an EJB from within
another EJB or is the scenario more complicated that
that? SB->Enity bean or SB->[CMP]Entity,
specifically?
The reason I ask is that I'm certain I have done this
in the JCTS stuff (see loopback test) and all seemed
well...
Disclaimer: I did not try to do a SB->Entity but I did
do SB->SB with no problem...?
Please let me know if this is helpful or not... I can
poke deeper if need be.
cheers,
peter
--- Larry Kline <[EMAIL PROTECTED]> wrote:
> Jim,
>
> Have you figured this out yet? I have a very
> similar issue which I posted
> but no one has responded and I still cannot get it
> to work. Look at the
> post "Session bean cannot access entity bean" for
> the details. To
> summarize, if I look up a home from a client it
> works fine. If I look it
> up from a session bean I get a NamingException. The
> class loader cannot
> find the class of the home interface, even though it
> is deployed.
>
> - Larry
>
>
> At 03:15 PM 3/2/2001 -0500, you wrote:
> >Hi All...
> >
> >I spent some time fighting something involving name
> service and I
> >seriousely don't know if its a bug or a feature.
> >
> >I created a stateless session bean to provide a
> serice. I then wrote a
> >class to wrap that SLSB with a has-a relationship.
> When the wrapper class
> >is instansiated the code that instansiated it sets
> some properties and then
> >calls its execute method. The execute method would
> lookup the SLSB useing
> >the java:comp/env namespace and make it do its
> thing.
> >
> >This seemed like a good design and I did adjust the
> ejb-jar.xml file and
> >jboss-web.xml file to accomadate it. Unfortunatly,
> the lookup always
> >resulted with a NamingEsception being thrown that
> said ejb/Thingy not bound.
> >
> >If I then took the lookup code out of the wrapper
> class and put it directly
> >into the code that instansiates the wrapper class,
> the lookup worked fine.
> >In fact, to solve this I ended up looking up the
> SLSBs home interface and
> >then passing that into the wrapper class, which did
> all the rest
> >successfully. So the user code would get the home
> interface, instansiate
> >the wrapper object, and hand the home interface
> object to the wrapper
> >object, which would then create the SLSB and call
> its methods.
> >
> >This happened whether the user code was in a
> servlet, a stateless session
> >bean or an entity bean. I was really hopeing to
> encapsulate the lookup
> >code, but it just dossen't work.
> >
> >This is all running on jBoss-2.1-tomcat-beta with
> JDK 1.3 on W2K. In all
> >cases, jndiview showd the SLSB as bound.
> >
> >So I wonder, is this a bug or is this behavior
> correct? If it is correct,
> >how can I make this work?
> >
> >Thanks!
> >
> >Jim
> >
> >********************************************
> >I shall be telling this with a sigh
> >Somewhere ages and ages hence:
> >Two roads diverged in a wood, and I -
> >I took the one less traveled by,
> >And that has made all the difference.
> >
> >- Robert Frost, 1916
> >
> >
> >
> >--
>
>--------------------------------------------------------------
> >To subscribe:
> [EMAIL PROTECTED]
> >To unsubscribe:
> [EMAIL PROTECTED]
> >
> Larry Kline
> [EMAIL PROTECTED]
>
>
> --
>
--------------------------------------------------------------
> To subscribe:
> [EMAIL PROTECTED]
> To unsubscribe:
> [EMAIL PROTECTED]
>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]