[jboss-user] [EJB 3.0 Users] - CMT and Connection Objects

CatchSandeepVaid do-not-reply at jboss.com
Sat Oct 3 12:24:10 EDT 2009

        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#4258541

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

More information about the jboss-user mailing list