Spring Framework

org.springframework.jms.listener.endpoint
Class JmsMessageEndpointFactory

java.lang.Object
  extended by org.springframework.jca.endpoint.AbstractMessageEndpointFactory
      extended by org.springframework.jms.listener.endpoint.JmsMessageEndpointFactory
All Implemented Interfaces:
javax.resource.spi.endpoint.MessageEndpointFactory

public class JmsMessageEndpointFactory
extends AbstractMessageEndpointFactory

JMS-specific implementation of the JCA 1.5 MessageEndpointFactory interface, providing transaction management capabilities for a JMS listener object (e.g. a MessageListener object).

Uses a static endpoint implementation, simply wrapping the specified message listener object and exposing all of its implemented interfaces on the endpoint instance.

Typically used with Spring's JmsMessageEndpointManager, but not tied to it. As a consequence, this endpoint factory could also be used with programmatic endpoint management on a native ResourceAdapter instance.

Since:
2.5
Author:
Juergen Hoeller
See Also:
setMessageListener(javax.jms.MessageListener), AbstractMessageEndpointFactory.setTransactionManager(java.lang.Object), JmsMessageEndpointManager

Nested Class Summary
static class JmsMessageEndpointFactory.JmsResourceException
          Internal exception thrown when a ResourceExeption has been encountered during the endpoint invocation.
 
Nested classes/interfaces inherited from class org.springframework.jca.endpoint.AbstractMessageEndpointFactory
AbstractMessageEndpointFactory.AbstractMessageEndpoint
 
Field Summary
 
Fields inherited from class org.springframework.jca.endpoint.AbstractMessageEndpointFactory
logger
 
Constructor Summary
JmsMessageEndpointFactory()
           
 
Method Summary
protected  AbstractMessageEndpointFactory.AbstractMessageEndpoint createEndpointInternal()
          Creates a concrete JMS message endpoint, internal to this factory.
 void setMessageListener(javax.jms.MessageListener messageListener)
          Set the JMS MessageListener for this endpoint.
 
Methods inherited from class org.springframework.jca.endpoint.AbstractMessageEndpointFactory
createEndpoint, createEndpoint, isDeliveryTransacted, setTransactionFactory, setTransactionManager, setTransactionName, setTransactionTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsMessageEndpointFactory

public JmsMessageEndpointFactory()
Method Detail

setMessageListener

public void setMessageListener(javax.jms.MessageListener messageListener)
Set the JMS MessageListener for this endpoint.


createEndpointInternal

protected AbstractMessageEndpointFactory.AbstractMessageEndpoint createEndpointInternal()
                                                                                 throws javax.resource.spi.UnavailableException
Creates a concrete JMS message endpoint, internal to this factory.

Specified by:
createEndpointInternal in class AbstractMessageEndpointFactory
Returns:
the actual endpoint instance (never null)
Throws:
javax.resource.spi.UnavailableException - if no endpoint is available at present

Spring Framework