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 Type
    Method
    Description
    com.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
    Fetch an appropriate JCoDestination from the given JcoResourceHolder.
    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

      String getTid(JcoResourceHolder holder)
      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

      com.sap.conn.jco.JCoDestination getDestination(JcoResourceHolder holder)
      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.JCoException
      Create a new JCoDestination for registration with a JcoResourceHolder.
      Returns:
      the new JCoDestination
      Throws:
      com.sap.conn.jco.JCoException
    • createTid

      String createTid(com.sap.conn.jco.JCoDestination destination) throws com.sap.conn.jco.JCoException
      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