Use a Spring descriptor XML file to configure and integrate eXtreme Scale with
Spring.
In the following sections, each element and attribute
of the Spring objectgrid.xsd file is defined.
The Spring objectgrid.xsd file is in the ogspring.jar file
and the objectgrid namespace com/ibm/ws/objectgrid/spring/namespace.
See the Spring objectgrid.xsd file for an example of the
descriptor XML schema.
register element
Use the register element to
register the default bean factory for the ObjectGrid.
- Number of occurrences: Zero to many
- Child element: None
Attributes- id
- Specifies the name of the default bean directory for a particular
ObjectGrid.
- gridname
- Specifies the name of the ObjectGrid instance. The value assigned
to this attribute must correspond to a valid ObjectGrid configured
in the ObjectGrid descriptor file.
<register
(1) id="register id"
(2) gridname="ObjectGrid name"
/>
server element
Use the server element to define
an eXtreme Scale server, which can host a container, a catalog service,
or both.
- Number of occurrences: Zero to many
- Child element: None
Attributes- id
- Specifies the name of the eXtreme Scale server.
- tracespec
- Indicates the type of trace and enables trace and trace specification
for the server.
- tracefile
- Provides the path and name of the traceFile to create and use.
- statspec
- Indicates the statistic specification for the server.
- jmxport
- Designates the unused port number through which you want to enable
JMX/RMI connections. JMX enables monitoring and management from remote
systems.
- isCatalog
- Specifies whether the particular server hosts a catalog service.
The default value is false.
- name
- Specifies the name of the server.
<server
(1) id="server id"
(2) tracespec="the server trace specification"
(3) tracefile="the server trace file"
(4) statspec="the server statistic specification"
(5) jmxport="JMX port number"
(6) isCatalog="true"|”false”
(7) name="the server name”
/>
catalog element
Use the catalog element to
route to container servers in the data grid.
- Number of occurrences: Zero to many
- Child element: None
Attributes- host
- Specifies the host name of the workstation where the catalog service
is running.
- port
- Specifies the port number paired with the host name to determine
the catalog service port which the client can connect to.
<catalog
(1) host="catalog service host name"
(2) port="catalog service port number"
/>
container element
Use the container element
to store the data itself.
- Number of occurrences: Zero to many
- Child element: None
Attributes- objectgridxml
- Specifies the path and name of the descriptor XML file to use
that specifies characteristics for the ObjectGrid, including maps,
locking strategy, and plug-ins.
- deploymentxml
- Specifies the path and name of the XML file that is used with
the descriptor XML to determine partitioning, replication, number
of initial containers, and other settings.
- server
- Specifies the server on which the container is hosted.
<server
(1) objectgridxml="the objectgrid descriptor XML file"
(2) deploymentxml ="the objectgrid deployment descriptor XML file "
(3) server="the server reference "
/>
JPALoader element
Use the JPALoader element
to synchronize the ObjectGrid cache with an existing backend data-store
when using the ObjectMap API.
- Number of occurrences: Zero to many
- Child element: None
Attributes- entityClassName
- Enables usage of JPAs such as EntityManager.persist and EntityManager.find.
The entityClassName attribute is required for
the JPALoader.
- preloadPartition
- Specifies the partition number at which the map preload is started.
If the value is less than 0, or greater than (totalNumberOfPartition
– 1), the map preload is not started.
<JPALoader
(1) entityClassName="the entity class name"
(2) preloadPartition ="int"
/>
JPATxCallback element
Use the JPATxCallback
element to coordinate JPA and ObjectGrid transactions.
- Number of occurrences: Zero to many
- Child element: None
Attributes- persistenceUnitName
- Creates a JPA EntityManagerFactory and locates the JPA entity
meta-data in the persistence.xml file. The persistenceUnitName attribute
is required.
- jpaPropertyFactory
- Specifies the factory to create a persistence property map to
override the default persistence properties. This attribute should
reference a bean.
- exceptionMapper
- Specifies the ExceptionMapper plug-in that can be used for JPA-specific
or database-specific exception mapping functions. This attribute should
reference a bean.
<JPATxCallback
(1) persistenceUnitName="the JPA persistence unit name"
(2) jpaPropertyFactory ="JPAPropertyFactory bean reference"
(3) exceptionMapper="ExceptionMapper bean reference"
/>
JPAEntityLoader element
Use the JPAEntityLoader
element to synchronize the ObjectGrid cache with an existing backend
data-store when using the EntityManager API.
- Number of occurrences: Zero to many
- Child element: None
Attributes- entityClassName
- Enables usage of JPAs such as EntityManager.persist and EntityManager.find.
The entityClassName attribute is optional for
the JPAEntityLoader element. If the element is not configured, the
entity class configured in the ObjectGrid entity map is used. The
same class must be used for the ObjectGrid EntityManager and for the
JPA provider.
- preloadPartition
- Specifies the partition number at which the map preload is started.
If the value is less than 0, or greater than (totalNumberOfPartition
– 1) the map preload is not launched.
<JPAEntityLoader
(1) entityClassName="the entity class name"
(2) preloadPartition ="int"
/>
LRUEvictor element
Use the LRUEvictor element
to decide which entries to evict when a map exceeds its maximum number
of entries.
- Number of occurrences: Zero to many
- Child element: None
Attributes- maxSize
- Specifies the total entries in a queue until the evictor must
intervene.
- sleepTime
- Sets the time in seconds between an evictor's sweep over
map queues to determine any necessary actions on the map.
- numberOfLRUQueues
- Specifies the setting of how many queues the evictor must scan
to avoid having a single queue that is the size of the entire map.
<LRUEvictor
(1) maxSize="int"
(2) sleepTime ="seconds"
(3) numberOfLRUQueues ="int"
/>
LFUEvictor element
Use the LFUEvictor element
to determine which entries to evict when a map exceeds its maximum
number of entries.
- Number of occurrences: Zero to many
- Child element: None
Attributes- maxSize
- Specifies the total entries that are allowed in each heap until
the evictor must act.
- sleepTime
- Sets the time in seconds between an evictor's sweeps over
map heaps to determine any necessary actions on the map.
- numberOfHeaps
- Specifies the setting of how many heaps the evictor must scan
to avoid having a single heap that is the size of the entire map.
<LFUEvictor
(1) maxSize="int"
(2) sleepTime ="seconds"
(3) numberOfHeaps ="int"
HashIndex element
Use the HashIndex element
with Java™ reflection to dynamically
introspect objects stored in a map when the objects are updated.
- Number of occurrences: Zero to many
- Child element: None
Attributes- name
- Specifies the name of the index, which must be unique for each
map.
- attributeName
- Specifies the name of the attribute to index. For field-access
indexes, the attribute name is equivalent to the field name. For property-access
indexes, the attribute name is the JavaBean-compatible property name.
- rangeIndex
- Indicates whether range indexing is enabled. The default value
is false.
- fieldAccessAttribute
- Used for non-entity maps. The getter method is used to access
the data. The default value is false. If you
specify the value as true, the object is accessed
using the fields directly.
- POJOKeyIndex
- Used for non-entity maps. The default value is false.
If you specify the value as true, the index
introspects the object in the key part of the map, which is useful
when the key is a composite key and the value does not have the key
embedded within it. If you do not set the value or you specify the
value as false, the index introspects the object
in the value part of the map.
<HashIndex
(1) name="index name"
(2) attributeName="attribute name"
(3) rangeIndex ="true"|"false"
(4) fieldAccessAttribute ="true"|"false"
(5) POJOKeyIndex ="true"|"false"
/>