Yes, I agree with you that my question has little to do with JMS. And I was just trying to use it as an example to find out what need to be done if I want a distributed transaction span over two asynchronously invoked services/components.
The most important point you made (and thanks for bringing it up) is that a JTA transaction cannot be actively associated with two threads at the same time. And suspend and resume should be used to tide up the participants to make sure only one particant is actively involved in a JTA transaction. I would like to elaborate why I'm looking at this if you don'y mind. We currently have a project. And for some other reasons, we decided to not use EJB and all our services should be accessed asychronously through messages. But there are some cases that we need two service invocations involved in one global atomic transaction. We don't want to build our transaction service our own and are trying to investigate if we could use a JTA based transaction service already included in an application server like JBoss. I feel that the point - a JTA transaction cannot be actively associated with two threads at the same time - is too strong. Is it part of a JTA spec or just because of implementation limitation? And it will be very difficult to tide up the association of a JTA transaction if the involved services are called asynchronously. Do you see it the same way? And do you think JTA is an option to achieve the requirements of our project? Or should we should look at WS-Transaction? Yes, another concern I have (as you've pointed out) is spec-compliance. My impression is that JTA doesn't specify how transaction context is propagated and associated with a thread. So this could be another factor to determine if we could use JTA. Many thanks! Peng View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862747#3862747 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862747 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
