Author: allee8285
Date: Mon Apr 15 21:35:41 2013
New Revision: 1468233
URL: http://svn.apache.org/r1468233
Log:
OPENJPA-2368 extentable xsd updates
Added:
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestCacheRefresh.java
(with props)
Modified:
openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd
openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd
openjpa/branches/2.2.x/openjpa-project/CHANGES.txt
openjpa/branches/2.2.x/openjpa-project/RELEASE-NOTES.html
openjpa/branches/2.2.x/openjpa-project/src/doc/manual/ref_guide_meta.xml
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml
openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd
openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd
openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml
Modified:
openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
(original)
+++
openjpa/branches/2.2.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
Mon Apr 15 21:35:41 2013
@@ -115,7 +115,7 @@ import serp.util.Strings;
*
* @author Abe White
*/
-public class PCEnhancer {
+public class PCEnhancer {
// Designates a version for maintaining compatbility when PCEnhancer
// modifies enhancement that can break serialization or other contracts
// Each enhanced class will return the value of this field via
@@ -215,7 +215,7 @@ public class PCEnhancer {
private boolean _bcsConfigured = false;
private boolean _optimizeIdCopy = false; // whether to attempt optimizing
id copy
-
+
/**
* Constructor. Supply configuration and type to enhance. This will look
* up the metadata for <code>type</code> from <code>conf</code>'s
@@ -284,7 +284,7 @@ public class PCEnhancer {
} else
_repos = repos;
_meta = _repos.getMetaData(type.getType(), loader, false);
-
+
configureOptimizeIdCopy();
}
@@ -1441,7 +1441,7 @@ public class PCEnhancer {
// pcVersionInit = true;
loadManagedInstance(code, false);
code.constant().setValue(1);
- putfield(code, null, VERSION_INIT_STR, boolean.class);
+ putfield(code, null, VERSION_INIT_STR, boolean.class,
fmds[i]);
}
}
code.vreturn();
@@ -1519,7 +1519,9 @@ public class PCEnhancer {
*/
private int beginSwitchMethod(String name, Code code) {
boolean copy = (PRE + "CopyField").equals(name);
- int fieldNumber = (copy) ? 1 : 0;
+ boolean setField = (PRE + "ReadExternalSetField").equals(name);
+ boolean returnObject = (PRE + "WriteExternalGetField").equals(name);
+ int fieldNumber = (copy || setField) ? 1 : 0;
int relLocal = code.getNextLocalsIndex();
if (getCreateSubclass()) {
@@ -1541,17 +1543,23 @@ public class PCEnhancer {
if (_meta.getPCSuperclass() != null) {
loadManagedInstance(code, false);
String[] args;
- if (copy) {
- args = new String[]{ getType(_meta.getPCSuperclassMetaData()).
- getName(), int.class.getName() };
+ if (copy || setField) {
+ args = new String[]{
+ copy ? getType(_meta.getPCSuperclassMetaData()).getName()
: Object.class.getName(),
+ int.class.getName() };
code.aload().setParam(0);
- } else
+ } else {
args = new String[]{ int.class.getName() };
+ }
code.iload().setParam(fieldNumber);
code.invokespecial().setMethod(getType(_meta.
getPCSuperclassMetaData()).getName(), name,
- void.class.getName(), args);
- code.vreturn();
+ (returnObject ? Object.class : void.class).getName(), args);
+ if( returnObject ) {
+ code.areturn();
+ } else {
+ code.vreturn();
+ }
} else
throwException(code, IllegalArgumentException.class);
@@ -2018,7 +2026,7 @@ public class PCEnhancer {
// id.<field> = pc.<field>;
FieldMetaData[] fmds = getCreateSubclass() ? _meta.getFields()
: _meta.getDeclaredFields();
- Class<?> type;
+ Class<?> type;
String name;
Field field;
Method setter;
@@ -3177,14 +3185,15 @@ public class PCEnhancer {
// ##### limiting to JPA @Transient limitations
FieldMetaData[] fmds = _meta.getFields();
for (int i = 0; i < fmds.length; i++) {
- if (fmds[i].isTransient())
+ FieldMetaData fmd = fmds[i];
+ if (fmd.isTransient())
continue;
// o.<field> = this.<field> (or reflective analog)
code.dup(); // for putfield
code.aload().setThis(); // for getfield
- getfield(code, _managedType, fmds[i].getName());
- putfield(code, _managedType, fmds[i].getName(),
- fmds[i].getDeclaredType());
+ getfield(code, _managedType, fmd.getName(), fmd);
+ putfield(code, _managedType, fmd.getName(),
+ fmd.getDeclaredType(), fmd);
}
code.areturn().setType(Object.class);
@@ -3405,7 +3414,7 @@ public class PCEnhancer {
// return true
// else return null; // (returning null because we don't know
the correct answer)
loadManagedInstance(code, false);
- getfield(code, null, VERSION_INIT_STR);
+ getfield(code, null, VERSION_INIT_STR, null);
ifins = code.ifeq();
code.getstatic().setField(Boolean.class, "TRUE",
Boolean.class);
code.areturn();
@@ -3878,7 +3887,7 @@ public class PCEnhancer {
loadManagedInstance(code, true);
code.constant().setValue(1);
// pcVersionInit = true;
- putfield(code, null, VERSION_INIT_STR, boolean.class);
+ putfield(code, null, VERSION_INIT_STR, boolean.class, fmd);
}
code.vreturn();
@@ -3971,7 +3980,7 @@ public class PCEnhancer {
// return pcDetachedState;
loadManagedInstance(code, false);
getfield(code, _managedType.getProject().loadClass(declarer),
- name);
+ name, null);
} else
code.constant().setNull();
code.areturn();
@@ -3988,13 +3997,31 @@ public class PCEnhancer {
loadManagedInstance(code, false);
code.aload().setParam(0);
putfield(code, _managedType.getProject().loadClass(declarer),
- name, Object.class);
+ name, Object.class, null);
}
code.vreturn();
code.calculateMaxStack();
code.calculateMaxLocals();
}
+ private BCField findFieldInManagedTypeHierarchy(BCClass declarer, String
fieldName) {
+ // next, find the field in the managed type hierarchy
+ BCField field = null;
+ outer: for (BCClass bc = _pc; bc != null; bc = bc.getSuperclassBC()) {
+ BCField[] fields = AccessController
+ .doPrivileged(J2DoPrivHelper.getBCClassFieldsAction(bc,
fieldName));
+ for (int i = 0; i < fields.length; i++) {
+ field = fields[i];
+ // if we reach a field declared in this type, then this is the
+ // most-masking field, and is the one that we want.
+ if (fields[i].getDeclarer() == declarer) {
+ break outer;
+ }
+ }
+ }
+ return field;
+ }
+
/**
* Adds to <code>code</code> the instructions to get field
* <code>attrName</code> declared in type <code>declarer</code>
@@ -4003,7 +4030,7 @@ public class PCEnhancer {
* The instance to access must already be on the top of the
* stack when this is invoked.
*/
- private void getfield(Code code, BCClass declarer, String attrName) {
+ private void getfield(Code code, BCClass declarer, String attrName,
FieldMetaData fmd) {
if (declarer == null)
declarer = _managedType;
@@ -4011,20 +4038,7 @@ public class PCEnhancer {
String fieldName = toBackingFieldName(attrName);
// next, find the field in the managed type hierarchy
- BCField field = null;
- outer: for (BCClass bc = _pc; bc != null; bc = bc.getSuperclassBC()) {
- BCField[] fields = AccessController
- .doPrivileged(J2DoPrivHelper.getBCClassFieldsAction(bc,
- fieldName));
- for (int i = 0; i < fields.length; i++) {
- field = fields[i];
- // if we reach a field declared in this type, then this is the
- // most-masking field, and is the one that we want.
- if (fields[i].getDeclarer() == declarer) {
- break outer;
- }
- }
- }
+ BCField field = findFieldInManagedTypeHierarchy(declarer, fieldName);
if (getCreateSubclass() && code.getMethod().getDeclarer() == _pc
&& (field == null || !field.isPublic())) {
@@ -4037,7 +4051,7 @@ public class PCEnhancer {
code.invokestatic().setMethod(Reflection.class,
"findField", Field.class, new Class[] {
Class.class, String.class, boolean.class });
- Class type = _meta.getField(attrName).getDeclaredType();
+ Class<?> type = _meta.getField(attrName).getDeclaredType();
try {
code.invokestatic().setMethod(
getReflectionGetterMethod(type, Field.class));
@@ -4048,8 +4062,23 @@ public class PCEnhancer {
if (!type.isPrimitive() && type != Object.class)
code.checkcast().setType(type);
} else {
- code.getfield().setField(declarer.getName(), fieldName,
- field.getType().getName());
+ if (!getRedefine() &&
+ (field.getAccessFlags() & Constants.ACCESS_PRIVATE) != 0
&& _pc != field.getDeclarer()
+ && fmd != null) {
+ // private field in declaring super class
+ int fieldIndex = fmd.getIndex();
+ code.constant().setValue(fieldIndex);
+ code.invokevirtual().setMethod(PRE + "WriteExternalGetField",
Object.class,
+ new Class[] {int.class});
+ if (fmd.getDeclaredType().isPrimitive()) {
+ code.checkcast().setType(toPrimitiveWrapper(fmd));
+ Class<?> typeClass = unwrapSingleFieldIdentity(fmd);
+ code.invokevirtual().setMethod(typeClass.getName() +
"Value", typeClass, null);
+ }
+ } else {
+ code.getfield().setField(declarer.getName(), fieldName,
+ field.getType().getName());
+ }
}
}
@@ -4063,7 +4092,7 @@ public class PCEnhancer {
* and the instance to load into must be second.
*/
private void putfield(Code code, BCClass declarer, String attrName,
- Class fieldType) {
+ Class<?> fieldType, FieldMetaData fmd) {
if (declarer == null)
declarer = _managedType;
@@ -4084,9 +4113,127 @@ public class PCEnhancer {
fieldType.isPrimitive() ? fieldType : Object.class,
Field.class });
} else {
- code.putfield()
- .setField(declarer.getName(), fieldName, fieldType.getName());
+ BCField field = findFieldInManagedTypeHierarchy(declarer,
fieldName);
+ if ((field.getAccessFlags() & Constants.ACCESS_PRIVATE) != 0 &&
_pc != field.getDeclarer()
+ && fmd != null) {
+ // private field in declaring super class
+ if (fmd.getDeclaredType().isPrimitive()) {
+ Class<?> typeClass = toPrimitiveWrapper(fmd);
+ code.invokestatic().setMethod(typeClass, "valueOf",
typeClass,
+ new Class[] { unwrapSingleFieldIdentity(fmd) });
+ }
+ int fieldIndex = fmd.getIndex();
+ code.constant().setValue(fieldIndex);
+ code.invokevirtual().setMethod(PRE + "ReadExternalSetField",
void.class,
+ new Class[] {
+ Object.class,
+ int.class});
+ } else {
+ code.putfield()
+ .setField(declarer.getName(), fieldName,
fieldType.getName());
+ }
+ }
+ }
+
+ /**
+ * Adds the {@link PersistenceCapable#pcReadExternalSetField} methods to
the bytecode.
+ */
+ private void addReadExternalSetField()
+ throws NoSuchMethodException {
+ // protected void pcReadExternalSetField (int fieldNumber, Object
value)
+ BCMethod method = _pc.declareMethod(PRE + "ReadExternalSetField",
void.class,
+ new Class[]{ Object.class, int.class });
+ method.makeProtected();
+ Code code = method.getCode(true);
+
+ // adds everything through the switch ()
+ int relLocal = beginSwitchMethod(PRE + "ReadExternalSetField", code);
+
+ // if no fields in this inst, just throw exception
+ FieldMetaData[] fmds = getCreateSubclass() ? _meta.getFields()
+ : _meta.getDeclaredFields();
+ if (fmds.length == 0)
+ throwException(code, IllegalArgumentException.class);
+ else {
+ // switch (val)
+ code.iload().setLocal(relLocal);
+ TableSwitchInstruction tabins = code.tableswitch();
+ tabins.setLow(0);
+ tabins.setHigh(fmds.length - 1);
+
+ // <field> = ((fieldType)value);
+ for (int i = 0; i < fmds.length; i++) {
+ FieldMetaData fmd = fmds[i];
+ // for the putfield call below.
+ tabins.addTarget(loadManagedInstance(code, false, fmd));
+ code.aload().setParam(0);
+
+ code.checkcast().setType(toPrimitiveWrapper(fmd));
+ if (fmd.getDeclaredType().isPrimitive()) {
+ Class<?> typeClass = unwrapSingleFieldIdentity(fmd);
+ code.invokevirtual().setMethod(toPrimitiveWrapper(fmd),
+ typeClass.getName() + "Value", typeClass, null );
+ }
+ putfield(code, null, fmd.getName(), fmd.getDeclaredType(),
fmd);
+
+ code.vreturn();
+ }
+ // default: throw new IllegalArgumentException ()
+ tabins.setDefaultTarget(throwException
+ (code, IllegalArgumentException.class));
+ }
+ code.calculateMaxStack();
+ code.calculateMaxLocals();
+ }
+
+ /**
+ * Adds the {@link PersistenceCapable#pcWriteExternalGetField} methods to
the bytecode.
+ */
+ private void addWriteExternalGetField()
+ throws NoSuchMethodException {
+ // protected void pcWriteExternalGetField (int fieldNumber)
+ BCMethod method = _pc.declareMethod(PRE + "WriteExternalGetField",
Object.class,
+ new Class[]{ int.class });
+ method.makeProtected();
+ Code code = method.getCode(true);
+
+ // adds everything through the switch ()
+ int relLocal = beginSwitchMethod(PRE + "WriteExternalGetField", code);
+
+ // if no fields in this inst, just throw exception
+ FieldMetaData[] fmds = getCreateSubclass() ? _meta.getFields()
+ : _meta.getDeclaredFields();
+ if (fmds.length == 0)
+ throwException(code, IllegalArgumentException.class);
+ else {
+ // switch (val)
+ code.iload().setLocal(relLocal);
+ TableSwitchInstruction tabins = code.tableswitch();
+ tabins.setLow(0);
+ tabins.setHigh(fmds.length - 1);
+
+ // <field> = ((fieldType)value);
+ for (int i = 0; i < fmds.length; i++) {
+ FieldMetaData fmd = fmds[i];
+ Class<?> type = fmd.getDeclaredType();
+ // for the putfield call below.
+ tabins.addTarget(loadManagedInstance(code, false, fmd));
+
+ code.getfield().setField(fmd.getName(), type);
+ // we only have special signatures for primitives and Strings
+ if (type.isPrimitive()) {
+ Class<?> typeClass = toPrimitiveWrapper(fmd);
+ code.invokestatic().setMethod(typeClass, "valueOf",
typeClass,
+ new Class[] { unwrapSingleFieldIdentity(fmd) });
+ }
+ code.areturn();
+ }
+ // default: throw new IllegalArgumentException ()
+ tabins.setDefaultTarget(throwException
+ (code, IllegalArgumentException.class));
}
+ code.calculateMaxStack();
+ code.calculateMaxLocals();
}
/**
@@ -4159,8 +4306,10 @@ public class PCEnhancer {
unmgd.add(fields[i]);
}
+ addReadExternalSetField();
addReadExternal(parentDetachable, detachedState);
addReadUnmanaged(unmgd, parentDetachable);
+ addWriteExternalGetField();
addWriteExternal(parentDetachable, detachedState);
addWriteUnmanaged(unmgd, parentDetachable);
}
@@ -4317,7 +4466,7 @@ public class PCEnhancer {
if (!type.isPrimitive() && type != Object.class)
code.checkcast().setType(type);
if (fmd == null)
- putfield(code, null, fieldName, type);
+ putfield(code, null, fieldName, type, fmd);
else {
addSetManagedValueCode(code, fmd);
switch (fmd.getDeclaredTypeCode()) {
@@ -4501,7 +4650,7 @@ public class PCEnhancer {
code.aload().setParam(0);
loadManagedInstance(code, false);
if (fmd == null)
- getfield(code, null, fieldName);
+ getfield(code, null, fieldName, fmd);
else
addGetManagedValueCode(code, fmd);
Class[] args = new Class[]{ type };
@@ -4539,7 +4688,7 @@ public class PCEnhancer {
// since it would sacrifice lazy loading and efficient dirty tracking.
if (getRedefine() || isFieldAccess(fmd)) {
- getfield(code, null, fmd.getName());
+ getfield(code, null, fmd.getName(), fmd);
} else if (getCreateSubclass()) {
// property access, and we're not redefining. If we're operating
// on an instance that is definitely the same type as 'this', then
@@ -4549,7 +4698,7 @@ public class PCEnhancer {
Method meth = (Method) fmd.getBackingMember();
code.invokespecial().setMethod(meth);
} else {
- getfield(code, null, fmd.getName());
+ getfield(code, null, fmd.getName(), fmd);
}
} else {
// regular enhancement + property access
@@ -4575,7 +4724,7 @@ public class PCEnhancer {
// since it would sacrifice lazy loading and efficient dirty tracking.
if (getRedefine() || isFieldAccess(fmd)) {
- putfield(code, null, fmd.getName(), fmd.getDeclaredType());
+ putfield(code, null, fmd.getName(), fmd.getDeclaredType(), fmd);
} else if (getCreateSubclass()) {
// property access, and we're not redefining. invoke the
// superclass method to bypass tracking.
@@ -4871,7 +5020,7 @@ public class PCEnhancer {
BCClass bc;
PCEnhancer enhancer;
Collection persAwareClasses = new HashSet();
-
+
int status;
for (Iterator itr = classes.iterator(); itr.hasNext();) {
Object o = itr.next();
Modified:
openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
(original)
+++
openjpa/branches/2.2.x/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
Mon Apr 15 21:35:41 2013
@@ -65,7 +65,7 @@ public abstract class XMLMetaDataParser
(XMLMetaDataParser.class);
private static boolean _schemaBug;
- private static final String OPENJPA_NAMESPACE =
"http://www.apache.org/openjpa/ns/orm";
+ private static final String OPENJPA_NAMESPACE =
"http://openjpa.apache.org/ns/orm";
protected int _extendedNamespace = 0;
protected int _openjpaNamespace = 0;
Modified:
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml
(original)
+++
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml
(original)
+++
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml
(original)
+++
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml
(original)
+++
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml
(original)
+++
openjpa/branches/2.2.x/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
(original)
+++
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/SequencedActionsTest.java
Mon Apr 15 21:35:41 2013
@@ -31,6 +31,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import javax.persistence.Cache;
import javax.persistence.EntityManager;
import javax.persistence.LockModeType;
import javax.persistence.Query;
@@ -171,14 +172,22 @@ public abstract class SequencedActionsTe
}
protected Log getDumpStackLog() {
- return emf.getConfiguration().getLog("DumpStack");
+ if (emf != null) {
+ return emf.getConfiguration().getLog("DumpStack");
+ } else {
+ return null;
+ }
}
protected void logStack(Throwable t) {
StringWriter str = new StringWriter();
PrintWriter print = new PrintWriter(str);
t.printStackTrace(print);
- getDumpStackLog().trace(str.toString());
+ if (getDumpStackLog() != null) {
+ getDumpStackLog().trace(str.toString());
+ } else {
+ System.err.println(str.toString());
+ }
}
private void notifyParent() {
@@ -216,6 +225,9 @@ public abstract class SequencedActionsTe
// OpenJPA entity manager API
Detach, // ();
+ // OpenJPA entity manager factory API
+ ClearCache, // ()
+
// Transaction API
StartTx, // ()
CommitTx, // ()
@@ -247,6 +259,7 @@ public abstract class SequencedActionsTe
SaveVersion, // ([int id])
TestVersion, // (int id, int increment)
TestLockMode, // (int id, LockModeType lockMode)
+ TestInCache, // ([int id[, boolean expectedInCache]])
Test, // Open-ended testing actions
};
@@ -530,6 +543,13 @@ public abstract class SequencedActionsTe
log.trace("Employee (after) :" + detEmployee);
break;
+ case ClearCache:
+ Cache cache = em.getEntityManagerFactory().getCache();
+ if (cache != null) {
+ cache.evictAll();
+ }
+ break;
+
case StartTx:
em.getTransaction().begin();
break;
@@ -577,7 +597,7 @@ public abstract class SequencedActionsTe
}
if (waitTime < MinThreadWaitInMs / 2)
waitTime = MinThreadWaitInMs / 2;
- log.trace(">> Started wait for " + waitTime + " ms");
+ log.trace(">> Started thread " + waitThreadid + " wait for
" + waitTime + " ms");
if( waitThreadid != 0) {
thisThread.wait(waitTime);
} else {
@@ -773,6 +793,26 @@ public abstract class SequencedActionsTe
}
break;
+ case TestInCache:
+ id = 1;
+ boolean expectedInCache = false;
+ if (args.length > 1) {
+ id = (Integer)args[1];
+ }
+ if (args.length > 2) {
+ expectedInCache = (Boolean)args[2];
+ }
+ Cache testCache = em.getEntityManagerFactory().getCache();
+ if (testCache != null) {
+ boolean inCache =
testCache.contains(LockEmployee.class, id);
+ log.trace("cache.contains(Employee("+id+")) = " +
inCache);
+ assertTrue(curAct + ":TestInCache Expecting=" +
expectedInCache
+ + ", Testing=" + inCache + "]", inCache ==
expectedInCache);
+ } else {
+ log.info(curAct+":TestInCache - No Cache found.");
+ }
+ break;
+
case WaitAllChildren:
// wait for threads to die or timeout
log.trace("checking if thread is alive for " +
@@ -833,7 +873,11 @@ public abstract class SequencedActionsTe
break;
case Sleep:
- Thread.sleep((Integer) args[1]);
+ int sleepMS = 5000;
+ if (args.length > 1) {
+ sleepMS = (Integer) args[1];
+ }
+ Thread.sleep(sleepMS);
break;
case DetachSerialize:
id = 1;
Added:
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestCacheRefresh.java
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestCacheRefresh.java?rev=1468233&view=auto
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestCacheRefresh.java
(added)
+++
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestCacheRefresh.java
Mon Apr 15 21:35:41 2013
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.openjpa.persistence.lockmgr;
+
+import javax.persistence.EntityManager;
+import javax.persistence.LockModeType;
+
+/**
+ * Test EntityManager find/namedQuery deadlock exceptions.
+ */
+public class TestCacheRefresh extends SequencedActionsTest {
+
+ public void setUp() {
+// setSupportedDatabases(
+// org.apache.openjpa.jdbc.sql.DB2Dictionary.class,
+// org.apache.openjpa.jdbc.sql.DerbyDictionary.class
+//);
+// if (isTestsDisabled()) {
+// return;
+// }
+
+ setUp(LockEmployee.class
+ , "javax.persistence.sharedCache.mode", "all"
+ , "openjpa.LockManager", "mixed"
+// , "openjpa.DataCache", "true"
+// , "openjpa.RemoteCommitProvider", "sjvm"
+// , "openjpa.jdbc.TransactionIsolation", "read-committed"
+ );
+ commonSetUp();
+ EntityManager em = emf.createEntityManager();
+// dbType = getDBType(em);
+ }
+
+ /* ======== Find dead lock exception test ============*/
+ public void testCacheRefresh() {
+// String[] parameters = new String[] { "Thread 1: lock= " + t1Lock +
", expectedEx= "
+// + Arrays.toString(t1Exceptions) };
+
+ Object[][] threadMain = {
+ {Act.CreateEm},
+ {Act.StartTx},
+
+ {Act.Clear},
+ {Act.ClearCache},
+
+ {Act.Find, 1},
+ {Act.TestInCache, 1, true},
+
+ {Act.NewThread, 1 },
+ {Act.StartThread, 1 },
+
+ {Act.Wait, 0},
+ {Act.Refresh},
+ {Act.TestInCache, 1, true},
+ {Act.TestEmployee, 1, "Modified First Name"},
+ {Act.CommitTx},
+
+ {Act.StartTx},
+ {Act.Clear},
+
+ {Act.Find, 1},
+ {Act.TestInCache, 1, true},
+ {Act.TestEmployee, 1, "Modified First Name"},// "Def FirstName"},
//"Modified First Name"},
+
+ {Act.RollbackTx},
+ {Act.Sleep, 500},
+ {Act.WaitAllChildren},
+ };
+ Object[][] thread1 = {
+ {Act.CreateEm},
+ {Act.StartTx},
+ {Act.FindWithLock, 1, LockModeType.PESSIMISTIC_FORCE_INCREMENT},
+ {Act.Notify, 0},
+
+ {Act.UpdateEmployee, 1, "Modified First Name"},
+ {Act.CommitTx},
+// {Act.Sleep, 3 },
+ };
+ launchActionSequence("TestCacheRefresh", null, threadMain, thread1);
+ }
+}
Propchange:
openjpa/branches/2.2.x/openjpa-persistence-locking/src/test/java/org/apache/openjpa/persistence/lockmgr/TestCacheRefresh.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified:
openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd
(original)
+++
openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd
Mon Apr 15 21:35:41 2013
@@ -18,8 +18,8 @@
under the License.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:extendable-orm="http://www.apache.org/openjpa/ns/orm/extendable"
+ targetNamespace="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:extendable-orm="http://openjpa.apache.org/ns/orm/extendable"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
Modified:
openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd
(original)
+++
openjpa/branches/2.2.x/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd
Mon Apr 15 21:35:41 2013
@@ -18,15 +18,15 @@
under the License.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.apache.org/openjpa/ns/orm"
- xmlns:openjpa-orm="http://www.apache.org/openjpa/ns/orm"
- xmlns:extendable-orm="http://www.apache.org/openjpa/ns/orm/extendable"
+ targetNamespace="http://openjpa.apache.org/ns/orm"
+ xmlns:openjpa-orm="http://openjpa.apache.org/ns/orm"
+ xmlns:extendable-orm="http://openjpa.apache.org/ns/orm/extendable"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0">
- <xsd:import
namespace="http://www.apache.org/openjpa/ns/orm/extendable"/>
+ <xsd:import namespace="http://openjpa.apache.org/ns/orm/extendable"/>
<xsd:import namespace="http://java.sun.com/xml/ns/persistence/orm"/>
<!-- **************************************************** -->
Modified: openjpa/branches/2.2.x/openjpa-project/CHANGES.txt
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-project/CHANGES.txt?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-project/CHANGES.txt (original)
+++ openjpa/branches/2.2.x/openjpa-project/CHANGES.txt Mon Apr 15 21:35:41 2013
@@ -117,6 +117,7 @@ Included Changes in OpenJPA 2.2.2
Bug
+ [OPENJPA-2172] - openjpa-all jar is missing slf4j runtime dependency
[OPENJPA-2196] - Create Sequence Postgres 9.1
[OPENJPA-2233] - Failed to invoke pcGetIDOwningClass method on embeddable
entity with ID annotation
[OPENJPA-2235] - "READ_UNCOMMITTED" setting for the fetch plan isolation
level is ignored in DB2Dictionary
@@ -146,6 +147,8 @@ Improvement
[OPENJPA-2348] - Cache calculated hashCode in OpenJPAId
[OPENJPA-2353] - Reduce object allocations
[OPENJPA-2354] - Removed synchronized from enhancer added
pcReplaceStateManager method
+ [OPENJPA-2368] - Move www.apache.org/openjpa/ns/orm to
openjpa.apache.org/ns/orm
+
New Feature
Modified: openjpa/branches/2.2.x/openjpa-project/RELEASE-NOTES.html
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-project/RELEASE-NOTES.html?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-project/RELEASE-NOTES.html (original)
+++ openjpa/branches/2.2.x/openjpa-project/RELEASE-NOTES.html Mon Apr 15
21:35:41 2013
@@ -134,6 +134,8 @@ in each release of OpenJPA.</P>
<h2> Bug
</h2>
<ul>
+<li>[<a
href='https://issues.apache.org/jira/browse/OPENJPA-2172'>OPENJPA-2172</a>] -
openjpa-all jar is missing slf4j runtime dependency
+</li>
<li>[<a
href='https://issues.apache.org/jira/browse/OPENJPA-2196'>OPENJPA-2196</a>] -
Create Sequence Postgres 9.1
</li>
<li>[<a
href='https://issues.apache.org/jira/browse/OPENJPA-2233'>OPENJPA-2233</a>] -
Failed to invoke pcGetIDOwningClass method on embeddable entity with ID
annotation
@@ -191,6 +193,8 @@ in each release of OpenJPA.</P>
</li>
<li>[<a
href='https://issues.apache.org/jira/browse/OPENJPA-2354'>OPENJPA-2354</a>] -
Removed synchronized from enhancer added pcReplaceStateManager method
</li>
+<li>[<a
href='https://issues.apache.org/jira/browse/OPENJPA-2368'>OPENJPA-2368</a>] -
Move www.apache.org/openjpa/ns/orm to openjpa.apache.org/ns/orm
+</li>
</ul>
<h2> New Feature
Modified:
openjpa/branches/2.2.x/openjpa-project/src/doc/manual/ref_guide_meta.xml
URL:
http://svn.apache.org/viewvc/openjpa/branches/2.2.x/openjpa-project/src/doc/manual/ref_guide_meta.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
--- openjpa/branches/2.2.x/openjpa-project/src/doc/manual/ref_guide_meta.xml
(original)
+++ openjpa/branches/2.2.x/openjpa-project/src/doc/manual/ref_guide_meta.xml
Mon Apr 15 21:35:41 2013
@@ -987,7 +987,7 @@ public class Magazine
<para>
OpenJPA has extended the JPA 2.0 schema to include elements and attributes
corresponding
to OpenJPA extended metadata and mapping annotations. The schema are contained
in 2
-files: <ulink
url="http://openjpa.apache.org/builds/latest/docs/schema/extendable-orm.xsd">
+files: <ulink
url="http://openjpa.apache.org/builds/latest/docs/schema/extendable/extendable-orm.xsd">
extendable-orm.xsd</ulink> and
<ulink
url="http://openjpa.apache.org/builds/latest/docs/schema/openjpa-orm.xsd">openjpa-orm.xsd</ulink>.
The extendable-orm.xsd file provides copies of some of the JPA 2.0 schema
elements with additional schema to make it
@@ -1007,8 +1007,8 @@ schemas as well as for the schema for JP
OpenJPA Schema Extensions
</title>
<programlisting>
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
(original)
+++
openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/meta/XMLMetaDataParser.java
Mon Apr 15 21:35:41 2013
@@ -65,7 +65,7 @@ public abstract class XMLMetaDataParser
(XMLMetaDataParser.class);
private static boolean _schemaBug;
- private static final String OPENJPA_NAMESPACE =
"http://www.apache.org/openjpa/ns/orm";
+ private static final String OPENJPA_NAMESPACE =
"http://openjpa.apache.org/ns/orm";
protected int _extendedNamespace = 0;
protected int _openjpaNamespace = 0;
Modified:
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml
(original)
+++
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/fetch-groups-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml
(original)
+++
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/foreign-key-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml
(original)
+++
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/nonstandard-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml
(original)
+++
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/version-columns-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml
(original)
+++
openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/embed/lazy/embed-lazy-orm.xml
Mon Apr 15 21:35:41 2013
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-->
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">
Modified:
openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd
(original)
+++
openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/extendable-orm.xsd
Mon Apr 15 21:35:41 2013
@@ -18,8 +18,8 @@
under the License.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:extendable-orm="http://www.apache.org/openjpa/ns/orm/extendable"
+ targetNamespace="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:extendable-orm="http://openjpa.apache.org/ns/orm/extendable"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
Modified:
openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
---
openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd
(original)
+++
openjpa/trunk/openjpa-persistence/src/main/resources/org/apache/openjpa/persistence/openjpa-orm.xsd
Mon Apr 15 21:35:41 2013
@@ -18,15 +18,15 @@
under the License.
-->
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.apache.org/openjpa/ns/orm"
- xmlns:openjpa-orm="http://www.apache.org/openjpa/ns/orm"
- xmlns:extendable-orm="http://www.apache.org/openjpa/ns/orm/extendable"
+ targetNamespace="http://openjpa.apache.org/ns/orm"
+ xmlns:openjpa-orm="http://openjpa.apache.org/ns/orm"
+ xmlns:extendable-orm="http://openjpa.apache.org/ns/orm/extendable"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="1.0">
- <xsd:import
namespace="http://www.apache.org/openjpa/ns/orm/extendable"/>
+ <xsd:import namespace="http://openjpa.apache.org/ns/orm/extendable"/>
<xsd:import namespace="http://java.sun.com/xml/ns/persistence/orm"/>
<!-- **************************************************** -->
Modified: openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml
URL:
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml?rev=1468233&r1=1468232&r2=1468233&view=diff
==============================================================================
--- openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml (original)
+++ openjpa/trunk/openjpa-project/src/doc/manual/ref_guide_meta.xml Mon Apr 15
21:35:41 2013
@@ -987,7 +987,7 @@ public class Magazine
<para>
OpenJPA has extended the JPA 2.0 schema to include elements and attributes
corresponding
to OpenJPA extended metadata and mapping annotations. The schema are contained
in 2
-files: <ulink
url="http://openjpa.apache.org/builds/latest/docs/schema/extendable-orm.xsd">
+files: <ulink
url="http://openjpa.apache.org/builds/latest/docs/schema/extendable/extendable-orm.xsd">
extendable-orm.xsd</ulink> and
<ulink
url="http://openjpa.apache.org/builds/latest/docs/schema/openjpa-orm.xsd">openjpa-orm.xsd</ulink>.
The extendable-orm.xsd file provides copies of some of the JPA 2.0 schema
elements with additional schema to make it
@@ -1007,8 +1007,8 @@ schemas as well as for the schema for JP
OpenJPA Schema Extensions
</title>
<programlisting>
-<entity-mappings xmlns="http://www.apache.org/openjpa/ns/orm/extendable"
- xmlns:openjpa="http://www.apache.org/openjpa/ns/orm"
+<entity-mappings xmlns="http://openjpa.apache.org/ns/orm/extendable"
+ xmlns:openjpa="http://openjpa.apache.org/ns/orm"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="2.0">