2 Replies Latest reply on Apr 18, 2011 9:04 AM by ataylor

    timeouts on jndi calls (jnp.timeout & jnp.sotimeout)

    ataylor

      Ive been playing around with the time outs on client jndi lookups (we want to set these for HornetQ JMS bridges) and have found that the timeouts i was setting weren't being used. After debugging i found that the following was happening

       

      //psuedo code

       

      1. Create socket

      2. socket.setsotimeout(sotimeout)

      3. socket.connect(timeout)

      4. marshall Naming Server stub

      5. cache server

      6. invoke lookup on server using RMI

       

      subsequent calls use the cached server which means that the timeouts are only actually used in the initial marshalling of the server stub, all subsuquent calls to the naming server will use what ever default timeouts are set on the RMI implementation.

       

      My question is this, should the jndi code handle setting these same parameters on the rmi layer or is it up to the client code to do it. I actually tried setting the sun rmi params but it had no effect.