|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JCA development |
« View previous topic :: View next topic » |
Author |
Message
|
fjcarretero |
Posted: Wed Jun 08, 2005 12:36 am Post subject: JCA development |
|
|
Voyager
Joined: 13 Oct 2003 Posts: 88
|
Hi all,
I'm trying to develope a new JCA following the 1.5 spec. I have successfully managed to read a jms message (thru the message inflow contract) and update a database in the same transaction.
Mi problem starts when I read a jms message from a queue and try to write it to another queue. This is what it happens. Before the message is read, the TM issues a xaResource.start() when it enlists the resource in the transaction. Before the message is written the TM issues the same command (xaResource.start()) where it gets frozen (it never responds). The queues are placed in the same QManager.
It seems that the TM is considering the queues as two different resources. I don't know if this how it should work.
If anybody could bring some light to this problem it will appreciated.
TIA
Felipe |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 08, 2005 11:56 am Post subject: Re: JCA development |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
fjcarretero wrote: |
Hi all,
I'm trying to develope a new JCA following the 1.5 spec. I have successfully managed to read a jms message (thru the message inflow contract) and update a database in the same transaction.
Mi problem starts when I read a jms message from a queue and try to write it to another queue. This is what it happens. Before the message is read, the TM issues a xaResource.start() when it enlists the resource in the transaction. Before the message is written the TM issues the same command (xaResource.start()) where it gets frozen (it never responds). The queues are placed in the same QManager.
It seems that the TM is considering the queues as two different resources. I don't know if this how it should work.
If anybody could bring some light to this problem it will appreciated.
TIA
Felipe |
I hope that you are working in JMS and not in base MQ.
The transaction boundary there is the javax.jms.XASession and not the queue or any other object associated with it.
You may have to extract the XAResource to enroll into the transaction from the XA Session.
When using IBM WAS all this stuff is handled automatically for you behind the scene when using container transactions...
Enjoy  |
|
Back to top |
|
 |
fjcarretero |
Posted: Wed Jun 08, 2005 10:45 pm Post subject: |
|
|
Voyager
Joined: 13 Oct 2003 Posts: 88
|
Thank you very much for the post.
I have been investigating and I have seen the following information in the MQ documentation (WebSphere MQ XA support and Tuxedo):
Quote: |
It is possible for WebSphere MQ on Windows and UNIX systems to block
Tuxedo-coordinated XA applications indefinitely in xa_start. This can occur only
when two or more processes coordinated by Tuxedo in a single global transaction
attempt to access WebSphere MQ using the same transaction branch ID, or XID. If
Tuxedo gives each process in the global transaction a different XID to use with
WebSphere MQ, this cannot occur.
To avoid the problem, configure each application in Tuxedo that will access
WebSphere MQ under a single global transaction ID (gtrid), within its own Tuxedo
server group. Processes in the same server group use the same XID when accessing
resource managers on behalf of a single gtrid, and are therefore vulnerable to
blocking in xa_start in WebSphere MQ. Processes in different server groups use
separate XIDs when accessing resource managers and so will not have to worry
about serializing their transaction work in WebSphere MQ. |
So I think the problem is the TM that I'm using.
Cheers
Felipe |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 09, 2005 11:57 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The other thing you might want to do is bean managed transaction.
You then enroll the MQ resource extracted from the XASession into the transaction.
Perform your commit/rollback and release the resource in a finally.
Enjoy  |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|