Okay, I've created my bindings in the same way as the Container does.

However, it doesn't seem that the class loader that loads the
application is the same one available when doing lookups (I printed
their references).

I then saved off the class loader and restored it with an interceptor
(pretty scary stuff).  Now I get a class cast exception; probably
because the classes are being loaded by different class loaders.

I think this goes to a deeper problem.  I think using the JNP naming
service remotely (which this is effectively doing if it is going over a
socket), will always cause these class cast exceptions.

I'm thinking I need to hook into the naming system in a different way.

Any suggestions?

> -----Original Message-----
> From: Kevin Lewis 
> Sent: Thursday, October 26, 2000 8:41 AM
> To: jBoss Developer
> Subject: RE: [jBoss-Dev] RE: [jBoss-User] JNDI Problem (and
> EmbeddedTomcat)
> 
> 
> > As I said, the "comp" context takes care of the switching 
> > logic. All you
> > need to make sure is that the right context classloader is 
> set. And in
> > case of Tomcat I think this is handled by default (i.e. 
> > Tomcat sets the
> > context classloader properly on both init and all requests). 
> > So, all you
> > should have to do is do the binding into java:comp/env at 
> startup. The
> > rest is automatic. There's no need for a request-interceptor.
> 
> Okay, I'll see what I can do (crossing fingers).  Thanks for 
> your time,
> Rickard.
> 
> 

Reply via email to