org.apache.juddi.util.jdbc
Class Transaction

java.lang.Object
  extended by org.apache.juddi.util.jdbc.Transaction

public class Transaction
extends java.lang.Object

Transaction txn = new Transaction(); txn.begin(conn1); txn.begin(conn2); txn.begin(conn3); txn.commit(); txn.rollback();

Author:
Graeme Riddell

Constructor Summary
Transaction()
          default constructor
 
Method Summary
 void begin(java.sql.Connection conn)
          If the connection is known then do nothing.
 void commit()
          commit on all connections.
 void rollback()
          rollback on all connections.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Transaction

public Transaction()
default constructor

Method Detail

begin

public void begin(java.sql.Connection conn)
           throws java.sql.SQLException
If the connection is known then do nothing. If the connection is new then issue a SQL begin work and hold onto it for later. Actually the begin work is implicit and autocommit drives whether a transaction is progressed.

Throws:
java.sql.SQLException

commit

public void commit()
            throws java.sql.SQLException
commit on all connections. This is not XA, but it could be one day.

Throws:
java.sql.SQLException

rollback

public void rollback()
              throws java.sql.SQLException
rollback on all connections. This is not XA, but it could be one day.

Throws:
java.sql.SQLException


Copyright © 2004-2007. All Rights Reserved.