public class GenericMessageEndpointFactory extends AbstractMessageEndpointFactory
javax.resource.spi.endpoint.MessageEndpointFactory
interface,
providing transaction management capabilities for any kind of message
listener object (e.g. javax.jms.MessageListener
objects or
javax.resource.cci.MessageListener
objects.
Uses AOP proxies for concrete endpoint instances, simply wrapping the specified message listener object and exposing all of its implemented interfaces on the endpoint instance.
Typically used with Spring's GenericMessageEndpointManager
,
but not tied to it. As a consequence, this endpoint factory could
also be used with programmatic endpoint management on a native
javax.resource.spi.ResourceAdapter
instance.
setMessageListener(java.lang.Object)
,
AbstractMessageEndpointFactory.setTransactionManager(java.lang.Object)
,
GenericMessageEndpointManager
Modifier and Type | Class and Description |
---|---|
private class |
GenericMessageEndpointFactory.GenericMessageEndpoint
Private inner class that implements the concrete generic message endpoint,
as an AOP Alliance MethodInterceptor that will be invoked by a proxy.
|
static class |
GenericMessageEndpointFactory.InternalResourceException
Internal exception thrown when a ResourceException has been encountered
during the endpoint invocation.
|
AbstractMessageEndpointFactory.AbstractMessageEndpoint
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
messageListener |
logger
Constructor and Description |
---|
GenericMessageEndpointFactory() |
Modifier and Type | Method and Description |
---|---|
MessageEndpoint |
createEndpoint(javax.transaction.xa.XAResource xaResource)
Wrap each concrete endpoint instance with an AOP proxy,
exposing the message listener's interfaces as well as the
endpoint SPI through an AOP introduction.
|
protected AbstractMessageEndpointFactory.AbstractMessageEndpoint |
createEndpointInternal()
Creates a concrete generic message endpoint, internal to this factory.
|
void |
setMessageListener(java.lang.Object messageListener)
Specify the message listener object that the endpoint should expose
(e.g.
|
createEndpoint, getActivationName, isDeliveryTransacted, setBeanName, setTransactionFactory, setTransactionManager, setTransactionName, setTransactionTimeout
public void setMessageListener(java.lang.Object messageListener)
javax.jms.MessageListener
objects or
javax.resource.cci.MessageListener
implementation).public MessageEndpoint createEndpoint(javax.transaction.xa.XAResource xaResource) throws UnavailableException
createEndpoint
in class AbstractMessageEndpointFactory
UnavailableException
protected AbstractMessageEndpointFactory.AbstractMessageEndpoint createEndpointInternal() throws UnavailableException
createEndpointInternal
in class AbstractMessageEndpointFactory
null
)UnavailableException
- if no endpoint is available at present