org.jencks
Class SingletonEndpointFactory

java.lang.Object
  extended by org.jencks.EndpointFactorySupport
      extended by org.jencks.SingletonEndpointFactory
All Implemented Interfaces:
javax.resource.spi.endpoint.MessageEndpointFactory, org.springframework.beans.factory.InitializingBean

public class SingletonEndpointFactory
extends EndpointFactorySupport
implements org.springframework.beans.factory.InitializingBean

An implementation of MessageEndpointFactory which always uses a single shared instance of a MessageListener for every endpoint, irrespective of how many physical endpoints are used.

Version:
$Revision: 47 $

Field Summary
 
Fields inherited from class org.jencks.EndpointFactorySupport
transactionManager
 
Constructor Summary
SingletonEndpointFactory()
           
SingletonEndpointFactory(javax.jms.MessageListener messageListener)
           
SingletonEndpointFactory(javax.jms.MessageListener messageListener, javax.transaction.TransactionManager tm)
           
 
Method Summary
 void afterPropertiesSet()
           
protected  javax.jms.MessageListener createMessageListener()
           
 javax.jms.MessageListener getMessageListener()
           
 void setMessageListener(javax.jms.MessageListener messageListener)
           
 
Methods inherited from class org.jencks.EndpointFactorySupport
createEndpoint, getAcknowledgeMode, getAcknowledgeTpe, getName, getTransactionManager, isDeliveryTransacted, setAcknowledgeMode, setAcknowledgeType, setName, setTransactionManager, toString, wrapXAResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SingletonEndpointFactory

public SingletonEndpointFactory()

SingletonEndpointFactory

public SingletonEndpointFactory(javax.jms.MessageListener messageListener)

SingletonEndpointFactory

public SingletonEndpointFactory(javax.jms.MessageListener messageListener,
                                javax.transaction.TransactionManager tm)
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

getMessageListener

public javax.jms.MessageListener getMessageListener()

setMessageListener

public void setMessageListener(javax.jms.MessageListener messageListener)

createMessageListener

protected javax.jms.MessageListener createMessageListener()
                                                   throws javax.resource.spi.UnavailableException
Specified by:
createMessageListener in class EndpointFactorySupport
Throws:
javax.resource.spi.UnavailableException


Copyright © 2010 LogicBlaze, Inc.. All Rights Reserved.