-
1. Re: ejb reference bound in JNDIView, but not in bean context
joelvogt Dec 11, 2002 5:08 PM (in response to cartman)whats your <ejb-ref-name>? Have you tried doing this lookup?
-
2. Re: ejb reference bound in JNDIView, but not in bean context
cartman Dec 12, 2002 7:41 AM (in response to cartman)Hi, thanks for your reply.
my <ejb-ref-name> is ejb/ProductLocalHome, therefore the one i used in the lookup... -
3. bug in JBoss?
cartman Dec 12, 2002 10:16 AM (in response to cartman)Hi to all,
ok, now it get's really interessting. I played a bit more and realized the following:
First I checked the jndiview source and realised that the jndi tree depends on the classloader used. So obviously, in my case the wrong classloader must be used, but why?
If I try to print out the jndi tree in the ejbCreate method anything is fine, the ejb reference is included.
But not if I use some private lookup method inside the bean.
The problem I think is, that my session bean returns an instance of an anonymous class to the client. That anonymous class has access to the private lookup method and tries to uses it. Obviously, the class loader of the client is used in that case, because the ejb reference is not in the jndi tree. But at all, it's an method of the session bean and not of the client, so I think it should have access to the ejb reference.
What do you folks think? Is this a bug of JBoss or is this behaviour intended in the J2EE reference?
Cheers and thanks for any reply,
Marcus