0 Replies Latest reply on Dec 3, 2001 5:17 AM by kavitha_srinivas

    setClientID

    kavitha_srinivas

      JBoss does not support setClient method ?
      We are trying to use setClientID method of TopicConnection.While trying to run,we are getting IllegalException.

      Please find the code below:
      Context context = new InitialContext();

      // Get the connection factory
      TopicConnectionFactory topicFactory =
      (TopicConnectionFactory)context.lookup(factoryJNDI);

      // Create the connection
      topicConnection = topicFactory.createTopicConnection();
      topicConnection.setClientID("HelloPublisher");
      System.out.println("set Client ID:" +"HelloPublisher");

      The exception we are getting is : java.lang.IllegalStateException: The connection has already a clientID
      at org.jboss.mq.Connection.setClientID(Connection.java:230)

      Could anyone help us out ?

      Thanks in advance
      Kavitha