Hello.

I try to use a reques/reply with 2 callbacks.
I'm using a external publisher to activated de first callback, this callback
make a request using a TopicRequestor, the request is send, the second
callback is activated, then in this callback get JMSReplyTo to the message and
I try to create a pubisher with this TemporaryTopic, but when execute :
session.createPubliser(TempTopic) 

- There not responce and not exception too (when callback1's publisher  
  and callback2' publisher is created with the same  
  session, and subscribers of both callback with other session )
- There is a javax.jms.JMSException: Trying to create a publisher for a  
  temp topic that is not bound to this connection
  (When callback1's subscriber and publisher are created with the same 
  session, and for callback2 use other session)
  In both use the same TopicConnexion

  for make the request in callback1 use this java code:

        TextMessage text1 = session.createTextMessage();
        text1.setText(Stringmsg);
        Message texMessage = (Message)text1;
        Message msreply = topicRequestor.request(texMessage); // send
        String sMsg = (String)((TextMessage)msreply ).getText();

for make the reply use this java code:
                        
     geting the message in callback2:
                        
        temTopic = (TemporaryTopic)message.getJMSReplyTo();

     sending the reply message in callback2:

        TextMessage text1 = session.createTextMessage();
        text1.setText((String)Objectmsg);
        msreply = (Message)text1;
     topicppublisher = session.createPublisher(temTopic);// in this point
        tppub.publish(msreply);


Thanks a lot.

Herson R.C.

------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/developers@mail.iit.de/




Reply via email to