org.akubraproject.txn
Class SQLTransactionalConnection
java.lang.Object
org.akubraproject.impl.AbstractBlobStoreConnection
org.akubraproject.txn.AbstractTransactionalConnection
org.akubraproject.txn.SQLTransactionalConnection
- All Implemented Interfaces:
- Synchronization, org.akubraproject.BlobStoreConnection
- Direct Known Subclasses:
- TransactionalConnection
public abstract class SQLTransactionalConnection
- extends AbstractTransactionalConnection
A basic superclass for sql-based transactional store connections. This just closes the sql
connection at the end and provides an Iterator implementation for implementing
listBlobIds
.
- Author:
- Ronald Tschalär
Fields inherited from class org.akubraproject.impl.AbstractBlobStoreConnection |
closed, owner, streamManager |
Method Summary |
void |
afterCompletion(int status)
Invoked after the transaction has completed, i.e. |
Methods inherited from class org.akubraproject.impl.AbstractBlobStoreConnection |
close, ensureOpen, getBlob, getBlobStore, isClosed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.akubraproject.BlobStoreConnection |
listBlobIds |
xaCon
protected final XAConnection xaCon
- The xa connection being used
con
protected final Connection con
- The db connection being used
SQLTransactionalConnection
protected SQLTransactionalConnection(org.akubraproject.BlobStore owner,
org.akubraproject.BlobStore bStore,
XAConnection xaCon,
Connection con,
Transaction tx,
Map<String,String> hints)
throws IOException
- Create a new sql-based transactional connection.
- Parameters:
owner
- the blob-store we belong tobStore
- the underlying blob-store to usexaCon
- the xa connection to usecon
- the db connection to usetx
- the transaction we belong tohints
- the hints to pass to openConnection on bStore
- Throws:
IOException
- if an error occurs initializing this connection
afterCompletion
public void afterCompletion(int status)
- Description copied from class:
AbstractTransactionalConnection
- Invoked after the transaction has completed, i.e. after a rollback or commit has finished.
This is always callled.
Subclasses that override this must make sure to invoke super.afterCompletion
so that the cleanup code in this implementation is run. This implementation cleans up deleted
or added blobs (depending on the outcome of the transaction).
- Specified by:
afterCompletion
in interface Synchronization
- Overrides:
afterCompletion
in class AbstractTransactionalConnection
- See Also:
Synchronization.afterCompletion(int)
Copyright © 2009-2012 DuraSpace. All Rights Reserved.