TechnoBuzz

A Techno Blog, mainly about Java

JPOX keys

In running JPOX,
for the class element within the xml file, you have to specify a value for the identity-type attribute.
default is identity-type=datastorewhere you leave the aissignment of the IDs to JPOX.
The other choice is identity-type=applicationwhere the developer manages the specification of this identity.
Generating of unique ids for datastore identity is a mandatory.
The generation choices are via the database, JPOX provided poid routines, and user customized poid routines.

To configure a datastore identity class to use SequenceTablePoidGenerator you simply add :
<class name=”myclass” … >
<datastore-identity strategy=”factory” factory-class=”org.jpox.poid.SequenceTablePoidGenerator”/>

</class>

To configure a datastore identity class to use Auto-Increment (supported for db2) you simply add :
<class name=”myclass” … >
<datastore-identity strategy=”autoincrement”/>

</class>

Advertisements

August 5, 2004 Posted by | JDO | 1 Comment

Online Books & Course Material

Sun J2EE Online Course
ServerSide PDF Book
Hibernate in Action sample chapters
MIT OpenCouseWare
XMLblog
classes on Java

August 5, 2004 Posted by | J2EE | Leave a comment

Online Books & Course Material

Sun J2EE Online Course
ServerSide PDF Book
Hibernate in Action sample chapters
MIT OpenCouseWare
XMLblog
classes on Java

August 5, 2004 Posted by | J2EE | Leave a comment