Oracle TopLink API Reference
10g Release 3 (10.1.3)

B13698-01


oracle.toplink.transaction
Class OTSSynchronizationListener

java.lang.Object
  extended byoracle.toplink.transaction.AbstractSynchronizationListener
      extended byoracle.toplink.transaction.OTSSynchronizationListener

All Implemented Interfaces:
SynchronizationListenerFactory

public class OTSSynchronizationListener
extends AbstractSynchronizationListener
implements SynchronizationListenerFactory

Purpose: Synchronization listener implementation for Java Transaction Service (JTS) which is the Java binding of the CORBAservices Common Object Services (Cos) Transaction Service (OTS) 1.x

Description: Instances of this class are invoked during OTS 1.x synchronization callbacks from OTS coordinators. This class may be subclassed to provide specialized behavior for specific transaction implementations. Subclasses must implement the newListener() method to return an instance of the listener subclass.

A JTS Synchronization implementation must actually extend a CORBA object class in order to register for callbacks, so we are in a situation of multiple inheritance where we must extend a CORBA class to work properly, and extend our own abstract listener class to inherit all of the callback processing code. To solve this problem a simple inner class is used and passed in as the actual Synchronization object. When the Synchronization object gets invoked then it delegates the call out to this class (or its subclass). This allows the CORBA-specific code to be encapsulated in the inner class, but also allows subclasses to redefine behavior if required.

See Also:
OTSTransactionController

Nested Class Summary
 class OTSSynchronizationListener.OTSSynchronization
          Inner class that encapsulates the CORBA synchronization definition requirements.

 

Constructor Summary
OTSSynchronizationListener()
          PUBLIC: Used to create factory instances only.

 

Method Summary
 org.omg.CosTransactions.Synchronization getSynchronization()
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

OTSSynchronizationListener

public OTSSynchronizationListener()
PUBLIC: Used to create factory instances only. Use the "full-bodied" constructor for creating proper listener instances.

Method Detail

getSynchronization

public org.omg.CosTransactions.Synchronization getSynchronization()

Copyright © 1998, 2006, Oracle. All Rights Reserved.