aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From timothyjw...@apache.org
Subject svn commit: r1063278 - in /aries/trunk/jpa/jpa-container/src: main/java/org/apache/aries/jpa/container/parsing/impl/ test/java/org/apache/aries/jpa/container/parsing/ test/resources/file24/ test/resources/file24/META-INF/
Date Tue, 25 Jan 2011 13:49:36 GMT
Author: timothyjward
Date: Tue Jan 25 13:49:36 2011
New Revision: 1063278

URL: http://svn.apache.org/viewvc?rev=1063278&view=rev
Log:
ARIES-556: Improve parsing to cope with arbitrary length data before finding schema version

Added:
    aries/trunk/jpa/jpa-container/src/test/resources/file24/
    aries/trunk/jpa/jpa-container/src/test/resources/file24/META-INF/
    aries/trunk/jpa/jpa-container/src/test/resources/file24/META-INF/persistence.xml
Modified:
    aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parsing/impl/PersistenceDescriptorParserImpl.java
    aries/trunk/jpa/jpa-container/src/test/java/org/apache/aries/jpa/container/parsing/PersistenceXMLParsingTest.java

Modified: aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parsing/impl/PersistenceDescriptorParserImpl.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parsing/impl/PersistenceDescriptorParserImpl.java?rev=1063278&r1=1063277&r2=1063278&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parsing/impl/PersistenceDescriptorParserImpl.java
(original)
+++ aries/trunk/jpa/jpa-container/src/main/java/org/apache/aries/jpa/container/parsing/impl/PersistenceDescriptorParserImpl.java
Tue Jan 25 13:49:36 2011
@@ -20,7 +20,6 @@
 package org.apache.aries.jpa.container.parsing.impl;
 
 import java.io.BufferedInputStream;
-import java.io.FilterInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.ArrayList;
@@ -46,10 +45,133 @@ public class PersistenceDescriptorParser
    * This class is used internally to prevent the first pass parse from
    * closing the InputStream when it exits.
    */
-  private static class UnclosableInputStream extends FilterInputStream {
+  private static class RememberingInputStream extends InputStream {
 
-    public UnclosableInputStream(InputStream in) {
-      super(in);
+    /** The size by which to grow our array */
+    private static final int bufferGrowthSize = 0x4000;
+    /** The bytes that have been read so far */
+    private byte[] bytes = new byte[bufferGrowthSize];
+    /** Index of the next empty entry in the array */
+    private int pos = 0;
+    /** The input stream that actually holds the data */
+    private final InputStream stream;
+    /** Index of the last valid byte in the byte array */
+    private int maxRead = -1;
+    /** The point to reset to */
+    private int markPoint = -1;
+    
+    
+    public RememberingInputStream(InputStream in) throws IOException{
+      stream = in;
+      // Pre fill with data that we know we're going to need - it's 
+      // more efficient than the single byte reads are - hopefully
+      // someone reading a lot of data will do reads in bulk
+      
+      maxRead = stream.read(bytes) - 1;
+    }
+
+    @Override
+    public int read() throws IOException {
+      
+      if(pos <= maxRead)
+      {
+        //We can't return the byte directly, because it is signed
+        //We can pretend this is an unsigned byte by using boolean
+        //& to set the low end byte of an int.
+        return bytes[pos++] & 0xFF;
+      } else {
+        int i = stream.read();
+        if(i<0)
+          return i;
+      
+        ensureCapacity(0);
+        bytes[pos++] = (byte) i;
+        return i;
+      }
+    }
+
+    /**
+     * Ensure our internal byte array can hold enough data
+     * @param i one less than the number of bytes that need
+     *          to be held.
+     */
+    private void ensureCapacity(int i) {
+      if((pos + i) >= bytes.length) {
+        byte[] tmp = bytes;
+        int newLength = bytes.length + bufferGrowthSize;
+        while(newLength < pos + i) {
+          newLength += bufferGrowthSize;
+        }
+        bytes = new byte[newLength];
+        System.arraycopy(tmp, 0, bytes, 0, pos);
+      }
+    }
+
+    @Override
+    public int read(byte[] b) throws IOException {
+      return read(b, 0, b.length);
+    }
+
+    @Override
+    public int read(byte[] b, int off, int len) throws IOException {
+      if(pos <= maxRead) {
+        if(pos + len <= maxRead)
+        {
+          System.arraycopy(bytes, pos, b, off, len);
+          pos += len;
+          return len;
+        } else {
+          int lengthLeftOfBuffer = (maxRead - pos) + 1;
+          System.arraycopy(bytes, pos, b, off, lengthLeftOfBuffer);
+          int read = stream.read(b, off + lengthLeftOfBuffer, len - lengthLeftOfBuffer);
+          if(read < 0) {
+            pos += lengthLeftOfBuffer;
+            return lengthLeftOfBuffer;
+          }
+          ensureCapacity(lengthLeftOfBuffer + read - 1);
+          System.arraycopy(b, off + lengthLeftOfBuffer, bytes, maxRead + 1, read);
+          pos +=  (lengthLeftOfBuffer + read);
+          return lengthLeftOfBuffer + read;
+        }
+      } else {
+        int i = stream.read(b, off, len);
+        if(i<0)
+          return i;
+        ensureCapacity(i - 1);
+        System.arraycopy(b, off, bytes, pos, i);
+        pos += i;
+        return i;
+      }
+    }
+
+    @Override
+    public long skip(long n) throws IOException {
+      throw new IOException("Skip is unsupported");
+    }
+
+    @Override
+    public int available() throws IOException {
+      if(pos <= maxRead) 
+        return (maxRead - pos) + 1;
+      else 
+        return stream.available(); 
+    }
+
+    @Override
+    public synchronized void mark(int readlimit) {
+      markPoint = pos;
+    }
+
+    @Override
+    public synchronized void reset() throws IOException {
+      if(maxRead < pos)
+        maxRead = pos - 1;
+      pos = markPoint;
+    }
+
+    @Override
+    public boolean markSupported() {
+      return true;
     }
 
     @Override
@@ -64,17 +186,17 @@ public class PersistenceDescriptorParser
   public Collection<ParsedPersistenceUnit> parse(Bundle b, PersistenceDescriptor descriptor)
throws PersistenceDescriptorParserException {
     Collection<ParsedPersistenceUnit> persistenceUnits = new ArrayList<ParsedPersistenceUnit>();
     SAXParserFactory parserFactory = SAXParserFactory.newInstance();
-    BufferedInputStream is = null;
+    InputStream is = null;
     boolean schemaFound = false;
     try {
       //Buffer the InputStream so we can mark it, though we'll be in 
       //trouble if we have to read more than 8192 characters before finding
       //the schema!
-      is = new BufferedInputStream(descriptor.getInputStream(), 8192);
-      is.mark(8192);
+      is = new RememberingInputStream(descriptor.getInputStream());
+      is.mark(Integer.MAX_VALUE);
       SAXParser parser = parserFactory.newSAXParser();
       try{
-        parser.parse(new UnclosableInputStream(is), new SchemaLocatingHandler());
+        parser.parse(is, new SchemaLocatingHandler());
       } catch (EarlyParserReturn epr) {
         //This is not really an exception, but a way to work out which
         //version of the persistence schema to use in validation

Modified: aries/trunk/jpa/jpa-container/src/test/java/org/apache/aries/jpa/container/parsing/PersistenceXMLParsingTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container/src/test/java/org/apache/aries/jpa/container/parsing/PersistenceXMLParsingTest.java?rev=1063278&r1=1063277&r2=1063278&view=diff
==============================================================================
--- aries/trunk/jpa/jpa-container/src/test/java/org/apache/aries/jpa/container/parsing/PersistenceXMLParsingTest.java
(original)
+++ aries/trunk/jpa/jpa-container/src/test/java/org/apache/aries/jpa/container/parsing/PersistenceXMLParsingTest.java
Tue Jan 25 13:49:36 2011
@@ -266,6 +266,87 @@ public class PersistenceXMLParsingTest
         is.close();
     }
   }
+  
+  
+  /**
+   * Test parsing a persistence descriptor with several entries
+   * @throws Exception
+   */
+  @Test
+  public void testReallyBigFile() throws Exception
+  {
+    InputStream is = null;
+    try {
+      String location = "file24/META-INF/persistence.xml"; 
+      is = getClass().getClassLoader().getResourceAsStream(location);
+      PersistenceDescriptor descriptor = new PersistenceDescriptorImpl(location, is);
+      
+      Bundle b = Skeleton.newMock(Bundle.class);
+      
+      Collection<ParsedPersistenceUnit> parsedUnits = new PersistenceDescriptorParserImpl().parse(b,
descriptor);
+      assertEquals("An incorrect number of persistence units has been returned.", 33, parsedUnits.size());
+      
+      List<ParsedPersistenceUnit> units = getList(parsedUnits);
+      
+      Collections.sort(units, new Comparator<ParsedPersistenceUnit>() {
+
+        public int compare(ParsedPersistenceUnit p1,
+            ParsedPersistenceUnit p2) {
+          
+          return Integer.valueOf((String)p1.getPersistenceXmlMetadata().
+              get(ParsedPersistenceUnit.UNIT_NAME)).compareTo(
+                  Integer.valueOf((String)p2.getPersistenceXmlMetadata().
+                      get(ParsedPersistenceUnit.UNIT_NAME)));
+        }
+      });
+      
+      for(int i = 0; i < units.size() ; i++)
+        checkParsedUnit(b, units.get(i), Integer.valueOf(i + 1).toString());
+      
+    } finally {
+      if(is != null)
+        is.close();
+    }
+  }
+
+  private void checkParsedUnit(Bundle b, ParsedPersistenceUnit unit, String number) {
+    assertEquals("The schema version was incorrect", "1.0",
+        unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.SCHEMA_VERSION));
+    assertEquals("The unit name was incorrect", number,
+        unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.UNIT_NAME));
+    assertEquals("The transaction type was incorrect", "JTA",
+        unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.TRANSACTION_TYPE));
+    assertEquals("The provider class name was incorrect", "provider." + number,
+        unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.PROVIDER_CLASSNAME));
+    assertEquals("The jta datasource jndi name was wrong", "jtaDS." + number,
+        unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.JTA_DATASOURCE));
+    assertEquals("The non jta datasource jndi name was wrong", "nonJtaDS." + number,
+        unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.NON_JTA_DATASOURCE));
+    assertEquals("An incorrect number of mapping files were specified", 1,
+        ((Collection)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.MAPPING_FILES)).size());
+    assertTrue("Incorrect mapping files were listed",
+        ((Collection)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.MAPPING_FILES)).contains("mappingFile."
+ number));
+    assertEquals("An incorrect number of jar files were specified", 1,
+        ((Collection)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.JAR_FILES)).size());
+    assertTrue("Incorrect jar URLs were listed", ((Collection<String>)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.JAR_FILES)).contains("jarFile."
+ number));
+        
+    assertEquals("An incorrect number of managed classes were specified", 1,
+        ((Collection)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.MANAGED_CLASSES)).size());
+    assertTrue("Incorrect managed classes were listed",
+        ((Collection)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.MANAGED_CLASSES)).contains("class."
+ number));
+    
+    //In the schema this defaults to false. There is a separate test (testFile1b)
+    //for the spec behaviour, which defaults to true
+    assertFalse("We should exclude any classes not listed",
+        (Boolean)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.EXCLUDE_UNLISTED_CLASSES));
+    assertNotNull("The properties should never be null",
+        unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.PROPERTIES));
+    assertEquals("The wrong number of properties were specified", 1,
+        ((Properties)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.PROPERTIES)).size());
+    assertEquals("The property had the wrong value", "prop.value." + number,
+        ((Properties)unit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.PROPERTIES)).getProperty("some.prop."
+ number));
+    assertSame("The persistence unit was associated with the wrong bundle", b, unit.getDefiningBundle());
+  }
 
   /**
    * Sort a Collection of ParsedPersistenceUnit into alphabetical order (by unit name)

Added: aries/trunk/jpa/jpa-container/src/test/resources/file24/META-INF/persistence.xml
URL: http://svn.apache.org/viewvc/aries/trunk/jpa/jpa-container/src/test/resources/file24/META-INF/persistence.xml?rev=1063278&view=auto
==============================================================================
--- aries/trunk/jpa/jpa-container/src/test/resources/file24/META-INF/persistence.xml (added)
+++ aries/trunk/jpa/jpa-container/src/test/resources/file24/META-INF/persistence.xml Tue Jan
25 13:49:36 2011
@@ -0,0 +1,688 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    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.
+-->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+<!-- Lots of comments to provoke failures -->
+
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
+   version="1.0">
+
+  <persistence-unit name="1" transaction-type="JTA">
+    <description>DESC.1</description>
+    <provider>provider.1</provider>
+    <jta-data-source>jtaDS.1</jta-data-source>
+    <non-jta-data-source>nonJtaDS.1</non-jta-data-source>
+    <mapping-file>mappingFile.1</mapping-file>
+    <jar-file>jarFile.1</jar-file>
+    <class>class.1</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.1" value="prop.value.1"/>
+    </properties>
+  </persistence-unit>
+  
+  <persistence-unit name="2" transaction-type="JTA">
+    <description>DESC.2</description>
+    <provider>provider.2</provider>
+    <jta-data-source>jtaDS.2</jta-data-source>
+    <non-jta-data-source>nonJtaDS.2</non-jta-data-source>
+    <mapping-file>mappingFile.2</mapping-file>
+    <jar-file>jarFile.2</jar-file>
+    <class>class.2</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.2" value="prop.value.2"/>
+    </properties>
+  </persistence-unit>
+  
+  <persistence-unit name="3" transaction-type="JTA">
+    <description>DESC.3</description>
+    <provider>provider.3</provider>
+    <jta-data-source>jtaDS.3</jta-data-source>
+    <non-jta-data-source>nonJtaDS.3</non-jta-data-source>
+    <mapping-file>mappingFile.3</mapping-file>
+    <jar-file>jarFile.3</jar-file>
+    <class>class.3</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.3" value="prop.value.3"/>
+    </properties>
+  </persistence-unit>
+  
+  <persistence-unit name="4" transaction-type="JTA">
+    <description>DESC.4</description>
+    <provider>provider.4</provider>
+    <jta-data-source>jtaDS.4</jta-data-source>
+    <non-jta-data-source>nonJtaDS.4</non-jta-data-source>
+    <mapping-file>mappingFile.4</mapping-file>
+    <jar-file>jarFile.4</jar-file>
+    <class>class.4</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.4" value="prop.value.4"/>
+    </properties>
+  </persistence-unit>
+  
+  <persistence-unit name="5" transaction-type="JTA">
+    <description>DESC.5</description>
+    <provider>provider.5</provider>
+    <jta-data-source>jtaDS.5</jta-data-source>
+    <non-jta-data-source>nonJtaDS.5</non-jta-data-source>
+    <mapping-file>mappingFile.5</mapping-file>
+    <jar-file>jarFile.5</jar-file>
+    <class>class.5</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.5" value="prop.value.5"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="6" transaction-type="JTA">
+    <description>DESC.6</description>
+    <provider>provider.6</provider>
+    <jta-data-source>jtaDS.6</jta-data-source>
+    <non-jta-data-source>nonJtaDS.6</non-jta-data-source>
+    <mapping-file>mappingFile.6</mapping-file>
+    <jar-file>jarFile.6</jar-file>
+    <class>class.6</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.6" value="prop.value.6"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="7" transaction-type="JTA">
+    <description>DESC.7</description>
+    <provider>provider.7</provider>
+    <jta-data-source>jtaDS.7</jta-data-source>
+    <non-jta-data-source>nonJtaDS.7</non-jta-data-source>
+    <mapping-file>mappingFile.7</mapping-file>
+    <jar-file>jarFile.7</jar-file>
+    <class>class.7</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.7" value="prop.value.7"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="8" transaction-type="JTA">
+    <description>DESC.8</description>
+    <provider>provider.8</provider>
+    <jta-data-source>jtaDS.8</jta-data-source>
+    <non-jta-data-source>nonJtaDS.8</non-jta-data-source>
+    <mapping-file>mappingFile.8</mapping-file>
+    <jar-file>jarFile.8</jar-file>
+    <class>class.8</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.8" value="prop.value.8"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="9" transaction-type="JTA">
+    <description>DESC.9</description>
+    <provider>provider.9</provider>
+    <jta-data-source>jtaDS.9</jta-data-source>
+    <non-jta-data-source>nonJtaDS.9</non-jta-data-source>
+    <mapping-file>mappingFile.9</mapping-file>
+    <jar-file>jarFile.9</jar-file>
+    <class>class.9</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.9" value="prop.value.9"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="10" transaction-type="JTA">
+    <description>DESC.10</description>
+    <provider>provider.10</provider>
+    <jta-data-source>jtaDS.10</jta-data-source>
+    <non-jta-data-source>nonJtaDS.10</non-jta-data-source>
+    <mapping-file>mappingFile.10</mapping-file>
+    <jar-file>jarFile.10</jar-file>
+    <class>class.10</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.10" value="prop.value.10"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="11" transaction-type="JTA">
+    <description>DESC.11</description>
+    <provider>provider.11</provider>
+    <jta-data-source>jtaDS.11</jta-data-source>
+    <non-jta-data-source>nonJtaDS.11</non-jta-data-source>
+    <mapping-file>mappingFile.11</mapping-file>
+    <jar-file>jarFile.11</jar-file>
+    <class>class.11</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.11" value="prop.value.11"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="12" transaction-type="JTA">
+    <description>DESC.12</description>
+    <provider>provider.12</provider>
+    <jta-data-source>jtaDS.12</jta-data-source>
+    <non-jta-data-source>nonJtaDS.12</non-jta-data-source>
+    <mapping-file>mappingFile.12</mapping-file>
+    <jar-file>jarFile.12</jar-file>
+    <class>class.12</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.12" value="prop.value.12"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="13" transaction-type="JTA">
+    <description>DESC.13</description>
+    <provider>provider.13</provider>
+    <jta-data-source>jtaDS.13</jta-data-source>
+    <non-jta-data-source>nonJtaDS.13</non-jta-data-source>
+    <mapping-file>mappingFile.13</mapping-file>
+    <jar-file>jarFile.13</jar-file>
+    <class>class.13</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.13" value="prop.value.13"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="14" transaction-type="JTA">
+    <description>DESC.14</description>
+    <provider>provider.14</provider>
+    <jta-data-source>jtaDS.14</jta-data-source>
+    <non-jta-data-source>nonJtaDS.14</non-jta-data-source>
+    <mapping-file>mappingFile.14</mapping-file>
+    <jar-file>jarFile.14</jar-file>
+    <class>class.14</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.14" value="prop.value.14"/>
+    </properties>
+  </persistence-unit>
+
+  <persistence-unit name="15" transaction-type="JTA">
+    <description>DESC.15</description>
+    <provider>provider.15</provider>
+    <jta-data-source>jtaDS.15</jta-data-source>
+    <non-jta-data-source>nonJtaDS.15</non-jta-data-source>
+    <mapping-file>mappingFile.15</mapping-file>
+    <jar-file>jarFile.15</jar-file>
+    <class>class.15</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.15" value="prop.value.15"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="16" transaction-type="JTA">
+    <description>DESC.16</description>
+    <provider>provider.16</provider>
+    <jta-data-source>jtaDS.16</jta-data-source>
+    <non-jta-data-source>nonJtaDS.16</non-jta-data-source>
+    <mapping-file>mappingFile.16</mapping-file>
+    <jar-file>jarFile.16</jar-file>
+    <class>class.16</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.16" value="prop.value.16"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="17" transaction-type="JTA">
+    <description>DESC.17</description>
+    <provider>provider.17</provider>
+    <jta-data-source>jtaDS.17</jta-data-source>
+    <non-jta-data-source>nonJtaDS.17</non-jta-data-source>
+    <mapping-file>mappingFile.17</mapping-file>
+    <jar-file>jarFile.17</jar-file>
+    <class>class.17</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.17" value="prop.value.17"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="18" transaction-type="JTA">
+    <description>DESC.18</description>
+    <provider>provider.18</provider>
+    <jta-data-source>jtaDS.18</jta-data-source>
+    <non-jta-data-source>nonJtaDS.18</non-jta-data-source>
+    <mapping-file>mappingFile.18</mapping-file>
+    <jar-file>jarFile.18</jar-file>
+    <class>class.18</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.18" value="prop.value.18"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="19" transaction-type="JTA">
+    <description>DESC.19</description>
+    <provider>provider.19</provider>
+    <jta-data-source>jtaDS.19</jta-data-source>
+    <non-jta-data-source>nonJtaDS.19</non-jta-data-source>
+    <mapping-file>mappingFile.19</mapping-file>
+    <jar-file>jarFile.19</jar-file>
+    <class>class.19</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.19" value="prop.value.19"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="20" transaction-type="JTA">
+    <description>DESC.20</description>
+    <provider>provider.20</provider>
+    <jta-data-source>jtaDS.20</jta-data-source>
+    <non-jta-data-source>nonJtaDS.20</non-jta-data-source>
+    <mapping-file>mappingFile.20</mapping-file>
+    <jar-file>jarFile.20</jar-file>
+    <class>class.20</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.20" value="prop.value.20"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="21" transaction-type="JTA">
+    <description>DESC.21</description>
+    <provider>provider.21</provider>
+    <jta-data-source>jtaDS.21</jta-data-source>
+    <non-jta-data-source>nonJtaDS.21</non-jta-data-source>
+    <mapping-file>mappingFile.21</mapping-file>
+    <jar-file>jarFile.21</jar-file>
+    <class>class.21</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.21" value="prop.value.21"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="22" transaction-type="JTA">
+    <description>DESC.22</description>
+    <provider>provider.22</provider>
+    <jta-data-source>jtaDS.22</jta-data-source>
+    <non-jta-data-source>nonJtaDS.22</non-jta-data-source>
+    <mapping-file>mappingFile.22</mapping-file>
+    <jar-file>jarFile.22</jar-file>
+    <class>class.22</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.22" value="prop.value.22"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="23" transaction-type="JTA">
+    <description>DESC.23</description>
+    <provider>provider.23</provider>
+    <jta-data-source>jtaDS.23</jta-data-source>
+    <non-jta-data-source>nonJtaDS.23</non-jta-data-source>
+    <mapping-file>mappingFile.23</mapping-file>
+    <jar-file>jarFile.23</jar-file>
+    <class>class.23</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.23" value="prop.value.23"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="24" transaction-type="JTA">
+    <description>DESC.24</description>
+    <provider>provider.24</provider>
+    <jta-data-source>jtaDS.24</jta-data-source>
+    <non-jta-data-source>nonJtaDS.24</non-jta-data-source>
+    <mapping-file>mappingFile.24</mapping-file>
+    <jar-file>jarFile.24</jar-file>
+    <class>class.24</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.24" value="prop.value.24"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="25" transaction-type="JTA">
+    <description>DESC.25</description>
+    <provider>provider.25</provider>
+    <jta-data-source>jtaDS.25</jta-data-source>
+    <non-jta-data-source>nonJtaDS.25</non-jta-data-source>
+    <mapping-file>mappingFile.25</mapping-file>
+    <jar-file>jarFile.25</jar-file>
+    <class>class.25</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.25" value="prop.value.25"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="26" transaction-type="JTA">
+    <description>DESC.26</description>
+    <provider>provider.26</provider>
+    <jta-data-source>jtaDS.26</jta-data-source>
+    <non-jta-data-source>nonJtaDS.26</non-jta-data-source>
+    <mapping-file>mappingFile.26</mapping-file>
+    <jar-file>jarFile.26</jar-file>
+    <class>class.26</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.26" value="prop.value.26"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="27" transaction-type="JTA">
+    <description>DESC.27</description>
+    <provider>provider.27</provider>
+    <jta-data-source>jtaDS.27</jta-data-source>
+    <non-jta-data-source>nonJtaDS.27</non-jta-data-source>
+    <mapping-file>mappingFile.27</mapping-file>
+    <jar-file>jarFile.27</jar-file>
+    <class>class.27</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.27" value="prop.value.27"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="28" transaction-type="JTA">
+    <description>DESC.28</description>
+    <provider>provider.28</provider>
+    <jta-data-source>jtaDS.28</jta-data-source>
+    <non-jta-data-source>nonJtaDS.28</non-jta-data-source>
+    <mapping-file>mappingFile.28</mapping-file>
+    <jar-file>jarFile.28</jar-file>
+    <class>class.28</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.28" value="prop.value.28"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="29" transaction-type="JTA">
+    <description>DESC.29</description>
+    <provider>provider.29</provider>
+    <jta-data-source>jtaDS.29</jta-data-source>
+    <non-jta-data-source>nonJtaDS.29</non-jta-data-source>
+    <mapping-file>mappingFile.29</mapping-file>
+    <jar-file>jarFile.29</jar-file>
+    <class>class.29</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.29" value="prop.value.29"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="30" transaction-type="JTA">
+    <description>DESC.30</description>
+    <provider>provider.30</provider>
+    <jta-data-source>jtaDS.30</jta-data-source>
+    <non-jta-data-source>nonJtaDS.30</non-jta-data-source>
+    <mapping-file>mappingFile.30</mapping-file>
+    <jar-file>jarFile.30</jar-file>
+    <class>class.30</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.30" value="prop.value.30"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="31" transaction-type="JTA">
+    <description>DESC.31</description>
+    <provider>provider.31</provider>
+    <jta-data-source>jtaDS.31</jta-data-source>
+    <non-jta-data-source>nonJtaDS.31</non-jta-data-source>
+    <mapping-file>mappingFile.31</mapping-file>
+    <jar-file>jarFile.31</jar-file>
+    <class>class.31</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.31" value="prop.value.31"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="32" transaction-type="JTA">
+    <description>DESC.32</description>
+    <provider>provider.32</provider>
+    <jta-data-source>jtaDS.32</jta-data-source>
+    <non-jta-data-source>nonJtaDS.32</non-jta-data-source>
+    <mapping-file>mappingFile.32</mapping-file>
+    <jar-file>jarFile.32</jar-file>
+    <class>class.32</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.32" value="prop.value.32"/>
+    </properties>
+  </persistence-unit>
+  
+    <persistence-unit name="33" transaction-type="JTA">
+    <description>DESC.33</description>
+    <provider>provider.33</provider>
+    <jta-data-source>jtaDS.33</jta-data-source>
+    <non-jta-data-source>nonJtaDS.33</non-jta-data-source>
+    <mapping-file>mappingFile.33</mapping-file>
+    <jar-file>jarFile.33</jar-file>
+    <class>class.33</class>
+    <exclude-unlisted-classes/>
+    <properties>
+      <property name="some.prop.33" value="prop.value.33"/>
+    </properties>
+  </persistence-unit>
+</persistence>



Mime
View raw message