Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jca.endpoint
Class GenericMessageEndpointFactory

    java.lang.Object
      org.springframework.jca.endpoint.AbstractMessageEndpointFactory
          org.springframework.jca.endpoint.GenericMessageEndpointFactory

All Implemented Interfaces:
  javax.resource.spi.endpoint.MessageEndpointFactory

    public class GenericMessageEndpointFactory

extends AbstractMessageEndpointFactory

Generic implementation of the JCA 1.5 `MessageEndpointFactory` interface, providing transaction management capabilities for any kind of message listener object (e.g. `MessageListener` objects or `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 `ResourceAdapter` instance.

Since:
  2.5
Author:
  Juergen Hoeller
See Also:
  `setMessageListener(java.lang.Object)`, `AbstractMessageEndpointFactory.setTransactionManager(java.lang.Object)`, `GenericMessageEndpointManager`

Nested Class Summary
`static class` | `GenericMessageEndpointFactory.InternalResourceException` 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
`GenericMessageEndpointFactory()`

Method Summary
`javax.resource.spi.endpoint.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.

Methods inherited from class org.springframework.jca.endpoint.AbstractMessageEndpointFactory
`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

### GenericMessageEndpointFactory

    public GenericMessageEndpointFactory()

Method Detail

### setMessageListener

    public void setMessageListener(java.lang.Object messageListener)

  Specify the message listener object that the endpoint should expose (e.g. a `MessageListener` objects or `MessageListener` implementation).

### createEndpoint

    public javax.resource.spi.endpoint.MessageEndpoint createEndpoint(javax.transaction.xa.XAResource xaResource)
                                                               throws javax.resource.spi.UnavailableException

  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.

  Specified by:
    `createEndpoint` in interface `javax.resource.spi.endpoint.MessageEndpointFactory`
  Overrides:
    `createEndpoint` in class `AbstractMessageEndpointFactory`
  Throws:
    `javax.resource.spi.UnavailableException`

### createEndpointInternal

    protected AbstractMessageEndpointFactory.AbstractMessageEndpoint createEndpointInternal()
                                                                                     throws javax.resource.spi.UnavailableException

  Creates a concrete generic 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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD