jakarta.resource.spi.endpoint.MessageEndpointFactory interface,
providing transaction management capabilities as well as ClassLoader
exposure for endpoint invocations.
setTransactionManager
| Modifier and Type | Class and Description |
|---|---|
| protected abstract class | AbstractMessageEndpointFactory.AbstractMessageEndpoint
Inner class for actual endpoint implementations, based on template method to allow for any kind of concrete endpoint implementation. |
| private class | AbstractMessageEndpointFactory.TransactionDelegate
Private inner class that performs the actual transaction handling, including enlistment of the endpoint's XAResource. |
| Modifier and Type | Field and Description |
|---|---|
| private String | |
| protected final Log | logger
Logger available to subclasses. |
| private TransactionFactory | |
| private String | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public MessageEndpoint | createEndpoint(XAResource
an optional xaResource)XAResource
instance used to get transaction notifications when the message delivery
is transacted.Implements jakarta. createEndpoint.
|
| public MessageEndpoint | createEndpoint(XAResource
an optional xaResource, long XAResource
instance used to get transaction notifications when the message delivery
is transacted.an optional value used to specify the time duration
(in milliseconds) within which the message endpoint needs to be
created by the timeout)MessageEndpointFactory. Otherwise, the
MessageEndpointFactory rejects the creation of the
MessageEndpoint with an UnavailableException. Note, this
does not offer real-time guarantees.Implements jakarta. createEndpoint.
|
| protected abstract AbstractMessageEndpointFactory. | Returns: the actual endpoint instance (nevernull)Create the actual endpoint instance, as a subclass of the
|
| public String | getActivationName()
Implements jakarta. #getActivationName() method,
returning the bean name as set on this MessageEndpointFactory.
|
| public Class | getEndpointClass()
Implements jakarta. #getEndpointClass() method,
returning null in order to indicate a synthetic endpoint type.
|
| public boolean | isDeliveryTransacted(Method
description of a target method. This information about
the intended target method allows an application server to find out
whether the target method call will be transacted or not. method)Implements jakarta. true if a transaction manager
has been specified; false otherwise.
|
| public void | setBeanName(String
the name of the bean in the factory.
Note that this name is the actual bean name used in the factory, which may
differ from the originally specified name: in particular for inner bean
names, the actual bean name might have been made unique through appending
"#..." suffixes. Use the beanName)BeanFactoryUtils#originalBeanName(String)
method to extract the original bean name (without suffix), if desired.Implements org. |
| public void | setTransactionFactory(TransactionFactory transactionFactory)
Set the Spring TransactionFactory to use for wrapping endpoint invocations, enlisting the endpoint resource in each such transaction. |
| public void | setTransactionManager(Object transactionManager)
Set the XA transaction manager to use for wrapping endpoint invocations, enlisting the endpoint resource in each such transaction. |
| public void | |
| public void |
| beanName | back to summary |
|---|---|
| private String beanName
| |
| logger | back to summary |
|---|---|
| protected final Log logger Logger available to subclasses. | |
| transactionFactory | back to summary |
|---|---|
| private TransactionFactory transactionFactory
| |
| transactionName | back to summary |
|---|---|
| private String transactionName
| |
| transactionTimeout | back to summary |
|---|---|
| private int transactionTimeout | |
| AbstractMessageEndpointFactory | back to summary |
|---|---|
| public AbstractMessageEndpointFactory() | |
| createEndpoint | back to summary |
|---|---|
| public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException Implements jakarta. The standard JCA 1.5 version of This implementation delegates to
| |
| createEndpoint | back to summary |
|---|---|
| public MessageEndpoint createEndpoint(XAResource xaResource, long timeout) throws UnavailableException Implements jakarta. The alternative JCA 1.6 version of This implementation delegates to
| |
| createEndpointInternal | back to summary |
|---|---|
| protected abstract AbstractMessageEndpointFactory. Create the actual endpoint instance, as a subclass of the
| |
| getActivationName | back to summary |
|---|---|
| public String getActivationName() Implements jakarta. Implementation of the JCA 1.7
| |
| getEndpointClass | back to summary |
|---|---|
| public Class Implements jakarta. Implementation of the JCA 1.7
| |
| isDeliveryTransacted | back to summary |
|---|---|
| public boolean isDeliveryTransacted(Method method) throws NoSuchMethodException Implements jakarta. This implementation returns
| |
| setBeanName | back to summary |
|---|---|
| public void setBeanName(String beanName) Implements org. Set the name of this message endpoint. Populated with the bean name automatically when defined within Spring's bean factory.
| |
| setTransactionFactory | back to summary |
|---|---|
| public void setTransactionFactory(TransactionFactory transactionFactory) Set the Spring TransactionFactory to use for wrapping endpoint invocations, enlisting the endpoint resource in each such transaction. Alternatively, specify an appropriate transaction manager through
the If no transaction factory is specified, the endpoint invocation will simply not be wrapped in an XA transaction. Check out your resource provider's ActivationSpec documentation for local transaction options of your particular provider.
| |
| setTransactionManager | back to summary |
|---|---|
| public void setTransactionManager(Object transactionManager) Set the XA transaction manager to use for wrapping endpoint invocations, enlisting the endpoint resource in each such transaction. The passed-in object may be a transaction manager which implements
Spring's If no transaction manager is specified, the endpoint invocation will simply not be wrapped in an XA transaction. Check out your resource provider's ActivationSpec documentation for local transaction options of your particular provider.
| |
| setTransactionName | back to summary |
|---|---|
| public void setTransactionName(String transactionName) Specify the name of the transaction, if any. Default is none. A specified name will be passed on to the transaction manager, allowing to identify the transaction in a transaction monitor. | |
| setTransactionTimeout | back to summary |
|---|---|
| public void setTransactionTimeout(int transactionTimeout) Specify the transaction timeout, if any. Default is -1: rely on the transaction manager's default timeout. Specify a concrete timeout to restrict the maximum duration of each endpoint invocation. | |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private ClassLoader | |
| private AbstractMessageEndpointFactory. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterDelivery()
Implements jakarta. afterDelivery implementation resets the thread context
ClassLoader and completes the transaction, if any.
|
| public void | beforeDelivery(Method
description of a target method. This information about
the intended target method allows an application server to decide
whether to start a transaction during this method call, depending
on the transaction preferences of the target method.
The processing (by the application server) of the actual message
delivery method call on the endpoint must be independent of the
class loader associated with this descriptive method object. method)Implements jakarta. beforeDelivery implementation starts a transaction,
if necessary, and exposes the endpoint ClassLoader as current
thread context ClassLoader.
|
| protected abstract ClassLoader | Returns: the endpoint ClassLoader (nevernull)Template method for exposing the endpoint's ClassLoader (typically the ClassLoader that the message listener class has been loaded with). |
| protected final boolean | hasBeforeDeliveryBeenCalled()
Return whether the |
| pack-priv void | initXAResource(XAResource
the XAResource for this endpoint xaResource)Initialize this endpoint's TransactionDelegate. |
| protected void | onEndpointException(Throwable
the exception thrown from the concrete endpoint ex)Callback method for notifying the endpoint base class that the concrete endpoint invocation led to an exception. |
| public void | release()
Implements jakarta. |
| beforeDeliveryCalled | back to summary |
|---|---|
| private boolean beforeDeliveryCalled | |
| previousContextClassLoader | back to summary |
|---|---|
| private ClassLoader previousContextClassLoader
| |
| transactionDelegate | back to summary |
|---|---|
| private AbstractMessageEndpointFactory. | |
| AbstractMessageEndpoint | back to summary |
|---|---|
| protected AbstractMessageEndpoint() | |
| afterDelivery | back to summary |
|---|---|
| public void afterDelivery() throws ResourceException Implements jakarta. This Note that the JCA 1.7 specification does not require a ResourceAdapter
to call this method after invoking the concrete endpoint. See the
explanation in
| |
| beforeDelivery | back to summary |
|---|---|
| public void beforeDelivery(Method method) throws ResourceException Implements jakarta. This Note that the JCA 1.7 specification does not require a ResourceAdapter
to call this method before invoking the concrete endpoint. If this method
has not been called (check
| |
| getEndpointClassLoader | back to summary |
|---|---|
| protected abstract ClassLoader getEndpointClassLoader() Template method for exposing the endpoint's ClassLoader (typically the ClassLoader that the message listener class has been loaded with).
| |
| hasBeforeDeliveryBeenCalled | back to summary |
|---|---|
| protected final boolean hasBeforeDeliveryBeenCalled() Return whether the | |
| initXAResource | back to summary |
|---|---|
| pack-priv void initXAResource(XAResource xaResource) Initialize this endpoint's TransactionDelegate.
| |
| onEndpointException | back to summary |
|---|---|
| protected void onEndpointException(Throwable ex) Callback method for notifying the endpoint base class that the concrete endpoint invocation led to an exception. To be invoked by subclasses in case of the concrete endpoint throwing an exception.
| |
| release | back to summary |
|---|---|
| public void release() Implements jakarta. Doc from jakarta. This method may be called by the resource adapter to indicate that it no longer needs a proxy endpoint instance. This hint may be used by the application server for endpoint pooling decisions.
| |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Transaction | |
| private final XAResource |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public void |
| rollbackOnly | back to summary |
|---|---|
| private boolean rollbackOnly | |
| transaction | back to summary |
|---|---|
| private Transaction transaction
| |
| xaResource | back to summary |
|---|---|
| private final XAResource xaResource
| |
| TransactionDelegate | back to summary |
|---|---|
| public TransactionDelegate(XAResource xaResource) | |
| beginTransaction | back to summary |
|---|---|
| public void beginTransaction() throws Exception | |
| endTransaction | back to summary |
|---|---|
| public void endTransaction() throws Exception | |
| setRollbackOnly | back to summary |
|---|---|
| public void setRollbackOnly() | |