org.geotools.data.jdbc
Class JDBCTransactionState

Object
  extended by JDBCTransactionState
All Implemented Interfaces:
Transaction.State

Deprecated. scheduled for removal in 2.7, use classes in org.geotools.jdbc

public class JDBCTransactionState
extends Object
implements Transaction.State

Holds a JDBC Connectino for JDBCDataStore.

An alternative would be to hold the connection pool in the Transaction State and only construct a connection when setTransaction is called.

Author:
Jody Garnett, Refractions Research
Module:
modules/library/jdbc (gt-jdbc.jar)

Constructor Summary
JDBCTransactionState(Connection connection)
          Deprecated.  
JDBCTransactionState(DataSource pool)
          Deprecated.  
 
Method Summary
 void addAuthorization(String AuthID)
          Deprecated. Not used by JDBCTransactionState Postgis will need to override this method to use strong transaction support.
 void commit()
          Deprecated. Commit the maintained state.
 Connection getConnection()
          Deprecated. Retrieve connection for JDBC operation.
 void rollback()
          Deprecated. Rollback state of Transacstion.
 void setTransaction(Transaction transaction)
          Deprecated. Closes internal connection returns it to the ConnectionPool.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCTransactionState

public JDBCTransactionState(Connection connection)
                     throws IOException
Deprecated. 
Throws:
IOException

JDBCTransactionState

public JDBCTransactionState(DataSource pool)
                     throws IOException
Deprecated. 
Throws:
IOException
Method Detail

getConnection

public Connection getConnection()
Deprecated. 
Retrieve connection for JDBC operation.

This connection may be used to issue JDBC operations against this transaction.

Please do not use:


setTransaction

public void setTransaction(Transaction transaction)
Deprecated. 
Closes internal connection returns it to the ConnectionPool.

Specified by:
setTransaction in interface Transaction.State
Parameters:
transaction -
See Also:
Transaction.State.setTransaction(org.geotools.data.Transaction)

addAuthorization

public void addAuthorization(String AuthID)
                      throws IOException
Deprecated. 
Not used by JDBCTransactionState

Postgis will need to override this method to use strong transaction support.

Specified by:
addAuthorization in interface Transaction.State
Parameters:
AuthID -
Throws:
IOException
See Also:
Transaction.State.addAuthorization(java.lang.String)

commit

public void commit()
            throws IOException
Deprecated. 
Commit the maintained state.

JDBCTransactionState offers native support for this operation

Specified by:
commit in interface Transaction.State
Throws:
IOException
See Also:
Transaction.State.commit()

rollback

public void rollback()
              throws IOException
Deprecated. 
Rollback state of Transacstion.

JDBCTransactionState offers native support for this operation

Specified by:
rollback in interface Transaction.State
Throws:
IOException
See Also:
Transaction.State.rollback()


Copyright © 1996-2009 Geotools. All Rights Reserved.