You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pc...@apache.org on 2006/07/19 23:35:07 UTC

svn commit: r423615 [44/44] - in /incubator/openjpa/trunk: ./ openjpa-jdbc-5/ openjpa-jdbc-5/src/ openjpa-jdbc-5/src/main/ openjpa-jdbc-5/src/main/java/ openjpa-jdbc-5/src/main/java/org/ openjpa-jdbc-5/src/main/java/org/apache/ openjpa-jdbc-5/src/main/...

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingSerializer.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingSerializer.java?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingSerializer.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingSerializer.java Wed Jul 19 14:34:44 2006
@@ -0,0 +1,682 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.jdbc;
+
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.List;
+import java.util.Map;
+import javax.persistence.EnumType;
+import javax.persistence.TemporalType;
+
+import org.apache.commons.lang.StringUtils;
+import org.xml.sax.SAXException;
+import org.apache.openjpa.jdbc.conf.JDBCConfiguration;
+import org.apache.openjpa.jdbc.meta.ClassMapping;
+import org.apache.openjpa.jdbc.meta.ClassMappingInfo;
+import org.apache.openjpa.jdbc.meta.DiscriminatorMappingInfo;
+import org.apache.openjpa.jdbc.meta.FieldMapping;
+import org.apache.openjpa.jdbc.meta.MappingInfo;
+import org.apache.openjpa.jdbc.meta.MappingRepository;
+import org.apache.openjpa.jdbc.meta.QueryResultMapping;
+import org.apache.openjpa.jdbc.meta.SequenceMapping;
+import org.apache.openjpa.jdbc.meta.ValueMappingInfo;
+import org.apache.openjpa.jdbc.meta.strats.EnumValueHandler;
+import org.apache.openjpa.jdbc.meta.strats.FlatClassStrategy;
+import org.apache.openjpa.jdbc.meta.strats.FullClassStrategy;
+import org.apache.openjpa.jdbc.meta.strats.VerticalClassStrategy;
+import org.apache.openjpa.jdbc.schema.Column;
+import org.apache.openjpa.jdbc.sql.DBDictionary;
+import org.apache.openjpa.meta.ClassMetaData;
+import org.apache.openjpa.meta.FieldMetaData;
+import org.apache.openjpa.meta.JavaTypes;
+import static org.apache.openjpa.meta.MetaDataModes.MODE_MAPPING;
+import org.apache.openjpa.meta.MetaDataRepository;
+import org.apache.openjpa.meta.SequenceMetaData;
+import org.apache.openjpa.persistence.PersistenceStrategy;
+import org.apache.openjpa.persistence.XMLPersistenceMetaDataSerializer;
+import serp.util.Strings;
+
+/**
+ * Serializes persistence mapping to XML.
+ *
+ * @since 4.0
+ * @author Steve Kim
+ * @nojavadoc
+ */
+public class XMLPersistenceMappingSerializer
+    extends XMLPersistenceMetaDataSerializer {
+
+    private static final int TYPE_RESULTMAP = TYPE_QUERY + 1;
+
+    private static final Map<ColType, String> _names;
+
+    static {
+        _names = new EnumMap<ColType, String>(ColType.class);
+        _names.put(ColType.COL, "column");
+        _names.put(ColType.JOIN, "join-column");
+        _names.put(ColType.INVERSE, "inverse-join-column");
+        _names.put(ColType.PK_JOIN, "primary-key-join-column");
+        _names.put(ColType.DISC, "discriminator-column");
+    }
+
+    private List<QueryResultMapping> _results = null;
+    private boolean _sync = false;
+
+    /**
+     * Constructor. Supply configuration.
+     */
+    public XMLPersistenceMappingSerializer(JDBCConfiguration conf) {
+        super(conf);
+    }
+
+    /**
+     * Whether to automatically synchronize mapping info with data available
+     * from mapped components before serialization. Defaults to false.
+     */
+    public boolean getSyncMappingInfo() {
+        return _sync;
+    }
+
+    /**
+     * Whether to automatically synchronize mapping info with data available
+     * from mapped components before serialization. Defaults to false.
+     */
+    public void setSyncMappingInfo(boolean sync) {
+        _sync = sync;
+    }
+
+    /**
+     * Adds the given result set mapping to local cache.
+     */
+    public void addQueryResultMapping(QueryResultMapping meta) {
+        if (_results == null)
+            _results = new ArrayList<QueryResultMapping>();
+        _results.add(meta);
+    }
+
+    /**
+     * Removes given result set mapping from the local cache.
+     */
+    public boolean removeQueryResultMapping(QueryResultMapping meta) {
+        return _results != null && _results.remove(meta);
+    }
+
+    @Override
+    public void addAll(MetaDataRepository repos) {
+        super.addAll(repos);
+        for (QueryResultMapping res : ((MappingRepository) repos)
+            .getQueryResultMappings())
+            addQueryResultMapping(res);
+    }
+
+    @Override
+    public boolean removeAll(MetaDataRepository repos) {
+        boolean removed = super.removeAll(repos);
+        for (QueryResultMapping res : ((MappingRepository) repos)
+            .getQueryResultMappings())
+            removed |= removeQueryResultMapping(res);
+        return removed;
+    }
+
+    @Override
+    public void clear() {
+        super.clear();
+        if (_results != null)
+            _results.clear();
+    }
+
+    protected void addCommments(Object obj)
+        throws SAXException {
+        if (isMappingMode() && !isMetaDataMode()) {
+            if (obj instanceof ClassMapping)
+                obj = ((ClassMapping) obj).getMappingInfo();
+            else if (obj instanceof FieldMapping)
+                obj = ((FieldMapping) obj).getMappingInfo();
+        }
+        super.addComments(obj);
+    }
+
+    @Override
+    protected void serializeClass(ClassMetaData meta, boolean access)
+        throws SAXException {
+        if (_sync && isMappingMode() && meta instanceof ClassMapping) {
+            // sync if resolved and mapped
+            ClassMapping cls = (ClassMapping) meta;
+            if ((cls.getResolve() & MODE_MAPPING) != 0 && cls.isMapped()) {
+                cls.syncMappingInfo();
+                cls.getDiscriminator().syncMappingInfo();
+                cls.getVersion().syncMappingInfo();
+                FieldMapping[] fields;
+                if (cls.getEmbeddingMetaData() == null)
+                    fields = cls.getDefinedFieldMappings();
+                else
+                    fields = cls.getFieldMappings();
+                for (FieldMapping f : fields)
+                    f.syncMappingInfo();
+            }
+        }
+        super.serializeClass(meta, access);
+    }
+
+    @Override
+    protected void serializeClassMappingContent(ClassMetaData mapping)
+        throws SAXException {
+        ClassMapping cls = (ClassMapping) mapping;
+        ClassMappingInfo info = cls.getMappingInfo();
+        serializeTable(info.getTableName(), "table", Strings
+            .getClassName(mapping.getDescribedType()), null);
+        for (String second : info.getSecondaryTableNames())
+            serializeTable(second, "secondary-table", null, info);
+        serializeColumns(info, ColType.PK_JOIN, null);
+    }
+
+    @Override
+    protected void serializeInheritanceContent(ClassMetaData mapping)
+        throws SAXException {
+        ClassMapping cls = (ClassMapping) mapping;
+        ClassMappingInfo info = cls.getMappingInfo();
+        DiscriminatorMappingInfo dinfo = cls.getDiscriminator()
+            .getMappingInfo();
+        String strat = info.getHierarchyStrategy();
+        if (FlatClassStrategy.ALIAS.equals(strat))
+            addAttribute("strategy", "SINGLE_TABLE");
+        else if (VerticalClassStrategy.ALIAS.equals(strat))
+            addAttribute("strategy", "JOINED");
+        else if (FullClassStrategy.ALIAS.equals(strat))
+            addAttribute("strategy", "TABLE_PER_CLASS");
+        if (strat != null) {
+            startElement("inheritance");
+            endElement("inheritance");
+        }
+        if (dinfo.getValue() != null) {
+            startElement("discriminator-value");
+            addText(dinfo.getValue());
+            endElement("discriminator-value");
+        }
+        serializeColumns(dinfo, ColType.DISC, null);
+    }
+
+    /**
+     * Serialize table optionally listing primary-key-joins stored
+     * in the given {@link ClassMappingInfo}.
+     */
+    private void serializeTable(String table, String elementName,
+        String defaultName, ClassMappingInfo secondaryInfo)
+        throws SAXException {
+        List<Column> cols = null;
+        if (secondaryInfo != null)
+            cols = (List<Column>) secondaryInfo.getSecondaryTableJoinColumns
+                (table);
+
+        boolean print = cols != null && cols.size() > 0;
+        if (table != null
+            && (defaultName == null || !defaultName.equals(table))) {
+            print = true;
+            int index = table.indexOf('.');
+            if (index < 0)
+                addAttribute("name", table);
+            else {
+                addAttribute("schema", table.substring(0, index));
+                addAttribute("name", table.substring(index + 1));
+            }
+        }
+        if (print) {
+            startElement(elementName);
+            if (cols != null) {
+                for (Column col : cols)
+                    serializeColumn(col, ColType.PK_JOIN, null, false);
+            }
+            endElement(elementName);
+        }
+    }
+
+    @Override
+    protected boolean serializeAttributeOverride(FieldMetaData fmd,
+        FieldMetaData orig) {
+        if (orig == null || fmd == orig)
+            return false;
+
+        FieldMapping field = (FieldMapping) fmd;
+        FieldMapping field2 = (FieldMapping) orig;
+        if (field.getMappingInfo().hasSchemaComponents()
+            || field2.getMappingInfo().hasSchemaComponents())
+            return true;
+
+        ValueMappingInfo info = field.getValueInfo();
+        List<Column> cols = (List<Column>) info.getColumns();
+        if (cols == null || cols.size() == 0)
+            return false;
+        ValueMappingInfo info2 = field2.getValueInfo();
+        List<Column> cols2 = (List<Column>) info2.getColumns();
+        if (cols2 == null || cols2.size() != cols.size())
+            return true;
+        if (cols.size() != 1)
+            return true;
+
+        Column col;
+        Column col2;
+        for (int i = 0; i < cols.size(); i++) {
+            col = cols.get(i);
+            col2 = cols2.get(i);
+            if (!StringUtils.equals(col.getName(), col2.getName()))
+                return true;
+            if (!StringUtils.equals(col.getTypeName(), col2.getTypeName()))
+                return true;
+            if (col.getSize() != col2.getSize())
+                return true;
+            if (col.getDecimalDigits() != col2.getDecimalDigits())
+                return true;
+            if (col.getFlag(Column.FLAG_UNINSERTABLE)
+                != col2.getFlag(Column.FLAG_UNINSERTABLE))
+                return true;
+            if (col.getFlag(Column.FLAG_UNUPDATABLE)
+                != col2.getFlag(Column.FLAG_UNUPDATABLE))
+                return true;
+        }
+        return false;
+    }
+
+    @Override
+    protected void serializeAttributeOverrideMappingContent(FieldMetaData fmd,
+        FieldMetaData orig)
+        throws SAXException {
+        FieldMapping fm = (FieldMapping) fmd;
+        serializeColumns(fm.getValueInfo(), ColType.COL, fm.getMappingInfo()
+            .getTableName());
+    }
+
+    @Override
+    protected PersistenceStrategy getStrategy(FieldMetaData fmd) {
+        PersistenceStrategy strat = super.getStrategy(fmd);
+        FieldMapping field = (FieldMapping) fmd;
+        switch (strat) {
+            case MANY_MANY:
+                // we can differentiate a one-many by the fact that there is no
+                // secondary table join, or the fk is unique
+                if (field.getMappedBy() == null
+                    && (field.getMappingInfo().getJoinDirection()
+                    == MappingInfo.JOIN_NONE
+                    || field.getElementMapping().getValueInfo().getUnique()
+                    != null))
+                    return PersistenceStrategy.ONE_MANY;
+                break;
+            case MANY_ONE:
+                // inverse join cols or unique fk?
+                if (field.getValueInfo().getJoinDirection()
+                    == MappingInfo.JOIN_INVERSE
+                    || field.getValueInfo().getUnique() != null)
+                    return PersistenceStrategy.ONE_ONE;
+
+                // scan for primary-key-join-column
+                List<Column> cols = field.getValueInfo().getColumns();
+                boolean pkJoin = cols != null && cols.size() > 0;
+                for (int i = 0; pkJoin && i < cols.size(); i++)
+                    pkJoin = cols.get(i).getFlag(Column.FLAG_PK_JOIN);
+                if (pkJoin)
+                    return PersistenceStrategy.ONE_ONE;
+                break;
+        }
+        return strat;
+    }
+
+    @Override
+    protected void serializeFieldMappingContent(FieldMetaData fmd,
+        PersistenceStrategy strategy)
+        throws SAXException {
+        if (fmd.getMappedBy() != null)
+            return;
+
+        // while I'd like to do auto detection based on join directions, etc.
+        // the distinguished column / table / etc names forces our hand
+        // esp for OpenJPA custom mappings.
+        FieldMapping field = (FieldMapping) fmd;
+        switch (strategy) {
+            case ONE_ONE:
+            case MANY_ONE:
+                serializeColumns(field.getValueInfo(), ColType.JOIN,
+                    field.getMappingInfo().getTableName());
+                return;
+            case ONE_MANY:
+                if (field.getMappingInfo().getJoinDirection() ==
+                    MappingInfo.JOIN_NONE) {
+                    serializeColumns(field.getElementMapping().getValueInfo(),
+                        ColType.JOIN, null);
+                    return;
+                }
+                // else no break
+            case MANY_MANY:
+                if (field.getMappingInfo().hasSchemaComponents()
+                    || field.getElementMapping().getValueInfo()
+                    .hasSchemaComponents()) {
+                    String table = field.getMappingInfo().getTableName();
+                    if (table != null) {
+                        int index = table.indexOf('.');
+                        if (index < 0)
+                            addAttribute("name", table);
+                        else {
+                            addAttribute("schema", table.substring(0, index));
+                            addAttribute("name", table.substring(index + 1));
+                        }
+                    }
+                    startElement("join-table");
+                    serializeColumns(field.getMappingInfo(), ColType.JOIN,
+                        null);
+                    serializeColumns(field.getElementMapping().getValueInfo(),
+                        ColType.INVERSE, null);
+                    endElement("join-table");
+                }
+                return;
+        }
+
+        serializeColumns(field.getValueInfo(), ColType.COL,
+            field.getMappingInfo().getTableName());
+        if (strategy == PersistenceStrategy.BASIC && isLob(field)) {
+            startElement("lob");
+            endElement("lob");
+        }
+        TemporalType temporal = getTemporal(field);
+        if (temporal != null) {
+            startElement("temporal");
+            addText(temporal.toString());
+            endElement("temporal");
+        }
+
+        EnumType enumType = getEnumType(field);
+        if (enumType != null && enumType != EnumType.ORDINAL) {
+            startElement("enumerated");
+            addText(enumType.toString());
+            endElement("enumerated");
+        }
+    }
+
+    /**
+     * Determine if the field is a lob.
+     */
+    private boolean isLob(FieldMapping field) {
+        for (Column col : (List<Column>) field.getValueInfo().getColumns())
+            if (col.getType() == Types.BLOB || col.getType() == Types.CLOB)
+                return true;
+        return false;
+    }
+
+    /**
+     * Return field's temporal type.
+     */
+    private TemporalType getTemporal(FieldMapping field) {
+        if (field.getDeclaredTypeCode() != JavaTypes.DATE
+            && field.getDeclaredTypeCode() != JavaTypes.CALENDAR)
+            return null;
+
+        DBDictionary dict = ((JDBCConfiguration) getConfiguration())
+            .getDBDictionaryInstance();
+        int def = dict.getJDBCType(field.getTypeCode(), false);
+        for (Column col : (List<Column>) field.getValueInfo().getColumns()) {
+            if (col.getType() == def)
+                continue;
+            switch (col.getType()) {
+                case Types.DATE:
+                    return TemporalType.DATE;
+                case Types.TIME:
+                    return TemporalType.TIME;
+                case Types.TIMESTAMP:
+                    return TemporalType.TIMESTAMP;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Return enum type for the field.
+     */
+    protected EnumType getEnumType(FieldMapping field) {
+        if (field.getDeclaredTypeCode() != JavaTypes.OBJECT)
+            return null;
+        if (!(field.getHandler() instanceof EnumValueHandler))
+            return null;
+        return ((EnumValueHandler) field.getHandler()).getStoreOrdinal()
+            ? EnumType.ORDINAL : EnumType.STRING;
+    }
+
+    /**
+     * Serialize the columns in the given mapping info.
+     */
+    private void serializeColumns(MappingInfo info, ColType type,
+        String secondary)
+        throws SAXException {
+        List<Column> cols = (List<Column>) info.getColumns();
+        if (cols == null)
+            return;
+        for (Column col : cols)
+            serializeColumn(col, type, secondary, info.getUnique() != null);
+    }
+
+    /**
+     * Serialize a single column.
+     */
+    private void serializeColumn(Column col, ColType type, String secondary,
+        boolean unique)
+        throws SAXException {
+        if (col.getName() != null)
+            addAttribute("name", col.getName());
+        if (col.getTypeName() != null)
+            addAttribute("column-definition", col.getTypeName());
+        if (col.getTarget() != null
+            && (type == ColType.JOIN || type == ColType.INVERSE
+            || type == ColType.PK_JOIN))
+            addAttribute("referenced-column-name", col.getTarget());
+        if (type == ColType.COL || type == ColType.JOIN
+            || type == ColType.PK_JOIN) {
+            if (unique)
+                addAttribute("unique", "true");
+            if (col.isNotNull())
+                addAttribute("nullable", "false");
+            if (col.getFlag(Column.FLAG_UNINSERTABLE))
+                addAttribute("insertable", "false");
+            if (col.getFlag(Column.FLAG_UNUPDATABLE))
+                addAttribute("updatable", "false");
+            if (secondary != null)
+                addAttribute("table", secondary);
+
+            if (type == ColType.COL) {
+                if (col.getSize() > 0 && col.getSize() != 255)
+                    addAttribute("length", col.getSize() + "");
+                if (col.getDecimalDigits() != 0)
+                    addAttribute("scale", col.getDecimalDigits() + "");
+            }
+        }
+        if (type != ColType.COL || getAttributes().getLength() > 0) {
+            String name = col.getFlag(Column.FLAG_PK_JOIN) ? _names
+                .get(ColType.PK_JOIN) : _names.get(type);
+            startElement(name);
+            endElement(name);
+        }
+    }
+
+    @Override
+    protected SerializationComparator newSerializationComparator() {
+        return new MappingSerializationComparator();
+    }
+
+    @Override
+    protected void addSystemMappingElements(Collection toSerialize) {
+        if (isQueryMode())
+            toSerialize.addAll(getQueryResultMappings(null));
+    }
+
+    @Override
+    protected int type(Object o) {
+        int type = super.type(o);
+        if (type == -1 && o instanceof QueryResultMapping)
+            return TYPE_RESULTMAP;
+        return type;
+    }
+
+    /**
+     * Return the result set mappings for the given scope.
+     */
+    private List<QueryResultMapping> getQueryResultMappings(ClassMetaData cm) {
+        if (_results == null || _results.isEmpty())
+            return (List<QueryResultMapping>) Collections.EMPTY_LIST;
+
+        List<QueryResultMapping> result = null;
+        for (int i = 0; i < _results.size(); i++) {
+            QueryResultMapping element = _results.get(i);
+            if ((cm == null && element.getSourceScope() != null) || (cm != null
+                && element.getSourceScope() != cm.getDescribedType()))
+                continue;
+
+            if (result == null)
+                result = new ArrayList<QueryResultMapping>(_results.size() - i);
+            result.add(element);
+        }
+        return (result == null)
+            ? (List<QueryResultMapping>) Collections.EMPTY_LIST : result;
+    }
+
+    @Override
+    protected void serializeSystemMappingElement(Object obj)
+        throws SAXException {
+        if (obj instanceof QueryResultMapping)
+            serializeQueryResultMapping((QueryResultMapping) obj);
+    }
+
+    @Override
+    protected void serializeQueryMappings(ClassMetaData meta)
+        throws SAXException {
+        for (QueryResultMapping res : getQueryResultMappings(meta))
+            serializeQueryResultMapping(res);
+    }
+
+    /**
+     * Serialize given result set mapping.
+     */
+    private void serializeQueryResultMapping(QueryResultMapping meta)
+        throws SAXException {
+        if (!getSerializeAnnotations()
+            && meta.getSourceType() == meta.SRC_ANNOTATIONS)
+            return;
+
+        addAttribute("name", meta.getName());
+        startElement("sql-result-set-mapping");
+        for (QueryResultMapping.PCResult pc : meta.getPCResults()) {
+            addAttribute("entity-class", pc.getCandidateType().getName());
+            Object discrim = pc.getMapping(pc.DISCRIMINATOR);
+            if (discrim != null)
+                addAttribute("discriminator-column", discrim.toString());
+
+            startElement("entity-result");
+            for (String path : pc.getMappingPaths()) {
+                addAttribute("name", path);
+                addAttribute("column", pc.getMapping(path).toString());
+                startElement("field-result");
+                endElement("field-result");
+            }
+            endElement("entity-result");
+        }
+        for (Object col : meta.getColumnResults()) {
+            addAttribute("name", col.toString());
+            startElement("column-result");
+            endElement("column-result");
+        }
+        endElement("sql-result-set-mapping");
+    }
+
+    @Override
+    protected void serializeSequence(SequenceMetaData meta)
+        throws SAXException {
+        if (!getSerializeAnnotations()
+            && meta.getSourceType() == meta.SRC_ANNOTATIONS)
+            return;
+        if (SequenceMapping.IMPL_VALUE_TABLE.equals(meta.getSequencePlugin())) {
+            super.serializeSequence(meta);
+            return;
+        }
+
+        SequenceMapping seq = (SequenceMapping) meta;
+        addAttribute("name", seq.getName());
+        String table = seq.getTable();
+        if (table != null) {
+            int dotIdx = table.indexOf('.');
+            if (dotIdx == -1)
+                addAttribute("table", table);
+            else {
+                addAttribute("table", table.substring(dotIdx + 1));
+                addAttribute("schema", table.substring(0, dotIdx));
+            }
+        }
+        if (!StringUtils.isEmpty(seq.getPrimaryKeyColumn()))
+            addAttribute("pk-column-name", seq.getPrimaryKeyColumn());
+        if (!StringUtils.isEmpty(seq.getSequenceColumn()))
+            addAttribute("value-column-name", seq.getSequenceColumn());
+        if (!StringUtils.isEmpty(seq.getPrimaryKeyValue()))
+            addAttribute("pk-column-value", seq.getPrimaryKeyValue());
+        if (seq.getAllocate() != 50 && seq.getAllocate() != -1)
+            addAttribute("allocation-size", seq.getAllocate() + "");
+        if (seq.getInitialValue() != 0 && seq.getInitialValue() != -1)
+            addAttribute("initial-value", seq.getInitialValue() + "");
+        startElement("table-generator");
+        endElement("table-generator");
+    }
+
+    /**
+     * Column types serialized under different names.
+     */
+    private static enum ColType {
+
+        COL,
+        JOIN,
+        INVERSE,
+        PK_JOIN,
+        DISC
+    }
+
+    /**
+     * Extends {@link SerializationComparator} for store-specific tags such
+     * as &lt;sql-result-set-mapping&gt;.
+     *
+     * @author Pinaki Poddar
+     */
+    protected class MappingSerializationComparator
+        extends SerializationComparator {
+
+        protected int compareUnknown(Object o1, Object o2) {
+            if (!(o1 instanceof QueryResultMapping))
+                return super.compareUnknown(o1, o2);
+
+            QueryResultMapping res1 = (QueryResultMapping) o1;
+            QueryResultMapping res2 = (QueryResultMapping) o2;
+
+            // system scope before class scope
+            Object scope1 = res1.getSourceScope();
+            Object scope2 = res2.getSourceScope();
+            if (scope1 == null && scope2 != null)
+                return -1;
+            if (scope1 != null && scope2 == null)
+                return 1;
+
+            // compare on listing index, or if none/same, use name
+            int listingIndex1 = res1.getListingIndex();
+            int listingIndex2 = res2.getListingIndex();
+            if (listingIndex1 != listingIndex2)
+                return listingIndex1 - listingIndex2;
+            return res1.getName ().compareTo (res2.getName ());
+		}
+	}
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XMLPersistenceMappingSerializer.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTable.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTable.java?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTable.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTable.java Wed Jul 19 14:34:44 2006
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.jdbc;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.persistence.PrimaryKeyJoinColumn;
+
+/**
+ * Extended secondary table.
+ *
+ * @author Abe White
+ * @since 4.0
+ */
+@Target({ TYPE })
+@Retention(RUNTIME)
+public @interface XSecondaryTable {
+
+    String name();
+
+    String catalog() default "";
+
+    String schema() default "";
+
+    PrimaryKeyJoinColumn[] pkJoinColumns() default {};
+
+    Index[] indexes() default {};
+
+    ForeignKey[] foreignKeys() default {};
+
+    Unique[] uniqueConstraints() default {};
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTable.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTables.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTables.java?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTables.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTables.java Wed Jul 19 14:34:44 2006
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.jdbc;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Allows the specification of multiple secondary tables.
+ *
+ * @author Abe White
+ * @since 4.0
+ */
+@Target({ TYPE })
+@Retention(RUNTIME)
+public @interface XSecondaryTables {
+
+    XSecondaryTable[] value() default {};
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XSecondaryTables.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XTable.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XTable.java?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XTable.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XTable.java Wed Jul 19 14:34:44 2006
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.jdbc;
+
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Extended table.
+ *
+ * @author Abe White
+ * @since 4.0
+ */
+@Target({ TYPE })
+@Retention(RUNTIME)
+public @interface XTable {
+
+    String name();
+
+    String catalog() default "";
+
+    String schema() default "";
+
+    Index[] indexes() default {};
+
+    ForeignKey[] foreignKeys() default {};
+
+    Unique[] uniqueConstraints() default {};
+}

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/XTable.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/package.html
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/package.html?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/package.html (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/package.html Wed Jul 19 14:34:44 2006
@@ -0,0 +1,9 @@
+<html>
+<body>
+<p><strong>OpenJPA JPA-JDBC</strong></p>
+
+<p>
+    JDBC-specific extensions to OpenJPA JPA runtime.
+</p>
+</body>
+</html>

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/java/org/apache/openjpa/persistence/jdbc/package.html
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/META-INF/services/org.apache.openjpa.conf.ProductDerivation
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/META-INF/services/org.apache.openjpa.conf.ProductDerivation?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/META-INF/services/org.apache.openjpa.conf.ProductDerivation (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/META-INF/services/org.apache.openjpa.conf.ProductDerivation Wed Jul 19 14:34:44 2006
@@ -0,0 +1 @@
+org.apache.openjpa.persistence.jdbc.JDBCPersistenceProductDerivation

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/META-INF/services/org.apache.openjpa.conf.ProductDerivation
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties Wed Jul 19 14:34:44 2006
@@ -0,0 +1,31 @@
+parse-gen: Parsing table generator "{0}".
+dup-gen: Found duplicate generator "{0}" in "{1}".  Ignoring.
+override-gen: Found duplicate generator "{0}" in "{1}".  Overriding previous \
+	definition.
+no-gen-name: The table generator in "{0}" must declare a name.
+parse-sqlrsmapping: Parsing result set mapping "{0}".
+dup-sqlrsmapping: Found duplicate result set mapping "{0}" in "{1}".  Ignoring.
+override-sqlrsmapping: Found duplicate result set mapping "{0}" in "{1}". \
+	Overriding previous definition.
+unsupported: OpenJPA does not yet support "{1}" as used in "{0}".
+second-name: Type "{0}" declares an unnamed @SecondaryTable.
+second-inconsist: "{0}" declares inconsistent secondary tables on its join \
+	columns.
+bad-second: "{0}" declares a secondary table on columns that do not support \
+	this attribute.
+unique-constraints: Detected declared unique constraints on "{0}".  OpenJPA \
+	does not yet support the @UniqueConstraint annotation.
+inconsist-col-attrs: Detected inconsistent values of "unique" on different \
+	columns of "{0}".  OpenJPA does not yet support different per-column unique \
+	values.  All columns for this mapping must use the same values.
+pk-as-fk: The "usePKasFK" attribute is not yet supported.  Mapping your \
+	OneToOne using JoinColumns that match your id property columns will work.
+no-override-name: Missing "name" property on mapping override for "{0}".
+embed-override-name: Embedded property "{0}" declares a mapping override for \
+	"{1}", but that is not a persistent property in the embedded type.
+num-cols-mismatch: Expected "{0}" to have "{1}" column(s), but you specified \
+	"{2}" column(s).
+second-version: Version property "{0}" cannot map to a secondary table column. \
+	Version columns must always be in the primary table of the class.
+not-embedded: Attempt to declare mapping overrides on non-embedded field "{0}".
+no-gen-table: No generated table found at "{0}".

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/main/resources/org/apache/openjpa/persistence/jdbc/localizer.properties
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/AllFieldTypes.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/AllFieldTypes.java?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/AllFieldTypes.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/AllFieldTypes.java Wed Jul 19 14:34:44 2006
@@ -0,0 +1,135 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.simple;
+
+import java.util.Date;
+import java.util.HashSet;
+import java.util.Set;
+import javax.persistence.Entity;
+
+@Entity
+public class AllFieldTypes {
+
+    private short shortField;
+    private int intField;
+    private boolean booleanField;
+    private long longField;
+    private float floatField;
+    private char charField;
+    private double doubleField;
+    private byte byteField;
+    private String stringField;
+    private Date dateField;
+    private Set<String> setOfStrings = new HashSet<String>();
+    private String[] arrayOfStrings;
+
+    public void setShortField(short shortField) {
+        this.shortField = shortField;
+    }
+
+    public short getShortField() {
+        return this.shortField;
+    }
+
+    public void setIntField(int intField) {
+        this.intField = intField;
+    }
+
+    public int getIntField() {
+        return this.intField;
+    }
+
+    public void setBooleanField(boolean booleanField) {
+        this.booleanField = booleanField;
+    }
+
+    public boolean getBooleanField() {
+        return this.booleanField;
+    }
+
+    public void setLongField(long longField) {
+        this.longField = longField;
+    }
+
+    public long getLongField() {
+        return this.longField;
+    }
+
+    public void setFloatField(float floatField) {
+        this.floatField = floatField;
+    }
+
+    public float getFloatField() {
+        return this.floatField;
+    }
+
+    public void setCharField(char charField) {
+        this.charField = charField;
+    }
+
+    public char getCharField() {
+        return this.charField;
+    }
+
+    public void setDoubleField(double doubleField) {
+        this.doubleField = doubleField;
+    }
+
+    public double getDoubleField() {
+        return this.doubleField;
+    }
+
+    public void setByteField(byte byteField) {
+        this.byteField = byteField;
+    }
+
+    public byte getByteField() {
+        return this.byteField;
+    }
+
+    public void setStringField(String stringField) {
+        this.stringField = stringField;
+    }
+
+    public String getStringField() {
+        return this.stringField;
+    }
+
+    public void setDateField(Date dateField) {
+        this.dateField = dateField;
+    }
+
+    public Date getDateField() {
+        return this.dateField;
+    }
+
+    public void setSetOfStrings(Set<String> setOfStrings) {
+        this.setOfStrings = setOfStrings;
+    }
+
+    public Set<String> getSetOfStrings() {
+        return this.setOfStrings;
+    }
+
+    public void setArrayOfStrings(String[] arrayOfStrings) {
+        this.arrayOfStrings = arrayOfStrings;
+    }
+
+    public String[] getArrayOfStrings() {
+        return this.arrayOfStrings;
+    }
+}
+

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/AllFieldTypes.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java Wed Jul 19 14:34:44 2006
@@ -0,0 +1,116 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed 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.simple;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.EntityTransaction;
+import javax.persistence.Persistence;
+
+import junit.framework.TestCase;
+import junit.textui.TestRunner;
+
+/**
+ * Simple test case to get an EntityManager and perform some basic operations.
+ *
+ * @author <a href="mailto:mprudhom@bea.com">Marc Prud'hommeaux</a>
+ */
+public class TestPersistence
+    extends TestCase {
+
+    private EntityManagerFactory emf;
+
+    protected EntityManager getEM() {
+        if (emf == null)
+            emf = Persistence.createEntityManagerFactory("simple-emf-test");
+        assertNotNull(emf);
+
+        EntityManager em = emf.createEntityManager();
+        assertNotNull(em);
+
+        return em;
+    }
+
+    public void tearDown()
+        throws Exception {
+        super.tearDown();
+
+        try {
+            EntityManager em = getEM();
+            em.getTransaction().begin();
+            em.createQuery("delete from AllFieldTypes").executeUpdate();
+            em.getTransaction().commit();
+            em.close();
+            emf.close();
+        } catch (Exception e) {
+        }
+    }
+
+    public void testCreateEntityManager() {
+        EntityManager em = getEM();
+
+        EntityTransaction t = em.getTransaction();
+        assertNotNull(t);
+
+        t.begin();
+        t.setRollbackOnly();
+        t.rollback();
+
+        em.close();
+    }
+
+    public void testPersist() {
+        EntityManager em;
+
+        em = getEM();
+        em.getTransaction().begin();
+        em.persist(new AllFieldTypes());
+        em.getTransaction().commit();
+        em.close();
+    }
+
+    public void testQuery() {
+        EntityManager em;
+
+        em = getEM();
+        em.getTransaction().begin();
+        AllFieldTypes aft = new AllFieldTypes();
+        aft.setStringField("foo");
+        aft.setIntField(10);
+        em.persist(aft);
+        em.getTransaction().commit();
+        em.close();
+
+        em = getEM();
+        em.getTransaction().begin();
+        assertEquals(1, em.createQuery
+            ("select x from AllFieldTypes x where x.stringField = 'foo'").
+            getResultList().size());
+        assertEquals(0, em.createQuery
+            ("select x from AllFieldTypes x where x.stringField = 'bar'").
+            getResultList().size());
+        assertEquals(1, em.createQuery
+            ("select x from AllFieldTypes x where x.intField >= 10").
+            getResultList().size());
+        em.getTransaction().rollback();
+        em.close();
+    }
+
+    public static void main(String[] args) {
+        TestRunner.run(TestPersistence.class);
+    }
+}
+

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml?rev=423615&view=auto
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml (added)
+++ incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml Wed Jul 19 14:34:44 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+             version="1.0">
+
+    <persistence-unit name="simple-emf-test" transaction-type="RESOURCE_LOCAL">
+
+        <!--
+          <provider>kodo.persistence.PersistenceProviderImpl</provider>
+          <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
+          -->
+
+        <class>org.apache.openjpa.persistence.simple.AllFieldTypes</class>
+
+        <properties>
+            <property name="openjpa.ConnectionDriverName"
+                      value="org.apache.commons.dbcp.BasicDataSource"/>
+            <property name="openjpa.ConnectionProperties"
+                      value="DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:tmp/openjpa-test-database;create=true,MaxActive=100,MaxWait=10000,TestOnBorrow=true"/>
+            <property name="openjpa.jdbc.SynchronizeMappings"
+                      value="buildSchema(ForeignKeys=true)"/>
+        </properties>
+    </persistence-unit>
+</persistence>

Propchange: incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/resources/META-INF/persistence.xml
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AnnotationPersistenceMetaDataParser.java Wed Jul 19 14:34:44 2006
@@ -349,8 +349,7 @@
             parsePackageAnnotations();
             ClassMetaData meta = parseClassAnnotations();
             updateSourceMode(meta);
-        }
-        finally {
+        } finally {
             _cls = null;
             _file = null;
         }
@@ -673,10 +672,8 @@
         }
         try {
             _file = new File(url.toURI());
-        }
-        catch (URISyntaxException e) {
-        }
-        catch (IllegalArgumentException iae) {
+        } catch (URISyntaxException e) {
+        } catch (IllegalArgumentException iae) {
             // this is thrown when the URI is non-hierarchical (aka JBoss)
         }
         return _file;

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConfigurationProviderImpl.java Wed Jul 19 14:34:44 2006
@@ -233,8 +233,7 @@
                 if (load(pinfo))
                     return true;
             return false;
-        }
-        catch (IOException ioe) {
+        } catch (IOException ioe) {
             throw new GeneralException(ioe);
         }
     }
@@ -329,8 +328,7 @@
                     {
                         try {
                             _info.addJarFileName(currentText());
-                        }
-                        catch (IllegalArgumentException iae) {
+                        } catch (IllegalArgumentException iae) {
                             throw getException(iae.getMessage());
                         }
                     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java Wed Jul 19 14:34:44 2006
@@ -98,8 +98,7 @@
                     conf.getDataCacheManagerInstance().getSystemDataCache());
             }
             return _cache;
-        }
-        finally {
+        } finally {
             _factory.unlock();
         }
     }
@@ -116,8 +115,7 @@
                 _queryCache = new QueryResultCache(_factory.getConfiguration().
                     getDataCacheManagerInstance().getSystemQueryCache());
             return _queryCache;
-        }
-        finally {
+        } finally {
             _factory.unlock();
         }
     }
@@ -161,8 +159,7 @@
                 conf.getValue("openjpa.ConnectionRetainMode");
             try {
                 retainMode = Integer.parseInt(val.unalias((String) obj));
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 throw new ArgumentException(_loc.get("bad-em-prop",
                     "openjpa.ConnectionRetainMode", obj),
                     new Throwable[]{ e },
@@ -191,8 +188,7 @@
             prop = prop.substring(5);
             try {
                 setter = ImplHelper.getSetter(em.getClass(), prop);
-            }
-            catch (OpenJPAException ke) {
+            } catch (OpenJPAException ke) {
                 if (errs == null)
                     errs = new LinkedList<RuntimeException>();
                 errs.add(PersistenceExceptions.toPersistenceException(ke));
@@ -209,8 +205,7 @@
                             setter.getParameterTypes()[0]);
                 }
                 setter.invoke(em, new Object[]{ val });
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 ArgumentException err = new ArgumentException(_loc.get
                     ("bad-em-prop", prop, entry.getValue()),
                     new Throwable[]{ e }, null, true);
@@ -284,15 +279,12 @@
                 _plan = cls.getConstructor(FetchPlan.class);
             }
             return _plan.newInstance(fetch);
-        }
-        catch (InvocationTargetException ite) {
+        } catch (InvocationTargetException ite) {
             throw PersistenceExceptions.toPersistenceException
                 (ite.getTargetException());
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
-        }
-        finally {
+        } finally {
             _factory.unlock();
         }
 	}

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java Wed Jul 19 14:34:44 2006
@@ -121,8 +121,7 @@
             if (_fetch == null)
                 _fetch = _emf.toFetchPlan(_broker.getFetchConfiguration());
             return _fetch;
-        }
-        finally {
+        } finally {
             _broker.unlock();
         }
     }
@@ -358,14 +357,11 @@
     public void commit() {
         try {
             _broker.commit();
-        }
-        catch (RollbackException e) {
+        } catch (RollbackException e) {
             throw e;
-        }
-        catch (IllegalStateException e) {
+        } catch (IllegalStateException e) {
             throw e;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             // RollbackExceptions are special and aren't handled by the
             // normal exception translator, since the spec says they
             // should be thrown whenever the commit fails for any reason at
@@ -617,8 +613,7 @@
                 _broker.getClassLoader(), true);
             Seq seq = meta.getInstance(_broker.getClassLoader());
             return new Generator(seq, name, _broker, null);
-        }
-        catch (RuntimeException re) {
+        } catch (RuntimeException re) {
             throw PersistenceExceptions.toPersistenceException(re);
         }
     }
@@ -631,8 +626,7 @@
             Seq seq = _broker.getIdentitySequence(meta);
             return (seq == null) ? null : new Generator(seq, null, _broker,
                 meta);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -650,8 +644,7 @@
             Seq seq = _broker.getValueSequence(fmd);
             return (seq == null) ? null : new Generator(seq, null, _broker,
                 meta);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -692,8 +685,7 @@
             for (int i = 0; i < hints.length; i++)
                 q.setHint(hints[i], values[i]);
             return q;
-        }
-        catch (RuntimeException re) {
+        } catch (RuntimeException re) {
             throw PersistenceExceptions.toPersistenceException(re);
         }
     }
@@ -893,8 +885,7 @@
         try {
             if (sm != null)
                 sm.dirty(field);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Extent.java Wed Jul 19 14:34:44 2006
@@ -82,8 +82,7 @@
                     getEntityManagerFactory()).toFetchPlan(_extent.
                     getFetchConfiguration());
             return _fetch;
-        }
-        finally {
+        } finally {
             _extent.unlock();
         }
     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/OpenJPAPersistence.java Wed Jul 19 14:34:44 2006
@@ -83,11 +83,9 @@
                 factory.putUserObject(EMF_KEY, emf);
             }
             return emf;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
-        }
-        finally {
+        } finally {
             factory.unlock();
         }
     }
@@ -121,11 +119,9 @@
             }
 
             return em;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
-        }
-        finally {
+        } finally {
             broker.unlock();
         }
     }
@@ -178,8 +174,7 @@
         try {
             return toEntityManagerFactory(Bootstrap.getBrokerFactory
                 (cp, null));
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -235,8 +230,7 @@
             Object o = context.lookup(jndiLocation);
             return (OpenJPAEntityManagerFactory) PortableRemoteObject.narrow(o,
                 OpenJPAEntityManagerFactory.class);
-        }
-        catch (NamingException ne) {
+        } catch (NamingException ne) {
             throw new ArgumentException(_loc.get("naming-exception",
                 jndiLocation), new Throwable[]{ ne }, null, true);
         }
@@ -256,8 +250,7 @@
                     pcGetGenericContext());
             else
                 return null;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -285,8 +278,7 @@
         try {
             return kem.getConfiguration().getMetaDataRepository().
                 getMetaData(cls, kem.getClassLoader(), false);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -304,8 +296,7 @@
         try {
             return kemf.getConfiguration().getMetaDataRepository().
                 getMetaData(cls, null, false);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -318,8 +309,7 @@
     public static void close(Object o) {
         try {
             ImplHelper.close(o);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -330,8 +320,7 @@
     public static boolean isManagedType(EntityManager em, Class cls) {
         try {
             return ImplHelper.isManagedType(cls);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -342,8 +331,7 @@
     public static boolean isManagedType(EntityManagerFactory emf, Class cls) {
         try {
             return ImplHelper.isManagedType(cls);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceExceptions.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceExceptions.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceExceptions.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceExceptions.java Wed Jul 19 14:34:44 2006
@@ -62,8 +62,7 @@
                         throwing = true;
                         if (em.isOpen() && em.isActive())
                             em.setRollbackOnly();
-                    }
-                    finally {
+                    } finally {
                         // handle re-entrancy
                         throwing = false;
                     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceListenerAdapter.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceListenerAdapter.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceListenerAdapter.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceListenerAdapter.java Wed Jul 19 14:34:44 2006
@@ -63,8 +63,7 @@
         for (LifecycleCallbacks callback : _callbacks[eventType]) {
             try {
                 callback.makeCallback(src, ev.getRelated(), eventType);
-            }
-            catch (Throwable t) {
+            } catch (Throwable t) {
                 if (t instanceof InvocationTargetException)
                     t = t.getCause();
                 if (t instanceof RuntimeException)

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceMetaDataFactory.java Wed Jul 19 14:34:44 2006
@@ -235,8 +235,7 @@
         xmlParser.setMode(mode);
         try {
             xmlParser.parse(xml);
-        }
-        catch (IOException ioe) {
+        } catch (IOException ioe) {
             throw new GeneralException(ioe);
         }
     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceProviderImpl.java Wed Jul 19 14:34:44 2006
@@ -64,8 +64,7 @@
                     Bootstrap.newBrokerFactory(cp, cp.getClassLoader()));
             else
                 return null;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -89,8 +88,7 @@
                 return emf;
             } else
                 return null;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/PersistenceUnitInfoImpl.java Wed Jul 19 14:34:44 2006
@@ -210,8 +210,7 @@
                 try {
                     addJarFile(new File(cp[i]).toURL());
                     return;
-                }
-                catch (MalformedURLException mue) {
+                } catch (MalformedURLException mue) {
                     break;
                 }
             }
@@ -419,8 +418,7 @@
 
         try {
             return new File(_persistenceXmlFile.toURI());
-        }
-        catch (URISyntaxException e) {
+        } catch (URISyntaxException e) {
             throw new IllegalStateException(e);
         }
     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryImpl.java Wed Jul 19 14:34:44 2006
@@ -102,8 +102,7 @@
                     getEntityManagerFactory()).toFetchPlan(_query.
                     getFetchConfiguration());
             return _fetch;
-        }
-        finally {
+        } finally {
             _query.unlock();
         }
     }
@@ -285,8 +284,7 @@
                 throw new NonUniqueResultException(_loc.get("mult-results",
                     _query.getQueryString()), null, null, false);
             return ret;
-        }
-        finally {
+        } finally {
             OpenJPAPersistence.close(res);
         }
     }
@@ -369,8 +367,7 @@
                 throw new ArgumentException(_loc.get("bad-query-hint", key),
                     null, null, false);
             return this;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw PersistenceExceptions.toPersistenceException(e);
         }
     }
@@ -409,8 +406,7 @@
             // starts at 1, while List starts at 0
             _positional.set(position - 1, value);
             return this;
-        }
-        finally {
+        } finally {
             _query.unlock();
         }
     }
@@ -438,8 +434,7 @@
                 _named = new HashMap();
             _named.put(name, value);
             return this;
-        }
-        finally {
+        } finally {
             _query.unlock();
         }
     }
@@ -452,8 +447,7 @@
         _query.lock();
         try {
             return (_positional == null) ? EMPTY_ARRAY : _positional.toArray();
-        }
-        finally {
+        } finally {
             _query.unlock();
         }
     }
@@ -467,8 +461,7 @@
                 for (int i = 0; i < params.length; i++)
                     setParameter(i + 1, params[i]);
             return this;
-        }
-        finally {
+        } finally {
             _query.unlock();
         }
     }
@@ -478,8 +471,7 @@
         try {
             return (_named == null) ? Collections.EMPTY_MAP
                 : Collections.unmodifiableMap(_named);
-        }
-        finally {
+        } finally {
             _query.unlock();
         }
     }
@@ -493,8 +485,7 @@
                 for (Map.Entry e : (Set<Map.Entry>) params.entrySet())
                     setParameter((String) e.getKey(), e.getValue());
             return this;
-        }
-        finally {
+        } finally {
             _query.unlock();
         }
     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java Wed Jul 19 14:34:44 2006
@@ -177,8 +177,7 @@
     private ClassMetaData getMetaData(Class cls) {
         try {
             return _repos.getMetaData(cls, null, true);
-        }
-        catch (RuntimeException re) {
+        } catch (RuntimeException re) {
             throw PersistenceExceptions.toPersistenceException(re);
         }
     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/XMLPersistenceMetaDataParser.java Wed Jul 19 14:34:44 2006
@@ -912,8 +912,7 @@
         Class idCls = null;
         try {
             idCls = classForName(cls);
-        }
-        catch (Throwable t) {
+        } catch (Throwable t) {
             throw getException(_loc.get("invalid-id-class", meta, cls), t);
         }
         meta.setObjectIdType(idCls, true);
@@ -1062,13 +1061,11 @@
                     try {
                         member = type.getDeclaredMethod("get" + cap,
                             (Class[]) null); // varargs disambiguate
-                    }
-                    catch (Exception excep) {
+                    } catch (Exception excep) {
                         try {
                             member = type.getDeclaredMethod("is" + cap,
                                 (Class[]) null);
-                        }
-                        catch (Exception excep2) {
+                        } catch (Exception excep2) {
                             throw excep;
                         }
                     }

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/resources/META-INF/services/org.apache.openjpa.lib.conf.ConfigurationProvider
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/resources/META-INF/services/org.apache.openjpa.lib.conf.ConfigurationProvider?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/resources/META-INF/services/org.apache.openjpa.lib.conf.ConfigurationProvider (original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/resources/META-INF/services/org.apache.openjpa.lib.conf.ConfigurationProvider Wed Jul 19 14:34:44 2006
@@ -1 +1,2 @@
 org.apache.openjpa.persistence.ConfigurationProviderImpl
+

Modified: incubator/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java (original)
+++ incubator/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLFileHandler.java Wed Jul 19 14:34:44 2006
@@ -79,11 +79,9 @@
             return Collections.EMPTY_SET;
         try {
             return read(f);
-        }
-        catch (OpenJPAException ke) {
+        } catch (OpenJPAException ke) {
             throw ke;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw new StoreException(e);
         }
     }
@@ -134,14 +132,11 @@
         try {
             fw = new FileWriter(f);
             write(datas, fw);
-        }
-        catch (OpenJPAException ke) {
+        } catch (OpenJPAException ke) {
             throw ke;
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             throw new StoreException(e);
-        }
-        finally {
+        } finally {
             if (fw != null)
                 try {
                     fw.close();
@@ -336,14 +331,11 @@
             throws SAXException {
             try {
                 startElement(qName, attrs);
-            }
-            catch (RuntimeException re) {
+            } catch (RuntimeException re) {
                 throw re;
-            }
-            catch (SAXException se) {
+            } catch (SAXException se) {
                 throw se;
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 throw new SAXException(e);
             }
         }
@@ -403,14 +395,11 @@
             throws SAXException {
             try {
                 endElement(qName);
-            }
-            catch (RuntimeException re) {
+            } catch (RuntimeException re) {
                 throw re;
-            }
-            catch (SAXException se) {
+            } catch (SAXException se) {
                 throw se;
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 throw new SAXException(e);
             }
         }

Modified: incubator/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLStoreManager.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLStoreManager.java?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLStoreManager.java (original)
+++ incubator/openjpa/trunk/openjpa-xmlstore/src/main/java/org/apache/openjpa/xmlstore/XMLStoreManager.java Wed Jul 19 14:34:44 2006
@@ -177,8 +177,7 @@
     public void commit() {
         try {
             _store.endTransaction(_updates, _deletes);
-        }
-        finally {
+        } finally {
             _updates = null;
             _deletes = null;
         }

Modified: incubator/openjpa/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/pom.xml?rev=423615&r1=423614&r2=423615&view=diff
==============================================================================
--- incubator/openjpa/trunk/pom.xml (original)
+++ incubator/openjpa/trunk/pom.xml Wed Jul 19 14:34:44 2006
@@ -86,7 +86,10 @@
         <module>openjpa-lib</module>
         <module>openjpa-kernel</module>
         <module>openjpa-kernel-5</module>
+        <module>openjpa-jdbc</module>
+        <module>openjpa-jdbc-5</module>
         <module>openjpa-persistence</module>
+        <module>openjpa-persistence-jdbc</module>
         <module>openjpa-xmlstore</module>
 
     </modules>