Class GridLinkDataPartitioningCallback
java.lang.Object
org.eclipse.persistence.platform.database.oracle.ucp.UCPDataPartitioningCallback
org.eclipse.persistence.platform.database.oracle.ucp.GridLinkDataPartitioningCallback
- All Implemented Interfaces:
oracle.ucp.ConnectionAffinityCallback
,oracle.ucp.jdbc.oracle.DataBasedConnectionAffinityCallback
,DataPartitioningCallback
PUBLIC:
Integrates with WebLogic GirdLink's data affinity support.
- See Also:
- Author:
- James Sutherland
-
Nested Class Summary
Nested classes/interfaces inherited from interface oracle.ucp.ConnectionAffinityCallback
oracle.ucp.ConnectionAffinityCallback.AffinityPolicy
-
Field Summary
Modifier and TypeFieldDescriptionstatic boolean
protected static ThreadLocal
The id is stored in a static thread local. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
void
register
(DataSource datSource, Session session) Registration only occurs once in WLS (against all data sources), so must be static registered.static void
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
-
Field Details
-
partitionId
The id is stored in a static thread local. -
isRegistered
public static boolean isRegistered
-
-
Constructor Details
-
GridLinkDataPartitioningCallback
public GridLinkDataPartitioningCallback()
-
-
Method Details
-
register
Registration only occurs once in WLS (against all data sources), so must be static registered.- Specified by:
register
in interfaceDataPartitioningCallback
- Overrides:
register
in classUCPDataPartitioningCallback
-
register
Register with WLS through reflection. -
setPartitionId
public void setPartitionId(int id) Set the partition id for this thread.- Specified by:
setPartitionId
in interfaceDataPartitioningCallback
- Overrides:
setPartitionId
in classUCPDataPartitioningCallback
-
getPartitionId
public int getPartitionId()- Specified by:
getPartitionId
in interfaceoracle.ucp.jdbc.oracle.DataBasedConnectionAffinityCallback
- Overrides:
getPartitionId
in classUCPDataPartitioningCallback
-