PRODUCTS AND SERVICES INDUSTRIES SUPPORT PARTNERS COMMUNITIES ABOUT
  Coherence 3.4 User Guide
  POF User Type Configuration Elements
Added by Tom Pfaeffle, last edited by Patrick Peralta on Sep 30, 2008  (view change)

Labels

 
(None)

This section provides a listing of the elements that can be used to specify POF user types. POF user type configuration elements are defined in the pof-config.dtd file that can be found in the coherence.jar file.

You can find additional information about the POF user type configuration file in the Javadoc for the ConfigurablePofContext class.

POF User Type Deployment Descriptor

Use the POF user type deployment descriptor to specify the various user types which are being passed into the cluster.

Document Location

The name and location of the descriptor defaults to pof-config.xml. The default POF user type descriptor packaged in coherence.jar) will be used unless a custom one is found within the application's classpath. This can also be configured using system property tangosol.pof.config. It is recommended that all nodes within a cluster use identical POF user type descriptors.

Document Root

The root element of the POF user type descriptor is pof-config. This is where you may begin specifying your user types.

Document Format

The POF user type descriptor should begin with the following DOCTYPE declaration:

<!DOCTYPE pof-config SYSTEM "pof-config.dtd">

The format of the document and the nesting of elements is illustrated in the following example.

<pof-config>
   <user-type-list>
     ..
     <user-type>
       <type-id>53</type-id>
       <class-name>com.mycompany.data.Trade</class-name>
       <serializer>
         <class-name>com.tangosol.io.pof.PortableObjectSerializer</class-name>
         <init-params>
           <init-param>
             <param-type>int</param-type>
             <param-value>{type-id}</param-value>
           </init-param>
         </init-params>
       </serializer>
     </user-type>

     <user-type>
       <type-id>54</type-id>
       <class-name>com.mycompany.data.Position</class-name>
     </user-type>

     ..
     <include>file:/my-pof-config.xml</include>

     ..
   </user-type-list>

   <allow-interfaces>false</allow-interfaces>
   <allow-subclasses>false</allow-subclasses>
 </pof-config>

Command Line Override

Oracle Coherence provides a powerful Command Line Setting Override Feature, which allows any element defined in this descriptor to be overridden from the Java command line if it has a system-property attribute defined in the descriptor.

Element Index

The following table lists all elements which may be used from within a POF user type configuration.

Element Used In:
<allow-interfaces> <pof-config>
<allow-subclasses> <pof-config>
<class-name> <user-type>, <serializer>
<include> <user-type-list>
<init-param> <init-params>
<init-params> <serializer>
<param-type> <init-param>
<param-value> <init-param>
<pof-config> root element
<serializer> <user-type>
<type-id> <user-type>
<user-type> <user-type-list>
<user-type-list> <pof-config>