org.apache.geronimo.connector.outbound
Class TransactionCachingInterceptor

java.lang.Object
  extended by org.apache.geronimo.connector.outbound.TransactionCachingInterceptor
All Implemented Interfaces:
ConnectionReleaser, ConnectionInterceptor

public class TransactionCachingInterceptor
extends Object
implements ConnectionInterceptor, ConnectionReleaser

TransactionCachingInterceptor.java TODO: This implementation does not take account of unshareable resources TODO: This implementation does not take account of application security where several connections with different security info are obtained. TODO: This implementation does not take account of container managed security where, within one transaction, a security domain boundary is crossed and connections are obtained with two (or more) different subjects.

I suggest a state pattern, with the state set in a threadlocal upon entering a component, will be a usable implementation.

The afterCompletion method will need to move to an interface, and that interface include the security info to distinguish connections.

Created: Mon Sep 29 15:07:07 2003


Nested Class Summary
static class TransactionCachingInterceptor.ManagedConnectionInfos
           
 
Field Summary
protected static Log log
           
 
Constructor Summary
TransactionCachingInterceptor(ConnectionInterceptor next, TransactionManager transactionManager)
           
 
Method Summary
 void afterCompletion(Object stuff)
           
 void destroy()
           
 void getConnection(ConnectionInfo connectionInfo)
           
 void returnConnection(ConnectionInfo connectionInfo, ConnectionReturnAction connectionReturnAction)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Log log
Constructor Detail

TransactionCachingInterceptor

public TransactionCachingInterceptor(ConnectionInterceptor next,
                                     TransactionManager transactionManager)
Method Detail

getConnection

public void getConnection(ConnectionInfo connectionInfo)
                   throws ResourceException
Specified by:
getConnection in interface ConnectionInterceptor
Throws:
ResourceException

returnConnection

public void returnConnection(ConnectionInfo connectionInfo,
                             ConnectionReturnAction connectionReturnAction)
Specified by:
returnConnection in interface ConnectionInterceptor

destroy

public void destroy()
Specified by:
destroy in interface ConnectionInterceptor

afterCompletion

public void afterCompletion(Object stuff)
Specified by:
afterCompletion in interface ConnectionReleaser


Copyright © 2003-2010 Apache Software Foundation. All Rights Reserved.