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 »

  1. Thank you soo much..I just started working on JDO with JPOX, I am new to JDO…I had few questions..I could not find anywhere in the net searching for a long time..you web site, this site provided almost all I expected… Again Thanks

    Rahuman Sheriff

    Comment by Rahuman Sheriff | September 6, 2004 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: