[jboss-dev] Oops, javax.naming.spi.* is dependent on Hashtable, this will make it difficult to change the JBoss jndi naming service to use ConcurrentHashMap instead of Hashtable...

Adrian abrock at redhat.com
Wed Jul 11 11:03:10 EDT 2007


Hi Scott,

I missed your original post, probably because you posted during
Java One. ;-)

But I don't understand what you are doing?
There shouldn't be any contention on a naming context.

A naming context is not thread safe, the application has to
synchronize on it anyway if it is using it concurrently!

http://java.sun.com/j2se/1.3/docs/api/javax/naming/Context.html

If you are going to change it, then you need to be aware
that this it is part of the "serialized form" and must still
serialize as a Hashtable for compatibility with earlier versions.

Regards,
Adrian

On Wed, 2007-07-11 at 10:36 -0400, Scott Marlow wrote:
> I wrote a few months ago about changing the jndi implementation to use 
> ConcurrentHashMap instead of Hashtable.  This is to fix a concurrency 
> bottleneck in org.jnp.interfaces.NamingContext (I'm seeing 2-3 second 
> object lock contention on instance variable " 
> org.jnp.interfaces.NamingContext.env".  Unfortunately, the interface 
> javax.naming.Context is dependent on Hashtable and NamingContext has to 
> implement Context.
> 
> There are also many other dependencies on Hashtable in the 
> javax.naming.spi package.
> 
> I'll try to hack around the dependencies.
> 
> I don't have a question but just sharing my status on this attempt.
> 
> Scott
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
-- 
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Adrian Brock
Chief Scientist
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx




More information about the jboss-development mailing list