If multiple partitions are used to process a single transaction, JTA should be used for proper XA transaction support.
Partitioning can be enabled on an Entity, relationship, query, or session/persistence unit. Partition policies are globally named to allow reuse, the partitioning policy must also be set using the @Partitioned annotation to be used.
Partitioned, org.eclipse.persistence.descriptors.partitioning.RangePartitioningPolicy
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public Column | |
| public RangePartition[] | |
| public Class | |
| public boolean | unionUnpartitionableQueries()
Defines if queries that do not contain the partition field should be sent to every database and have the result unioned. |
| name | back to summary |
|---|---|
| public String name() The name of the partition policy, names must be unique for the persistence unit. | |
| partitionColumn | back to summary |
|---|---|
| public Column partitionColumn() The database column or query parameter to partition queries by. This is the table column name, not the class attribute name. The column value must be included in the query and should normally be part of the object's Id. This can also be the name of a query parameter. If a query does not contain the field the query will not be partitioned. | |
| partitions | back to summary |
|---|---|
| public RangePartition[] partitions() (Required) List of connection pool names to load balance across. | |
| partitionValueType | back to summary |
|---|---|
| public Class The type of the start and end values. | |
| unionUnpartitionableQueries | back to summary |
|---|---|
| public boolean unionUnpartitionableQueries() Defines if queries that do not contain the partition field should be sent to every database and have the result unioned. | |