On Dec 24, 2009, at 9:41 PM, Mahesh Venkat wrote:
> I bypassed this issue by adding JBoss jndi socket timeout properties
> in <jboss-server-dir>/server/default/conf/jndi.properties
>
> jnp.timeout=10
> jnp.sotimeout=10
> · jnp.timeout: The connection timeout in milliseconds. The default
> value is 0 which means the connection will block until the VM TCP/IP
> layer times out.
>
> · jnp.sotimeout: The connected socket read timeout in milliseconds.
> The default value is 0 which means reads will block. This is the
> value passed to the Socket.setSoTimeout on the newly connected socket.
>
OK. Thanks for posting.
> The core issue is that Jersey code is attempting to open socket to
> localhost:1099 for a Glashfish JNDI context
> (com.sun.enterprise.container.common.spi.util.InjectionManager) and
> it s not available in a JBoss app server.
>
I do not agree that the above is the "core issue". The core issue is
within the JBoss sever. Jersey is not attempting to open a socket, the
JBoss app server's JNDI implementation is, and it appears to be
hanging when there is no JNDI object present for a JNDI name instead
of throwing a NamingException.
I suspect it should be possible to reproduce the same behavior using a
servlet that does the following:
Object injectionMgr = new InitialContext().
lookup("com.foo.Blah");
Paul.
> Regards
> --Mahesh
>
> On Fri, Dec 18, 2009 at 7:02 AM, Paul Sandoz <Paul.Sandoz_at_sun.com>
> wrote:
>
> On Dec 18, 2009, at 3:51 PM, Mahesh Venkat wrote:
>
>> Hi Paul,
>>
>> I am using JBoss 4.2.3 GA with Tomcat 5..5.
>> The hang occurs when I make the first call after recycling the
>> JBoss server.
>> Apparently this does not occur all the time nor in all the machines.
>
> I think this may be a JBoss bug when recycling (but it perhaps may
> be alleviated if Jersey closes the InitialContext instances when
> finished).
>
>
>> It looks like this hang is influenced by the order in which some
>> classes or jars are loaded perhaps?
>>
>
> From the thread dump it looks more like an issue with the JBoss JNDI
> implementation.
>
> I suspect you can probably reproduce this by writing a simple
> servlet that instantiates InitialConext and looks up something that
> is known not to exist.
>
>
>> I was sarching for InjectionManager context. Is this defined
>> somewhere?
>>
>> Object injectionMgr = new InitialContext().
>>
>> lookup
>> ("com.sun.enterprise.container.common.spi.util.InjectionManager");
>>
>
> The name above will only be bound to an object for GlassFish v3
> deployments. On JBoss the lookup should throw an NamingException.
>
> Paul.
>
>
>
> --
> Regards
> --Mahesh