Author |
Message
|
garonne |
Posted: Wed Apr 05, 2006 6:39 am Post subject: How XATopicSession work? |
|
|
Acolyte
Joined: 26 Jan 2006 Posts: 59
|
Can anyone explain me how an XATopicSession work? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Apr 05, 2006 6:44 am Post subject: |
|
|
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 |
|
 |
garonne |
Posted: Wed Apr 05, 2006 11:11 pm Post subject: |
|
|
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 |
|
 |
mvic |
Posted: Thu Apr 06, 2006 12:21 am Post subject: |
|
|
 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 |
|
 |
garonne |
Posted: Thu Apr 06, 2006 1:49 am Post subject: |
|
|
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 |
|
 |
jefflowrey |
Posted: Thu Apr 06, 2006 4:31 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Thu Apr 06, 2006 2:11 pm Post subject: |
|
|
 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 |
|
 |
jefflowrey |
Posted: Fri Apr 07, 2006 3:25 am Post subject: |
|
|
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 |
|
 |
garonne |
Posted: Wed Apr 12, 2006 1:33 am Post subject: |
|
|
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 |
|
 |
fjb_saper |
Posted: Wed Apr 12, 2006 7:12 pm Post subject: |
|
|
 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 |
|
 |
garonne |
Posted: Wed Apr 12, 2006 11:58 pm Post subject: |
|
|
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 |
|
 |
|