Class Utility


  • public class Utility
    extends Object
    This is an Utility class containing helper functions.
    • Method Detail

      • getControl

        public static org.omg.CosTransactions.Control getControl()
        Obtain the current Control object.
        Returns:
        the current control object, or null if the Control cannot be obtained.
        See Also:
        Control
      • getCoordinator

        public static org.omg.CosTransactions.Coordinator getCoordinator​(org.omg.CosTransactions.Control control)
        Obtain the coordinator object from the supplied control.

        If a null control is supplied, an null coordinator will be returned.

        Parameters:
        control - the control object for which the coordinator will be returned
        Returns:
        the coordinator, or null if no coordinator can be obtained.
        See Also:
        Control, Coordinator
      • getXID

        public static XID getXID​(org.omg.CosTransactions.Coordinator coordinator)
        Obtain the global transaction identifier for the supplied coordinator.
        Parameters:
        coordinator - the coordinator representing the transaction for which the global transaction identifier is required
        Returns:
        the global transaction identifier.
        See Also:
        XID
      • getXID

        public static XID getXID()
        Obtain the global transaction identifier for the current transaction.
        Returns:
        the global transaction identifier.
        See Also:
        XID