1 Reply Latest reply on Feb 21, 2004 12:05 PM by Adrian Brock

    My JMS Program Not Working

    srinivasa Newbie

      hi all and adrian,
      I am trying to get the examples in JBoss working. I had placed the oracle-jdbc2-service.xml file in the default/deploy directory. After which i was able to get my message driven beans deployed(previous to this i was getting Error creating the dlq connection: XAConnectionFactory not bound).

      Now when i am running the publisher program which looks like this:

      Properties p = new Properties();
      p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
      p.put(Context.PROVIDER_URL, "localhost:8093");
      Context context = new InitialContext(p);
      System.out.println("stage 1");
      TopicConnectionFactory topicFactory =(TopicConnectionFactory)context.lookup(factoryJNDI);
      System.out.println("stage 2");
      topicConnection = topicFactory.createTopicConnection();
      topicSession = topicConnection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
      topic = (Topic)context.lookup(topicJNDI);
      topicPublisher = topicSession.createPublisher(topic);

      I have given 2 System.out. It is printing the first one the second one is not getting executed(The one after lookup). It is not giving any exception.


      When i try to connect the Subscriber program i am getting the following exception:

      09:47:41,505 ERROR [SocketManager] Failed to create ObjectInputStream
      java.net.SocketTimeoutException: Read timed out
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:129)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
      at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:77)
      at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2150)
      at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2163)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2634)
      at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:734)
      at java.io.ObjectInputStream.(ObjectInputStream.java:253)
      at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:265)
      at java.lang.Thread.run(Thread.java:536)

      what should i do now?
      please give me tips
      thanks
      srinivas