[jboss-user] [EJB 3.0 Users] - Transaction Demarcation : Same vs Different Server

enagy do-not-reply at jboss.com
Tue Sep 29 10:41:03 EDT 2009


Greetings

Am running JBoss 4.0.5 Application Server

Deployed thereon, as an ear file, is an EJB 3 Stateless Session Bean

The Bean, by neccessity performs its own transaction demarcation (i.e the Bean performs explicit beginTransaction and commitTransaction via calls to Hibernate V 3.2.5).

The Bean is invoked by a Service deployed as a sar file. The Bean is accessed by the Service, in ALL cases, via a JNDI Naming Context lookup.

The Service class also  performs its own explicit transactional demarcation.

The problem is that the Service class behaves differently in the situation where it is deployed in a different application server instance to the Bean  than if they are deployed in the same server.

In the situation of seperate servers it is possible to support two distinct simulataneous transactions (the desired result) . In the case of colocated archives deployed to the same server it is not. In this case the Beans commitTransaction also closes the open transaction in the calling Service . This is not desired, two independent transactions should be maintained in this case as well.

Ive  breifly investigated forcing the Service not to perform any call optomization (e.g forcing a remoting lookup rather than a direct in memory method call) but without luck.

How can I enforce distinct Transactional Contexts in the colocated case

E.






View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257667#4257667

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257667



More information about the jboss-user mailing list