-
1. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
mmusgrov Jan 4, 2011 6:18 AM (in response to utiao)You could try a combination of one or more of the following:
Use a differerent naming url:
"corbaloc::HOST:3528/NameService"
Explicitly set the factory for creating object instances:
properties.put(Context.OBJECT_FACTORIES, "org.jboss.tm.iiop.client.IIOPClientUserTransactionObjectFactory");
Explicitly tell the naming service which orb to use (make sure it is not null):
properties.put("java.naming.corba.orb", org.jboss.iiop.naming.ORBInitialContextFactory.getORB());
-
2. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
utiao Jan 7, 2011 3:56 AM (in response to mmusgrov)There is no getORB method in org.jboss.iiop.naming.ORBInitialContextFactory, I have added the jboss-iiop.jar and jbossall-client.jar to my $CLASSPATH. And I have explicitely set the factory, but it is still failed.
-
3. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
utiao Jan 7, 2011 4:02 AM (in response to mmusgrov)I checked the log when I deploy a EJB2 and EJB3, when I deploy an EJB2, IOR will be registed, but for EJB3, there is no the log print. I suspect the EJB3 on JBoss does not support IIOP protocol and transaction propagation. I also noticed that the transaction propagation for EJB3 is also failed in this article: http://community.jboss.org/wiki/TransactionPropagationwithJBoss .
Do you successful to propagate transaction to EJB3 in JBoss?
Thanks!
-
4. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
mmusgrov Jan 7, 2011 8:22 AM (in response to utiao)Hi,
ShuiXin Zhang wrote:
There is no getORB method in org.jboss.iiop.naming.ORBInitialContextFactory, I have added the jboss-iiop.jar and jbossall-client.jar to my $CLASSPATH. And I have explicitely set the factory, but it is still failed.
It is odd that you can not find the method. The sources for the iiop jar delivered with the 5.1.0 GA release are available in:
which definitely contains the getORB method.
ShuiXin Zhang wrote:
I suspect the EJB3 on JBoss does not support IIOP protocol and transaction propagation. I also noticed that the transaction propagation for EJB3 is also failed in this article: http://community.jboss.org/wiki/TransactionPropagationwithJBoss
Although it is true that when making EJB3 calls over IIOP (in AS 5 and 6) the transaction context does not get propagated you can still use JRMP. You can still start a transaction from the client by looking up the UserTransaction object and invoking begin on it or you can use transaction attributes on your EJBs. If you do it this way and the invoked EJB then calls another EJB (either EJB model) the transaction will still be propagated.
Do you have a simple test case that you could attach to this thread?
-
5. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
utiao Jan 7, 2011 9:47 AM (in response to mmusgrov)Thank you very much!
For getORB method, I am sorry, I used the JBoss 4.2.2 in the last reply. Now, I found it in JBoss 5.1.0 GA.
For IIOP issue, my original requirement is that I have to propagate a transaction from my product to JBoss by EJB3 over IIOP.
As your work around ways, the transaction has begined before invoking the EJB, I can't get the transaction of JBoss. I don't know if it is possible using JRMP protocol, but from the current test result, it is failed, too.
I can propagate transaction over JRMP between 2 EJBs in the same JBoss, but it is failed by IIOP.
I have a test case for this thread, Please get it from here. http://community.jboss.org/servlet/JiveServlet/downloadBody/16285-102-1-120094/ejb3_trans_propagation_testcase.zip
Thanks!
-
6. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
mmusgrov Jan 7, 2011 10:20 AM (in response to utiao)ShuiXin Zhang wrote:
For IIOP issue, my original requirement is that I have to propagate a transaction from my product to JBoss by EJB3 over IIOP.
As your work around ways, the transaction has begined before invoking the EJB, I can't get the transaction of JBoss. I don't know if it is possible using JRMP protocol, but from the current test result, it is failed, too.
So what kind of transaction is your "product" creating? Is your requirement transaction interoperability between different transaction manager products?
I have a test case for this thread, Please get it from here. http://community.jboss.org/servlet/JiveServlet/downloadBody/16285-102-1-120094/ejb3_trans_propagation_testcase.zip
Where does the test case fail - the zip does not contain all the sources so I can't run it?
-
7. How to propagate a transaction from one EJB3 to another EJB on JBoss.
utiao Jan 9, 2011 8:43 PM (in response to mmusgrov)Hi Michael,
Yes, we need transaction interoperability between different transaction manager products. Our product creates distribute transaction manager, XA transaction. Generally, we make transaction interoperability over IIOP.
The EJB source files are in the jar files. The test case is SimpleClient.java.
Thanks!
-
8. How to propagate a transaction from one EJB3 to another EJB on JBoss.
mmusgrov Jan 14, 2011 6:12 AM (in response to utiao)ShuiXin Zhang wrote:
Hi Michael,
Yes, we need transaction interoperability between different transaction manager products. Our product creates distribute transaction manager, XA transaction. Generally, we make transaction interoperability over IIOP.
Which transaction managers are you using. Please could you provide a description of the clients and EJBs involved in your application setup, including who is starting the transactions (which clients and/or which containers).
The EJB source files are in the jar files. The test case is SimpleClient.java.
Yes I realised the jar contained the sources but it does not contain all of the sources and therefore isn't useful for me. That was the reason why I asked where the test case is failing.
-
9. How to propagate a transaction from one EJB3 to another EJB on JBoss.
utiao Jan 17, 2011 1:20 AM (in response to mmusgrov)Hi Michael,
The transaction manager is written by us fully, and it is privated. If the 2 EJBs on JBoss over IIOP can work, I think it should be ok between our product and JBoss over IIOP.
All source files has been included in the zip file and jar files.
-
10. How to propagate a transaction from one EJB3 to another EJB on JBoss.
mmusgrov Jan 17, 2011 11:05 AM (in response to utiao)If the 2 EJBs on JBoss over IIOP can work, I think it should be ok between our product and JBoss over IIOP.
This requirement is only supported if you are using the EJB2 model. It is not supported with the EJB3 model (https://issues.jboss.org/browse/JBAS-7634)
Although our transaction service implements the JTS specification we do not currently support context propagation to or from other TM products (because, for reasons of backward compatability with our own TM, we use a non standard slot id on the ORB method Interceptors).
-
11. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
geojacob Oct 12, 2015 5:10 AM (in response to mmusgrov)Hello Mike,
Great to see you in this topic. I was actually searching for a while this question and found this post.
It would be great if we can propagate context between multiple TM vendors. Initially i was very happy thinking everyone internally uses JTS so this might be possible.
But this comment made me sad .
Any hope , a workaround or class rewrite or anything , for this issue ?
Thanks
George
-
12. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
mmusgrov Oct 12, 2015 5:18 AM (in response to geojacob)I am planning on looking into this requirement to see what changes are required to enable interoperability. I will update this post when I have something to report.
-
13. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
geojacob Oct 12, 2015 5:29 AM (in response to mmusgrov)Great !! Crossing my fingers for you Mike
-
14. Re: How to propagate a transaction from one EJB3 to another EJB on JBoss.
tomjenkinson Oct 12, 2015 5:33 AM (in response to geojacob)1 of 1 people found this helpfulAlso, it is possible that activity will likely at least link from [JBTM-223] Check WL-to-JBossTS interoperability (via JTS). - JBoss Issue Tracker so it might be worth setting a watch on that one.