1 Reply Latest reply on Oct 8, 2003 1:31 PM by Stephane Nicoll

    Publisher and Durable subscriber on same Session

    Nigel Birch Newbie

      Hi,

      Is it valid to create a durable subscriber and a topic publisher on the same Session / Connection? The code sequence is as follows:

      connect = tcf.createTopicConnection(username, passwd);
      connect.setClientID(clientID);
      session = connect.createTopicSession(false,javax.jms.Session.AUTO_ACKNOWLEDGE);
      topicSubscriber = session.createDurableSubscriber(rawTopic,clientID, messageSelector, false );
      topicPublisher = session.createPublisher(eventsTopic);
      connect.start ();

      Thanks
      NBirch