public abstract class DestinationFactoryUtils extends Object
based on ConnectionFactoryUtils
Modifier and Type | Class and Description |
---|---|
static interface |
DestinationFactoryUtils.ResourceFactory
Callback interface for resource creation.
|
Constructor and Description |
---|
DestinationFactoryUtils() |
Modifier and Type | Method and Description |
---|---|
static com.sap.conn.jco.JCoDestination |
doGetTransactionalDestination(SapSystemImpl sapSystem,
DestinationFactoryUtils.ResourceFactory resourceFactory)
Obtain a JCoDestination that is synchronized with the current transaction, if any.
|
static String |
doGetTransactionalTid(SapSystemImpl sapSystem,
DestinationFactoryUtils.ResourceFactory resourceFactory)
Obtain a JMS String that is synchronized with the current transaction, if any.
|
static com.sap.conn.jco.JCoDestination |
getTransactionalDestination(SapSystemImpl sapSystem,
boolean synchedLocalTransactionAllowed) |
static String |
getTransactionalTid(SapSystemImpl sapSystem,
com.sap.conn.jco.JCoDestination existingDestination,
boolean synchedLocalTransactionAllowed)
Obtain a TID String that is synchronized with the current transaction, if any.
|
static boolean |
isDestinationTransactional(com.sap.conn.jco.JCoDestination destination,
SapSystemImpl sapSystem)
Determine whether the given JCoDestination is transactional, that is,
bound to the current thread by Spring's transaction facilities.
|
public static boolean isDestinationTransactional(com.sap.conn.jco.JCoDestination destination, SapSystemImpl sapSystem)
destination
- the JCoDestination to checksapSystem
- the SapSystem that the Session originated frompublic static String getTransactionalTid(SapSystemImpl sapSystem, com.sap.conn.jco.JCoDestination existingDestination, boolean synchedLocalTransactionAllowed) throws SapException, com.sap.conn.jco.JCoException
sapSystem
- the SapSystem to obtain a TID forexistingDestination
- the existing JCoDestination to obtain a String for
(may be null
)synchedLocalTransactionAllowed
- whether to allow for a local JMS transaction
that is synchronized with a Spring-managed transaction (where the main transaction
might be a JDBC-based one for a specific DataSource, for example), with the JMS
transaction committing right after the main transaction. If not allowed, the given
SapSystem needs to handle transaction enlistment underneath the covers.null
if none foundSapException
- in case of JCo failurecom.sap.conn.jco.JCoException
public static com.sap.conn.jco.JCoDestination getTransactionalDestination(SapSystemImpl sapSystem, boolean synchedLocalTransactionAllowed) throws SapException, com.sap.conn.jco.JCoException
SapException
com.sap.conn.jco.JCoException
public static String doGetTransactionalTid(SapSystemImpl sapSystem, DestinationFactoryUtils.ResourceFactory resourceFactory) throws com.sap.conn.jco.JCoException
sapSystem
- the JMS SapSystem to bind for
(used as TransactionSynchronizationManager key)resourceFactory
- the ResourceFactory to use for extracting or creating
JMS resourcesnull
if none foundcom.sap.conn.jco.JCoException
- in case of failurepublic static com.sap.conn.jco.JCoDestination doGetTransactionalDestination(SapSystemImpl sapSystem, DestinationFactoryUtils.ResourceFactory resourceFactory) throws com.sap.conn.jco.JCoException
sapSystem
- the JMS SapSystem to bind for
(used as TransactionSynchronizationManager key)resourceFactory
- the ResourceFactory to use for extracting or creating
JMS resourcesnull
if none foundcom.sap.conn.jco.JCoException
- in case of failureCopyright © 2023 Frank!Framework. All rights reserved.