Thanks for the quick reply.

> What do you need to "hook"? 

We'll, formerly (and I think currently), there was nothing that did
web-tier naming for jBoss (or, from Tomcat into jBoss).

I have created some interceptors (context and request) that go into
Tomcat to allow Servlets to do ejb-ref and resource-ref lookups.  These
bind into jBoss to make the Tomcat integration more J2EE compliant.

> Here's how the current java:comp/ namespace works. When you 
> dereference
> java:comp/ it will check what the current contextclassloader 
> is. If it's
> one that it hasn't seen before then it will create a new namespace and
> associate it with that classloader. 
> 
> This means that all you have to do to use java:comp/ is to, 
> well, start
> using it. The first thing you'd want to do during 
> initialization of it,
> for example, is to create the "env" subcontext, like this:
> Context ctx = (Context)new InitialContext().lookup("java:comp");
> ctx.createSubcontext("env");
> 
> And then start binding into "env". When you do this you must have the
> right context classloader set, that's all. Look in Container.java for
> more info ("setupEnvironment()" to be precise).

I think I understand.  The scheme I had used was to create my own JNP
Naming implementation.  This leveraged some stuff provided by Tomcat.
Doesn't look like I can just set this as the root of a new
BeanClassLoader.  Looks like BeanClassLoader.get/setJNDIRoot aren't used
any more.

Okay.  I'll just adjust my implementation to be more like what you
pointed out in Container.

Thanks for the explanations and examples, Rickard.  I appreciate your
time.

-Kevin

Reply via email to