@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void someMethod(...) {
// obtain con1 and con2 connection objects
con1 = ...;
con2 = ...;
stmt1 = con1.createStatement();
stmt2 = con2.createStatement();
//
// Perform some updates on con1 and con2. The container
// automatically enlists con1 and con2 with the container-
// managed transaction.
//
}
As we have specified TransactionAttributeType.REQUIRED, container will start a
transaction (i guess on a Connection)
Q- a) Container will start transaction on which Connection (database) Object? From
where it obtains information about my database ?
In other words does container uses JTA (Distributed transaction manager layer),
from where it obtains info regarding my databses,
user password, url etc..
Q- b) What does the statement means "The container automatically enlists con1 and
con2 with the container-manager transaction"?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258541#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...