InterposedTransactionManager
I'm trying to get an instance of the InterposedTransactionManager from my
client application, so that I can register WebLogic as an XAResource in my
own TransactionManager.
According to the javadoc on the
TxHelper.getClientInterposedTransactionManager() call, you can use JNDI to
find the object instead of this method. (which avoids having to use the
entire weblogic.jar file).
With the "examplesServer" running, I issue the jndi call to lookup the
"weblogic.transaction.coordinators.examplesServer" object. This returns a
TransactionManagerWrapper object that cannot be cast to an
InterposedTransactionManager class.
I've also tried directly calling the
getClientInterposedTransactionManager( ctx, "examplesServer" ) method, but
it returns null.
Any ideas on what I'm missing. I need to be able to get the
InterposedTransactionManager.getXAResource() method, and preferably, without
including the entire weblogic.jar file (e.g. using the TxHelper class).
Thanks.
As per the first exception, XA resource enlistment with foreign TMs is only supported on the server - so you can either use WebLogic transactions, or run the adapter on a WL server. If you'd like to see enhancements in this area, it would help if you contacted WebLogic customer support and asked them to work with the WebLogic JMS product manager (Dave Dabelus).
Tom
Similar Messages
-
Weblogic.transaction.XAException: XAER_RMERR
We have JMS adapter product which uses our own transaction manager to manage an XA global transaction. Using this product we can configure a XA connection and able to produce a message to JMS Queue. Our JMS adapter product works fine with almost all other JMS provider (Sonic, webspere etc) except weblogic. I am using weblogic 9.2. In our code we use to invoke the XAResource() as below
((XAQueueSession)queueSession).getXAResource()
but this throws an error as "can only be called from server". I learnt that in client JVM you can not call getXAResource API directly, rather we should use TxHelper.getClientInterposedTransactionManager(context, serverName). We had introduced following code.
InterposedTransactionManager itm = TxHelper.getClientInterposedTransactionManager(ctx1, "examplesServer");
xaResource = itm.getXAResource();
The above code works fine. Now I am getting XAResource object. But when I produce a message to weblogic JMS Queue, I get the following exception
weblogic.transaction.XAException: XAER_RMERR : A resource manager error has occured in the transaction branch. ClientTM[examplesServer+172.31.91.57:7001+wl_server+t3+].XAResource.commit() fails.
at weblogic.transaction.internal.XAResourceHelper.throwXAException(XAResourceHelper.java:172)
at weblogic.transaction.internal.TransactionManagerImpl$TMXAResource.commit(TransactionManagerImpl.java:993)
at weblogic.transaction.internal.ClientTransactionManagerImpl$ClientTMXAResource.commit(ClientTransactionManagerImpl.java:136)
at com.wm.app.b2b.server.jca.transactions.Tran.commit(Tran.java:209)
at com.wm.app.b2b.server.jca.transactions.Tran.delistResource(Tran.java:482)
at com.wm.app.b2b.server.jca.transactions.TransactionImpl.delistResource(TransactionImpl.java:89)
We are using JDK1.5. I am not sure why we are getting the above exception. Our JMS adapter code works fine with almost all other JMS provider even with XA transaction support. The problem is only with Weblogic JMS server.
Any help on this would be appreciated.
Thanks,
SagarAs per the first exception, XA resource enlistment with foreign TMs is only supported on the server - so you can either use WebLogic transactions, or run the adapter on a WL server. If you'd like to see enhancements in this area, it would help if you contacted WebLogic customer support and asked them to work with the WebLogic JMS product manager (Dave Dabelus).
Tom -
WLS 8.1 an the XAResource interface
Hi I wonder if someone could advise me
I've created a remote JMS client which is using a third party transaction manager to manage an XA global transaction consisting of many JMS Queue from various WLS servers.
My problem comes when I try to gain an XAResource from the underlying JMS Queues (needed to enlist them in the overall transaction).
I take an javax XAQueueSession object which points to a JMS Queue on a WLS 8.1 server and try to invoke the .getXAResource() method to produce the javax XAResource. The problem is it keeps returning me a null pointer.
the creation of the XAQueueSession is built up in this manner
1.) Look up connectionFactory from context, cast to an XAQueueConnnectionFactory
2.) XAQueueConnnectionFactory produces an XAQueueConnection
3.) XAQueueConnection creates an XAQueueSession
4.) XAQueueConnection is then started
5.) XAQueueSession is used to gain an XAResource which produces a null pointer
Question
-=-=-=-=-=-=
1) Does WLS 8.1 support the Javax XAResource interface? if it does is it possible to get an XAResource object from the XAQueueSession?
Any comments on these quesions would be useful
Kind Regards
BarrySince WLS JMS is clustered, it's a little more complex, because once you start two-phase commit transactions, you need to always go back to the same server in the cluster to resolve them.
The best-documented way to do this is to use the weblogic.transaction package, which is part of the Javadocs found here:
http://e-docs.bea.com/wls/docs81/javadocs/index.html
You need to call the following method from the weblogic.transaction package:
TxHelper.getClientInterposedTransactionManager()
This takes a JNDI InitialContext, and also a server name. Once you "prepare" a transaction, you'll have to go back to that server to commit it or roll it back.
The InterposedTransactionManager object that's returned represents the JTA transaction manager on the server that you named. You can call "getXAResource" on it to get the XAResource that you'll need.
You will also want to route your JMS calls from your client through the server that you got the transaction manager for. If you don't have a cluster, this is pretty simple. If you have a cluster, then you should create a JMS ConnectionFactory that's targeted to a single server, so that your client calls and your XA calls go to the same node in the cluster.
The folks on the JTA newsgroup, or BEA Support, should be able to help you with the details if things don't work out, but those are the basics.
Maybe you are looking for
-
is there a way to create form fields to tab into and type and or drop down selection fields in pages as you can with microsoft word?
-
I turned my iPhone off because it was being slow. I went to turn it back on and it WON'T turn back on. It will do the loading to turn back on then show me the apple that its back on then the screen turns blue then turns off and goes to the loading pa
-
Dear all experts, I need your helps please. We have oracle enterprise 9i2 installed and oracle fail safe installed on the server. We run cluster. All of a sudden, i ran into a problem to create a dump file for backup. at the command prompt i type in:
-
Does anyone have any suggestions on why I can get sound and picture when streaming from the clouds but picture only when using iplay from my pad?
-
Reporting Subscriptions Failing - "Failure Sending Mail". Must be something obvious!
I've spent the last few hours on this and cannot for the life of me figure what it is that I have overlooked. I have created a report email subscription, nothing particularly fancy. It is always failing on: Failure sending mail: The SMTP server requi