0 Replies Latest reply on Dec 22, 2005 3:11 AM by Fab

    Topic publisher not working (socket write error)

    Fab Newbie

      Hi all,

      I have a periodic task on JBoss AS 4.0.0DR3 sending a topic on the local jms server.
      JMS Connection is performed with:

      Properties properties = new Properties();
      properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      
      properties.put(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
      properties.put(Context.PROVIDER_URL, "jnp://localhost:1099");
      
      final InitialContext ctx = new InitialContext(properties);
      // then lookup the Topic Name
      


      and this works for a while. Until a JMSException is thrown and the task can no longer publish the topic:

      org.jboss.mq.SpyJMSException: Cannot send a message to the JMS server; - nested throwable: (java.net.SocketException: Software caused connection abort: socket write error)
       org.jboss.mq.Connection.sendToServer(Connection.java:1004)
       org.jboss.mq.SpySession.sendMessage(SpySession.java:995)
       org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:247)
       org.jboss.mq.SpyMessageProducer.send(SpyMessageProducer.java:199)
       org.jboss.mq.SpyTopicPublisher.publish(SpyTopicPublisher.java:58)


      I really don't understand why the task can get a socket error on the localhost machine..
      I cannot get any information about this error on any forum...

      Moreover, (that may be a cause to effect relation) the task is performing a
      QueueReceiver.receive()
      on a QueueReceived supposed to retrieve the response of the client. Everything is working well for a while. But once the first Exception is thrown (the topic is not published), the QueueReceiver Object is doing the same Socket write Error and then is throwing a
      javax.jms.JMSException: Another thread is already in receive.
      


      Cannot find any information about this Exception on JBoss Forums...

      Am I doing something wrong?
      How is a "Socket write error" happening on the local machine?

      Thanx for helping,

      Manawajaws