Oleg Nitz wrote:
> I feel that this may be a known issue, which is already in somebody's
> todo list. Sorry if it is so, but I still hope to get some reply.
> Now jBoss creates one URLClassLoader per jar file (may I call it
> "container ClassLoader"?)
No, it's an "application ClassLoader".
> and then creates one BeanClassLoader per
> bean, i.e. multiple BeanClassLoaders for each container ClassLoader.
> Comments in BeanClassLoader.java state:
> "This classloader is used to hold the java: JNDI-namespace root.
> Each container has its own BCL. When a "java:" lookup is made
> the JNDI-provider will use the root to lookup the values."
> The phrase "Each container has its own BCL" is not the full truth:
> each container has one or more own BCLs.
No, a container (note: one container per bean, ejb-jar=application with
set of containers) will only have one BCL. I think you have the
container definition mixed up...
> I think it's a bit strange use of ClassLoaders: BeanClassLoader add
> nothing to the classpath, but instead serves for JNDI-provider.
> Isn't it possible to use ThreadLocal variable instead?
> Say, put to it a HashMap containing all JNDI entries for the given
> bean. Am I missing something?
Yes it is possible but we wanted to avoid using ThreadLocals as much as
possible as it might be slower. If it's not (havent benched this) then I
guess it doesn't really matter.
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com