EclipseLink 2.4.0, build 'v20120608-r11652' API Reference

org.eclipse.persistence.platform.database.oracle.ucp
Class GridLinkDataPartitioningCallback

java.lang.Object
  extended by org.eclipse.persistence.platform.database.oracle.ucp.UCPDataPartitioningCallback
      extended by org.eclipse.persistence.platform.database.oracle.ucp.GridLinkDataPartitioningCallback
All Implemented Interfaces:
oracle.ucp.ConnectionAffinityCallback, oracle.ucp.jdbc.oracle.DataBasedConnectionAffinityCallback, DataPartitioningCallback

public class GridLinkDataPartitioningCallback
extends UCPDataPartitioningCallback

PUBLIC: Integrates with WebLogic GirdLink's data affinity support.

See Also:
PartitioningPolicy
Author:
James Sutherland
Since:
EclipseLink 2.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.ucp.ConnectionAffinityCallback
oracle.ucp.ConnectionAffinityCallback.AffinityPolicy
 
Field Summary
static boolean isRegistered
           
protected static java.lang.ThreadLocal partitionId
          The id is stored in a static thread local.
 
Constructor Summary
GridLinkDataPartitioningCallback()
           
 
Method Summary
 int getPartitionId()
           
 void register(javax.sql.DataSource datSource, Session session)
          Registration only occurs once in WLS (against all data sources), so must be static registered.
static void register(Session session)
          Register with WLS through reflection.
 void setPartitionId(int id)
          Set the partition id for this thread.
 
Methods inherited from class org.eclipse.persistence.platform.database.oracle.ucp.UCPDataPartitioningCallback
getAffinityPolicy, getConnectionAffinityContext, setAffinityPolicy, setConnectionAffinityContext, setDataKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

partitionId

protected static java.lang.ThreadLocal partitionId
The id is stored in a static thread local.


isRegistered

public static boolean isRegistered
Constructor Detail

GridLinkDataPartitioningCallback

public GridLinkDataPartitioningCallback()
Method Detail

register

public void register(javax.sql.DataSource datSource,
                     Session session)
Registration only occurs once in WLS (against all data sources), so must be static registered.

Specified by:
register in interface DataPartitioningCallback
Overrides:
register in class UCPDataPartitioningCallback

register

public static void register(Session session)
Register with WLS through reflection.


setPartitionId

public void setPartitionId(int id)
Set the partition id for this thread.

Specified by:
setPartitionId in interface DataPartitioningCallback
Overrides:
setPartitionId in class UCPDataPartitioningCallback

getPartitionId

public int getPartitionId()
Specified by:
getPartitionId in interface oracle.ucp.jdbc.oracle.DataBasedConnectionAffinityCallback
Overrides:
getPartitionId in class UCPDataPartitioningCallback

EclipseLink 2.4.0, build 'v20120608-r11652' API Reference