Hey
Kevin Lewis wrote:
> > The fix I added today (setting context classloaders properly on
> > optimized calls) should fix it. Are you still seeing it despite todays
> > fix?
>
> I downloaded the latest code this morning. However, I'm unable to test
> so far because the mechanism I used to hook into jBoss' JNDI is gone
> (javaURLContextFactory.setRoot).
>
> Can you tell me if there is a new way I can hook into jBoss' naming?
> I'll continue to look.
What do you need to "hook"?
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).
If you have any more Q's let me know.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com