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 » How XATopicSession work?

Post new topic  Reply to topic
 How XATopicSession work? « View previous topic :: View next topic » 
Author Message
garonne
PostPosted: Wed Apr 05, 2006 6:39 am    Post subject: How XATopicSession work? Reply with quote

Acolyte

Joined: 26 Jan 2006
Posts: 59

Can anyone explain me how an XATopicSession work?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Apr 05, 2006 6:44 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Just like a TopicSession, except it's in a globally coordinated unit of work.

So that means that, if your subscriber needs to insert data from the subscription into a database, and the database calls fail... then the Topic message will be rolled back to the subscription queue and can be reprocessed.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
garonne
PostPosted: Wed Apr 05, 2006 11:11 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Jan 2006
Posts: 59

jefflowrey wrote:
Just like a TopicSession, except it's in a globally coordinated unit of work.


So, without global coordination of the transaction manager, can XATopicSession work normally like TopicSession?

For example: we use XATopicSession in a stand-alone Java program without transaction context.
Back to top
View user's profile Send private message
mvic
PostPosted: Thu Apr 06, 2006 12:21 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

garonne wrote:
So, without global coordination of the transaction manager, can XATopicSession work normally like TopicSession?

The J2EE v1.4 JMS API reference for XATopicSession shows only one function:
Code:
public TopicSession getTopicSession() throws JMSException

with the following short description: "Gets the topic session associated with this XATopicSession." So I think the strict answer to your question is no, but really the answer is yes, because you can get a TopicSession from the XATopicSession easily.
Back to top
View user's profile Send private message
garonne
PostPosted: Thu Apr 06, 2006 1:49 am    Post subject: Reply with quote

Acolyte

Joined: 26 Jan 2006
Posts: 59

mvic wrote:

The J2EE v1.4 JMS API reference for XATopicSession shows only one function:
Code:
public TopicSession getTopicSession() throws JMSException

with the following short description: "Gets the topic session associated with this XATopicSession." So I think the strict answer to your question is no, but really the answer is yes, because you can get a TopicSession from the XATopicSession easily.


Thanks for your answer, I was a litle lazy when I did not look up the J2EE API reference
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Apr 06, 2006 4:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

I didn't think that any of the XA classes would instantiate properly as objects in the abscence of a transaction manager?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Apr 06, 2006 2:11 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Why not? As per API you should be able to extract the XAResource from the XASession and then bind it to your TM.


_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Apr 07, 2006 3:25 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

fjb_saper wrote:
Why not?

Because I've seen errors in WAS startup complaining about not being able to create XA objects when client bindings were in effect.

But that's only vague recollections and I am extremely fuzzy on the details.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
garonne
PostPosted: Wed Apr 12, 2006 1:33 am    Post subject: Reply with quote

Acolyte

Joined: 26 Jan 2006
Posts: 59

mvic wrote:

Code:
public TopicSession getTopicSession() throws JMSException

with the following short description: "Gets the topic session associated with this XATopicSession." So I think the strict answer to your question is no, but really the answer is yes, because you can get a TopicSession from the XATopicSession easily.


I try myXaTopicSession.getTopicSession().run() without transactional context and it doesn't work.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 12, 2006 7:12 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

garonne wrote:
mvic wrote:

Code:
public TopicSession getTopicSession() throws JMSException

with the following short description: "Gets the topic session associated with this XATopicSession." So I think the strict answer to your question is no, but really the answer is yes, because you can get a TopicSession from the XATopicSession easily.


I try myXaTopicSession.getTopicSession().run() without transactional context and it doesn't work.


Did you try to extract the XAResource from your XATopic session and bind it to your TM?

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
garonne
PostPosted: Wed Apr 12, 2006 11:58 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Jan 2006
Posts: 59

fjb_saper wrote:

Did you try to extract the XAResource from your XATopic session and bind it to your TM?

Enjoy


Before, no. And now yes and it's likely that it work

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » How XATopicSession work?
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.