whats your <ejb-ref-name>? Have you tried doing this lookup?
Hi, thanks for your reply.
my <ejb-ref-name> is ejb/ProductLocalHome, therefore the one i used in the lookup...
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,