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,MessageConsumer> cachedConsumers
           
private  java.util.Map<CachingConnectionFactory.DestinationCacheKey,MessageProducer> cachedProducers
           
private  java.util.LinkedList<Session> sessionList
           
private  Session target
           
private  boolean transactionOpen
           
 
Constructor Summary
CachingConnectionFactory.CachedSessionInvocationHandler(Session target, java.util.LinkedList<Session> sessionList)
           
 
Method Summary
private  MessageConsumer getCachedConsumer(Destination dest, java.lang.String selector, boolean noLocal, java.lang.String subscription)
           
private  MessageProducer getCachedProducer(Destination dest)
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
private  void logicalClose(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 Session target

sessionList

private final java.util.LinkedList<Session> sessionList

cachedProducers

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

cachedConsumers

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

transactionOpen

private boolean transactionOpen
Constructor Detail

CachingConnectionFactory.CachedSessionInvocationHandler

public CachingConnectionFactory.CachedSessionInvocationHandler(Session target,
                                                               java.util.LinkedList<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 MessageProducer getCachedProducer(Destination dest)
                                   throws JMSException
Throws:
JMSException

getCachedConsumer

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

logicalClose

private void logicalClose(Session proxy)
                   throws JMSException
Throws:
JMSException

physicalClose

private void physicalClose()
                    throws JMSException
Throws:
JMSException