1 Reply Latest reply on Jul 27, 2004 9:35 AM by starksm64

    javax.naming.CommunicationException: for multiple clients

    ibudhou

      I am having an application which will create 50 clients(threads) . When these threads try to lookup the ejb home simultaneously some of them (around 30 )got the ejb object while others could not giving the exception :

      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1086)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1163)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:485)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at test.session.NewClient.callEJBClient(NewClient.java:86)
      at test.session.NewClient.doThis(NewClient.java:42)
      at test.session.NewClient.run(NewClient.java:33)
      Caused by: java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive(Native Method)
      at java.net.DatagramSocket.receive(Unknown Source)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1064)
      The result is ... :: Time taken: 6250
      ... 7 more
      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1086)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1163)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:485)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:478)
      at javax.naming.InitialContext.lookup(Unknown Source)


      I dint change any default setting of the server JBOSS.

      Why some of the threads ar not able to get the object.
      Any suggestion.........

        • 1. Re: javax.naming.CommunicationException: for multiple client
          starksm64

          Your OS is not allowing many simultaneous connections, probably a win32 platform which commonly exhibits this behavior. Look into increasing the socket backlog value as the OS level.

          If you add a jnp.disableDiscovery=true setting to your jndi.properties or InitialContext env you would see connection refused failures rather than these discovery failures.