FAQ

Please add any questions that you feel are frequent to this page, together with the answer that would help others

Why is DataNucleus/JPOX not part of Apache?

DataNucleus/JPOX are independent projects since

1. Apache is a loose collection of projects with no general direction or collaboration so JPOX would simply be an independent part of an organisation there.

2. DataNucleus/JPOX infrastructure (website availability, Forum, JIRA, nightly builds, release policy etc) is way in advance of anything that Apache has and moving there would be a step backwards in this respect. The Apache website is often unavailable, they only use mailing lists, they don't have a general policy of providing nightly builds, nor has any Apache project got a Forum etc etc

3. Being part of Apache would not guarantee any more committers as demonstrated by many projects that have moved to Apache

JPOX sounds like an illness. Is it ?

No . JPOX is a persistence framework for Java. There are many inadequacies in the current IT market and it could be seen as having an illness (e.g large corporates attempting to suppress good quality specifications when it is against their own financial interests), so in this respect you could consider JPOX as a retrovirus that attaches itself to the IT market and replicates itself, correcting some of those inadequacies by levelling the playing field for Java persistence.

Does JPOX support object relationships?

Yes JPOX support all kind of relations (1-1, 1-n, n-m). <br />
Informations for JPA are here.
Informations for JDO are here.

Why do I receive a JDODetachedFieldAccessException?

Problem

After detaching an object graph I access a field of one of the detached objects and I receive the exception

Cause

You haven't detached that field of the object either due to
1. You didn't specify a large enough value for "maxFetchDepth" (pm.getFetchPlan().setMaxFetchDepth(val))
2. You didn't have a large enough value of "recursionDepth" for that field (where the field is recursive)
3. The FetchPlan didn't include that field.

Solution

Make sure that the field is detached by setting the fetch plan to include the field in question, and that the maxFetchDepth is large enough, and that recursionDepth for the field is large enough (where it is a recursive field).

How to use JPOX with J2EE

DataNucleus and JPOX can be integrated in J2EE server as JCA connector. This feature have been successfully tested with JBoss, Jonas, WebLogic. This connector will allow you to use DataNucleus or JPOX as a managed data source. Currently, local transactions and distributed (XA) transactions are supported. Within a J2EE environment, JDO transactions are nested in J2EE transactions, using JTA.

More information here

How to disable generation of application IDs when the primary key fields are not null?

Add the extension strategy-when-notnull to the field that should not generate IDs when not null.

<class name="myclass" ... >
    <field name="myfield" primary-key="true" value-strategy="sequence" sequence="YOUR_SEQUENCE_NAME">
      <extension vendor-name="jpox" key="strategy-when-notnull" value="false"/>
    <field>
</class>






Labels

 
(None)