Interface DestinationFactoryUtils.ResourceFactory
- Enclosing class:
DestinationFactoryUtils
public static interface DestinationFactoryUtils.ResourceFactory
Callback interface for resource creation.
Serving as argument for the
doGetTransactionalTid
method.-
Method Summary
Modifier and TypeMethodDescriptioncom.sap.conn.jco.JCoDestination
Create a new JCoDestination for registration with a JcoResourceHolder.createTid
(com.sap.conn.jco.JCoDestination destination) Create a new Tid for registration with a JcoResourceHolder.com.sap.conn.jco.JCoDestination
getDestination
(JcoResourceHolder holder) Fetch an appropriate JCoDestination from the given JcoResourceHolder.getTid
(JcoResourceHolder holder) Fetch an appropriate Tid from the given JcoResourceHolder.boolean
Return 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.
-
Method Details
-
getTid
Fetch an appropriate Tid from the given JcoResourceHolder.- Parameters:
holder
- the JcoResourceHolder- Returns:
- an appropriate Tid fetched from the holder,
or
null
if none found
-
getDestination
Fetch an appropriate JCoDestination from the given JcoResourceHolder.- Parameters:
holder
- the JcoResourceHolder- Returns:
- an appropriate JCoDestination fetched from the holder,
or
null
if none found
-
createDestination
com.sap.conn.jco.JCoDestination createDestination() throws com.sap.conn.jco.JCoExceptionCreate a new JCoDestination for registration with a JcoResourceHolder.- Returns:
- the new JCoDestination
- Throws:
com.sap.conn.jco.JCoException
-
createTid
Create a new Tid for registration with a JcoResourceHolder.- Parameters:
destination
- the JCoDestination to create a String for- Returns:
- the new Tid
- Throws:
com.sap.conn.jco.JCoException
- if thrown by API methods
-
isSynchedLocalTransactionAllowed
boolean isSynchedLocalTransactionAllowed()Return 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.- Returns:
- whether to allow for synchronizing a local JMS transaction
-