ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Message and Session

Post new topic  Reply to topic
 Message and Session « View previous topic :: View next topic » 
Author Message
melmas
PostPosted: Mon Feb 28, 2005 4:42 pm    Post subject: Message and Session Reply with quote

Newbie

Joined: 11 Feb 2005
Posts: 4

Can we publish a Message object created using one Session and publish using a different Session?

We would like to create a generic method to publish a message, that will handle connection errors and recreate connection/session and publishers.

publishMessage(Message msg, String topicName);

The _topicConnection, _topicSession, _topicPublishers HashMap are all class level variables; The hashmap holds the topicName as key and the publisher as value.

The msg is created outside using the global _topicSession. When the publishMessage method is invoked to publish to a topic, and connection related error occurs say the publisher is not valid, we thought it might easier/safer to close all publishers, sessions and connections and restart them. When we write logic to do that, can the publishMessage restart the connection/session and use the "msg" created from another session to publish

Advanced thanks for your input
Back to top
View user's profile Send private message
malammik
PostPosted: Mon Feb 28, 2005 7:06 pm    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2005
Posts: 397
Location: Philadelphia, PA

yes you can.
_________________
Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Message and Session
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.