On Wed, 14 Feb 2001 11:07:25 +0000, Ian McCallion
<[EMAIL PROTECTED]> wrote:
>java:comp/env could in theory be provided by any type of container, eg a servlet
>container, a web browser for applets, and even by the JVM itself for Java
>applications. I think we may see some of these in the future. (Perhaps someone
>else can tell us that the future is already here!)
Guess what ;-)
<vendor>
JBoss has a JNDI implementation, and a java:comp/env usage of it, that
can be used in all of the above cases, easily.
All you need to do is add the implementation JAR, and a small piece of
init code to set up the context switching semantics of the "comp/env"
JNDI context. This piece of code is, of course, available as an MBean in
JBoss.
It works by having the "env" context be switched on what Thread
ContextClassLoader is set for a particular thread. The number of virtual
"env" environments you have is thus dependent on how many classloaders
you use TCCL's. Each TCCL will have its own "env". (see
Thread.setContextClassLoader(ClassLoader) for details on TCCL's)
</vendor>
regards,
Rickard
--
Rickard Öberg
Email: [EMAIL PROTECTED]
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".