org.springframework.jms.connection
Class CachingConnectionFactory.CachedSessionInvocationHandler

java.lang.Object
  extended by org.springframework.jms.connection.CachingConnectionFactory.CachedSessionInvocationHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler
Enclosing class:
CachingConnectionFactory

private class CachingConnectionFactory.CachedSessionInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Invocation handler for a cached JMS Session proxy.


Field Summary
private  java.util.Map<CachingConnectionFactory.ConsumerCacheKey,javax.jms.MessageConsumer> cachedConsumers
           
private  java.util.Map<CachingConnectionFactory.DestinationCacheKey,javax.jms.MessageProducer> cachedProducers
           
private  java.util.LinkedList<javax.jms.Session> sessionList
           
private  javax.jms.Session target
           
private  boolean transactionOpen
           
 
Constructor Summary
CachingConnectionFactory.CachedSessionInvocationHandler(javax.jms.Session target, java.util.LinkedList<javax.jms.Session> sessionList)
           
 
Method Summary
private  javax.jms.MessageConsumer getCachedConsumer(javax.jms.Destination dest, java.lang.String selector, boolean noLocal, java.lang.String subscription)
           
private  javax.jms.MessageProducer getCachedProducer(javax.jms.Destination dest)
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
private  void logicalClose(javax.jms.Session proxy)
           
private  void physicalClose()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

private final javax.jms.Session target

sessionList

private final java.util.LinkedList<javax.jms.Session> sessionList

cachedProducers

private final java.util.Map<CachingConnectionFactory.DestinationCacheKey,javax.jms.MessageProducer> cachedProducers

cachedConsumers

private final java.util.Map<CachingConnectionFactory.ConsumerCacheKey,javax.jms.MessageConsumer> cachedConsumers

transactionOpen

private boolean transactionOpen
Constructor Detail

CachingConnectionFactory.CachedSessionInvocationHandler

public CachingConnectionFactory.CachedSessionInvocationHandler(javax.jms.Session target,
                                                               java.util.LinkedList<javax.jms.Session> sessionList)
Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

getCachedProducer

private javax.jms.MessageProducer getCachedProducer(javax.jms.Destination dest)
                                             throws javax.jms.JMSException
Throws:
javax.jms.JMSException

getCachedConsumer

private javax.jms.MessageConsumer getCachedConsumer(javax.jms.Destination dest,
                                                    java.lang.String selector,
                                                    boolean noLocal,
                                                    java.lang.String subscription)
                                             throws javax.jms.JMSException
Throws:
javax.jms.JMSException

logicalClose

private void logicalClose(javax.jms.Session proxy)
                   throws javax.jms.JMSException
Throws:
javax.jms.JMSException

physicalClose

private void physicalClose()
                    throws javax.jms.JMSException
Throws:
javax.jms.JMSException