[jboss-cvs] JBossAS SVN: r78418 - in projects/jpa/tags: jboss-jpa-deployers-0.1.2 and 6 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 11 06:20:01 EDT 2008
Author: wolfc
Date: 2008-09-11 06:20:01 -0400 (Thu, 11 Sep 2008)
New Revision: 78418
Added:
projects/jpa/tags/jboss-jpa-deployers-0.1.2/
projects/jpa/tags/jboss-jpa-deployers-0.1.2/.classpath
projects/jpa/tags/jboss-jpa-deployers-0.1.2/.project
projects/jpa/tags/jboss-jpa-deployers-0.1.2/.settings/org.maven.ide.eclipse.prefs
projects/jpa/tags/jboss-jpa-deployers-0.1.2/pom.xml
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/remote/
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/remote/
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/resources/META-INF/
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/resources/log4j.xml
Removed:
projects/jpa/tags/jboss-jpa-deployers-0.1.2/.classpath
projects/jpa/tags/jboss-jpa-deployers-0.1.2/.project
projects/jpa/tags/jboss-jpa-deployers-0.1.2/pom.xml
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java
projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java
Log:
[maven-release-plugin] copy for tag jboss-jpa-deployers-0.1.2
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2 (from rev 78404, projects/jpa/trunk/deployers)
Deleted: projects/jpa/tags/jboss-jpa-deployers-0.1.2/.classpath
===================================================================
--- projects/jpa/trunk/deployers/.classpath 2008-09-11 07:54:36 UTC (rev 78404)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/.classpath 2008-09-11 10:20:01 UTC (rev 78418)
@@ -1,78 +0,0 @@
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" path="src/test/java" output="eclipse-target/tests-classes"/>
- <classpathentry kind="src" path="src/test/resources" output="eclipse-target/tests-classes" excluding="**/*.java"/>
- <classpathentry kind="output" path="eclipse-target/classes"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.0.2/activation-1.0.2.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar" sourcepath="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/asm/asm-attrs/1.5.3/asm-attrs-1.5.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar" sourcepath="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1.jar" sourcepath="M2_REPO/commons-collections/commons-collections/2.1.1/commons-collections-2.1.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/apache-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar" sourcepath="M2_REPO/apache-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar" sourcepath="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/derby/derby/10.4.1.3/derby-10.4.1.3.jar"/>
- <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar" sourcepath="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3.jar" sourcepath="M2_REPO/net/sf/ehcache/ehcache/1.2.3/ehcache-1.2.3-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.1.GA/ejb3-persistence-1.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga.jar" sourcepath="M2_REPO/org/hibernate/hibernate/3.2.6.ga/hibernate-3.2.6.ga-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.3.1.GA/hibernate-annotations-3.3.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.0.0.ga/hibernate-commons-annotations-3.0.0.ga.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.3.2.GA/hibernate-entitymanager-3.3.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.4.GA/javassist-3.4.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javassist/3.7.1.GA/javassist-3.7.1.GA.jar" sourcepath="M2_REPO/org/jboss/javassist/3.7.1.GA/javassist-3.7.1.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar" sourcepath="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.Beta12/jboss-classloader-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloader/2.0.0.Beta12/jboss-classloader-2.0.0.Beta12-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.Beta12/jboss-classloading-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading/2.0.0.Beta12/jboss-classloading-2.0.0.Beta12-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-classloading-spi/5.0.0.Beta4/jboss-classloading-spi-5.0.0.Beta4.jar" sourcepath="M2_REPO/org/jboss/jboss-classloading-spi/5.0.0.Beta4/jboss-classloading-spi-5.0.0.Beta4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.0.Beta12/jboss-classloading-vfs-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.0.Beta12/jboss-classloading-vfs-2.0.0.Beta12-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.7.GA/jboss-common-core-2.2.7.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.7.GA/jboss-common-core-2.2.7.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-log4j/2.0.4.GA/jboss-common-logging-log4j-2.0.4.GA.jar" sourcepath="M2_REPO/jboss/jboss-common-logging-log4j/2.0.4.GA/jboss-common-logging-log4j-2.0.4.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar" sourcepath="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.Beta16/jboss-dependency-2.0.0.Beta16.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.0.Beta16/jboss-dependency-2.0.0.Beta16-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.0.Beta18/jboss-deployers-client-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.0.Beta18/jboss-deployers-client-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.Beta18/jboss-deployers-client-spi-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.0.Beta18/jboss-deployers-client-spi-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.0.Beta18/jboss-deployers-core-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.0.Beta18/jboss-deployers-core-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.Beta18/jboss-deployers-core-spi-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.0.Beta18/jboss-deployers-core-spi-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.0.Beta18/jboss-deployers-impl-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.0.Beta18/jboss-deployers-impl-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.0.Beta18/jboss-deployers-spi-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.0.Beta18/jboss-deployers-spi-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.Beta18/jboss-deployers-structure-spi-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.0.Beta18/jboss-deployers-structure-spi-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.0.Beta18/jboss-deployers-vfs-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.0.Beta18/jboss-deployers-vfs-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.Beta18/jboss-deployers-vfs-spi-2.0.0.Beta18.jar" sourcepath="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.0.Beta18/jboss-deployers-vfs-spi-2.0.0.Beta18-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.CR1/jboss-ejb-api-3.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.CR1/jboss-ejb-api-3.0.0.CR1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/0.3/jboss-ejb3-ext-api-0.3.jar" sourcepath="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/0.3/jboss-ejb3-ext-api-0.3-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxrpc/1.0.4.GA/jboss-jaxrpc-1.0.4.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-jaxws/2.0.1.GA/jboss-jaxws-2.0.1.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.20070913080910/jboss-jca-api-1.5.0.20070913080910.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.20070913080910/jboss-jca-api-1.5.0.20070913080910-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.CR1/jboss-jms-api-1.1.0.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.CR1/jboss-jms-api-1.1.0.CR1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta16/jboss-kernel-2.0.0.Beta16.jar" sourcepath="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.0.Beta16/jboss-kernel-2.0.0.Beta16-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.0.0.Beta12/jboss-managed-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/man/jboss-managed/2.0.0.Beta12/jboss-managed-2.0.0.Beta12-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.0.Beta15/jboss-mdr-2.0.0.Beta15.jar" sourcepath="M2_REPO/org/jboss/jboss-mdr/2.0.0.Beta15/jboss-mdr-2.0.0.Beta15-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.0.Beta26/jboss-metadata-1.0.0.Beta26.jar" sourcepath="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.0.Beta26/jboss-metadata-1.0.0.Beta26-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.Beta12/jboss-metatype-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/man/jboss-metatype/2.0.0.Beta12/jboss-metatype-2.0.0.Beta12-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-persistence-api/3.0.0.CR1/jboss-persistence-api-3.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-persistence-api/3.0.0.CR1/jboss-persistence-api-3.0.0.CR1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12.jar" sourcepath="M2_REPO/org/jboss/jboss-reflect/2.0.0.Beta12/jboss-reflect-2.0.0.Beta12-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-test/1.0.5.GA/jboss-test-1.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-test/1.0.5.GA/jboss-test-1.0.5.GA-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.20070913080910/jboss-transaction-api-1.0.1.20070913080910.jar" sourcepath="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.20070913080910/jboss-transaction-api-1.0.1.20070913080910-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-transaction-spi/5.0.0.Beta4/jboss-transaction-spi-5.0.0.Beta4.jar" sourcepath="M2_REPO/org/jboss/jboss-transaction-spi/5.0.0.Beta4/jboss-transaction-spi-5.0.0.Beta4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta19/jboss-vfs-2.0.0.Beta19.jar" sourcepath="M2_REPO/org/jboss/jboss-vfs/2.0.0.Beta19/jboss-vfs-2.0.0.Beta19-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jbossts/jbossjta/4.3.0.GA/jbossjta-4.3.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/jboss/jbossts/jbossts-common/4.3.0.GA/jbossts-common-4.3.0.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.2.GA/jbossws-spi-1.0.2.GA.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.0.CR10/jbossxb-2.0.0.CR10.jar" sourcepath="M2_REPO/org/jboss/jbossxb/2.0.0.CR10/jbossxb-2.0.0.CR10-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnpserver/5.0.0.CR1/jnpserver-5.0.0.CR1.jar" sourcepath="M2_REPO/org/jboss/naming/jnpserver/5.0.0.CR1/jnpserver-5.0.0.CR1-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar"/>
- <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar" sourcepath="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar" sourcepath="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
-</classpath>
\ No newline at end of file
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/.classpath (from rev 78414, projects/jpa/trunk/deployers/.classpath)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-0.1.2/.classpath (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/.classpath 2008-09-11 10:20:01 UTC (rev 78418)
@@ -0,0 +1,8 @@
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/java" output="eclipse-target/tests-classes"/>
+ <classpathentry kind="src" path="src/test/resources" output="eclipse-target/tests-classes" excluding="**/*.java"/>
+ <classpathentry kind="output" path="eclipse-target/classes"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+</classpath>
\ No newline at end of file
Deleted: projects/jpa/tags/jboss-jpa-deployers-0.1.2/.project
===================================================================
--- projects/jpa/trunk/deployers/.project 2008-09-11 07:54:36 UTC (rev 78404)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/.project 2008-09-11 10:20:01 UTC (rev 78418)
@@ -1,13 +0,0 @@
-<projectDescription>
- <name>jboss-jpa-deployers</name>
- <comment>ToDo</comment>
- <projects/>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
\ No newline at end of file
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/.project (from rev 78414, projects/jpa/trunk/deployers/.project)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-0.1.2/.project (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/.project 2008-09-11 10:20:01 UTC (rev 78418)
@@ -0,0 +1,18 @@
+<projectDescription>
+ <name>jboss-jpa-deployers</name>
+ <comment>The JBoss Container Managed JPA Deployers for deploying persistence units.
+ See EJB 3 JPA chapter 6 and 7.</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/.settings/org.maven.ide.eclipse.prefs (from rev 78414, projects/jpa/trunk/deployers/.settings/org.maven.ide.eclipse.prefs)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-0.1.2/.settings/org.maven.ide.eclipse.prefs (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/.settings/org.maven.ide.eclipse.prefs 2008-09-11 10:20:01 UTC (rev 78418)
@@ -0,0 +1,8 @@
+#Thu Sep 11 10:13:35 CEST 2008
+activeProfiles=eclipse
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1
Deleted: projects/jpa/tags/jboss-jpa-deployers-0.1.2/pom.xml
===================================================================
--- projects/jpa/trunk/deployers/pom.xml 2008-09-11 07:54:36 UTC (rev 78404)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/pom.xml 2008-09-11 10:20:01 UTC (rev 78418)
@@ -1,99 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.jboss.jpa</groupId>
- <artifactId>jboss-jpa-build</artifactId>
- <relativePath>../build/pom.xml</relativePath>
- <version>0.1.1</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>jboss-jpa-deployers</artifactId>
- <version>0.1.2-SNAPSHOT</version>
- <packaging>jar</packaging>
- <name>JBoss Container Managed JPA Deployers</name>
- <description>
- The JBoss Container Managed JPA Deployers for deploying persistence units.
- See EJB 3 JPA chapter 6 and 7.
- </description>
-
- <dependencies>
- <!-- For 'mocking' a TransactionManager we use JBossTS -->
- <dependency>
- <groupId>jboss.jbossts</groupId>
- <artifactId>jbossjta</artifactId>
- <version>4.3.0.GA</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <scope>test</scope>
- </dependency>
- <!-- For 'mocking' a DataSource we use Derby -->
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- <version>10.4.1.3</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>3.3.2.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- <version>5.0.0.Beta4</version>
- </dependency>
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-test</artifactId>
- <version>1.0.5.GA</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs</artifactId>
- <version>2.0.0.Beta18</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs-spi</artifactId>
- <version>2.0.0.Beta18</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.metadata</groupId>
- <artifactId>jboss-metadata</artifactId>
- <version>1.0.0.Beta26</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.0.CR1</version>
- <scope>test</scope>
- </dependency>
-
- <!-- For Arjuna / JBoss Transaction -->
- <dependency>
- <groupId>apache-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1.0.jboss</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>oswego-concurrent</groupId>
- <artifactId>concurrent</artifactId>
- <version>1.3.4-jboss-update1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>jboss.jbossts</groupId>
- <artifactId>jbossts-common</artifactId>
- <version>4.3.0.GA</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/pom.xml (from rev 78417, projects/jpa/trunk/deployers/pom.xml)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-0.1.2/pom.xml (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/pom.xml 2008-09-11 10:20:01 UTC (rev 78418)
@@ -0,0 +1,105 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jboss.jpa</groupId>
+ <artifactId>jboss-jpa-build</artifactId>
+ <relativePath>../build/pom.xml</relativePath>
+ <version>0.1.1</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>jboss-jpa-deployers</artifactId>
+ <version>0.1.2</version>
+ <packaging>jar</packaging>
+ <name>JBoss Container Managed JPA Deployers</name>
+ <description>
+ The JBoss Container Managed JPA Deployers for deploying persistence units.
+ See EJB 3 JPA chapter 6 and 7.
+ </description>
+
+ <dependencies>
+ <!-- For 'mocking' a TransactionManager we use JBossTS -->
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjta</artifactId>
+ <version>4.3.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <scope>test</scope>
+ </dependency>
+ <!-- For 'mocking' a DataSource we use Derby -->
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.4.1.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>3.3.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ <version>5.0.0.Beta4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-test</artifactId>
+ <version>1.0.5.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs</artifactId>
+ <version>2.0.0.Beta18</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>2.0.0.Beta18</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <version>1.0.0.Beta26</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.naming</groupId>
+ <artifactId>jnpserver</artifactId>
+ <version>5.0.0.CR1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- For Arjuna / JBoss Transaction -->
+ <dependency>
+ <groupId>apache-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.0.jboss</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>oswego-concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>1.3.4-jboss-update1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossts-common</artifactId>
+ <version>4.3.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jpa/tags/jboss-jpa-deployers-0.1.2</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jpa/tags/jboss-jpa-deployers-0.1.2</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jpa/tags/jboss-jpa-deployers-0.1.2</url>
+ </scm>
+</project>
Deleted: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java
===================================================================
--- projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java 2008-09-11 07:54:36 UTC (rev 78404)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java 2008-09-11 10:20:01 UTC (rev 78418)
@@ -1,372 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jpa.deployment;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.naming.InitialContext;
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.spi.PersistenceProvider;
-import javax.persistence.spi.PersistenceUnitTransactionType;
-
-import org.hibernate.ejb.HibernatePersistence;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.jpa.spi.PersistenceUnit;
-import org.jboss.jpa.spi.PersistenceUnitRegistry;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.jpa.spec.PersistenceUnitMetaData;
-import org.jboss.metadata.jpa.spec.TransactionType;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class PersistenceUnitDeployment //extends AbstractJavaEEComponent
- implements PersistenceUnit
-{
- private static final Logger log = Logger.getLogger(PersistenceUnitDeployment.class);
-
- protected InitialContext initialContext;
- protected VFSDeploymentUnit di;
- protected List<String> explicitEntityClasses = new ArrayList<String>();
- protected ManagedEntityManagerFactory managedFactory;
- protected EntityManagerFactory actualFactory;
- protected PersistenceUnitMetaData metaData;
- protected String kernelName;
- protected PersistenceDeployment deployment;
- private Properties defaultPersistenceProperties;
-
- public PersistenceUnitDeployment(InitialContext initialContext, PersistenceDeployment deployment, List<String> explicitEntityClasses, PersistenceUnitMetaData metadata, String kernelName, VFSDeploymentUnit deploymentUnit, Properties defaultPersistenceProperties)
- {
- //super(new SimpleJavaEEModule((deployment.getEar() != null ? deployment.getEar().getShortName() : null), deployment.getDeploymentUnit().getShortName()));
-
- this.deployment = deployment;
- this.initialContext = initialContext;
- this.di = deploymentUnit;
- this.explicitEntityClasses = explicitEntityClasses;
- this.metaData = metadata;
- this.defaultPersistenceProperties = defaultPersistenceProperties;
-
- this.kernelName = kernelName;
- }
-
- public void create()
- {
- // To allow for serializable objects to obtain a reference back
- PersistenceUnitRegistry.register(this);
- }
-
- public void destroy()
- {
- PersistenceUnitRegistry.unregister(this);
- }
-
- public static String getDefaultKernelName(String unitName)
- {
- int hashIndex = unitName.indexOf('#');
- if (hashIndex != -1)
- {
- String relativePath = unitName.substring(3, hashIndex);
- String name = unitName.substring(hashIndex + 1);
- return "persistence.units:jar=" + relativePath + "," + "unitName=" + name;
- }
- return "persistence.units:unitName=" + unitName;
- }
-
- public PersistenceDeployment getDeployment()
- {
- return deployment;
- }
-
- protected String getJaccContextId()
- {
- return di.getSimpleName();
- }
-
- public EntityManagerFactory getActualFactory()
- {
- return actualFactory;
- }
-
- public PersistenceUnitMetaData getXml()
- {
- return metaData;
- }
-
- public String getKernelName()
- {
- return kernelName;
- }
-
- public String getName()
- {
- return getKernelName();
- }
-
- /**
- * Find the persistence unit root, which can be the root of a jar
- * or WEB-INF/classes of a war.
- * @return the persistence unit root
- */
- protected VirtualFile getPersistenceUnitRoot()
- {
- // FIXME: What is the correct way to find the persistence unit root?
- try
- {
- VirtualFile metaData = di.getMetaDataFile("persistence.xml");
- assert metaData != null : "Can't find persistence.xml in " + di;
- return metaData.getParent().getParent();
- }
- catch(IOException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- public EntityManagerFactory getContainerEntityManagerFactory()
- {
- return getManagedFactory().getEntityManagerFactory();
- }
-
- public String getEntityManagerName()
- {
- return metaData.getName();
- }
-
- public ManagedEntityManagerFactory getManagedFactory()
- {
- if(managedFactory == null)
- log.warn("managed factory is null, persistence unit " + kernelName + " has not yet been started");
- return managedFactory;
- }
-
- protected Map<String, String> getProperties()
- {
- Map<String, String> properties = metaData.getProperties();
- return (properties != null) ? properties : Collections.<String, String>emptyMap();
- }
-
- private URL getRelativeURL(String jar)
- {
- try
- {
- return new URL(jar);
- }
- catch (MalformedURLException e)
- {
- try
- {
- URL url = di.getFile("").toURL();
- return new URL(url, jar);
- }
- catch (Exception e1)
- {
- throw new RuntimeException("could not find relative path: " + jar, e1);
- }
- }
- }
-
-// public void addDependencies(DependencyPolicy policy)
-// {
-// Map<String, String> props = getProperties();
-// if (!props.containsKey("jboss.no.implicit.datasource.dependency"))
-// {
-// if (metaData.getJtaDataSource() != null)
-// {
-// String ds = metaData.getJtaDataSource();
-// policy.addDatasource(ds);
-// }
-// if (metaData.getNonJtaDataSource() != null)
-// {
-// String ds = metaData.getNonJtaDataSource();
-// policy.addDatasource(ds);
-// }
-// }
-// for (Object prop : props.keySet())
-// {
-// String property = (String)prop;
-// if (property.startsWith("jboss.depends"))
-// {
-// policy.addDependency(props.get(property));
-// }
-// }
-//
-// }
-
- protected PersistenceUnitTransactionType getJPATransactionType()
- {
- TransactionType type = metaData.getTransactionType();
- if (type == TransactionType.RESOURCE_LOCAL)
- return PersistenceUnitTransactionType.RESOURCE_LOCAL;
- else // default or actually being JTA
- return PersistenceUnitTransactionType.JTA;
- }
-
- private List<String> safeList(Set<String> set)
- {
- return (set == null || set.isEmpty()) ? Collections.<String>emptyList() : new ArrayList<String>(set);
- }
-
- public void start() throws Exception
- {
- log.info("Starting persistence unit " + kernelName);
-
- Properties props = new Properties();
- props.putAll(defaultPersistenceProperties);
- props.put(HibernatePersistence.JACC_CONTEXT_ID, getJaccContextId());
-
- PersistenceUnitInfoImpl pi = new PersistenceUnitInfoImpl();
- log.debug("Using class loader " + di.getClassLoader());
- pi.setClassLoader(di.getClassLoader());
-
- ArrayList<URL> jarFiles = new ArrayList<URL>();
- pi.setJarFiles(jarFiles);
- pi.setPersistenceProviderClassName(HibernatePersistence.class.getName());
- log.debug("Found persistence.xml file in EJB3 jar");
- props.putAll(getProperties());
- pi.setManagedClassnames(safeList(metaData.getClasses()));
- pi.setPersistenceUnitName(metaData.getName());
- pi.setMappingFileNames(safeList(metaData.getMappingFiles()));
- pi.setExcludeUnlistedClasses(metaData.isExcludeUnlistedClasses());
- VirtualFile root = getPersistenceUnitRoot();
- log.debug("Persistence root: " + root);
- // TODO - update this with VFSUtils helper method
- // hack the JPA url
- URL url = root.toURL();
- // is not nested, so direct VFS URL is not an option
- if (VFSUtils.isNestedFile(root) == false)
- {
- String urlString = url.toExternalForm();
- if (urlString.startsWith("vfs"))
- {
- // treat vfszip as file
- if (urlString.startsWith("vfszip"))
- url = new URL("file" + urlString.substring(6));
- else
- url = new URL(urlString.substring(3)); // (vfs)file and (vfs)jar are ok
- }
- }
- pi.setPersistenceUnitRootUrl(url);
- PersistenceUnitTransactionType transactionType = getJPATransactionType();
- pi.setTransactionType(transactionType);
-
- Set<String> files = metaData.getJarFiles();
- if (files != null)
- {
- for (String jar : files)
- {
- jarFiles.add(getRelativeURL(jar));
- }
- }
-
- if (metaData.getProvider() != null) pi.setPersistenceProviderClassName(metaData.getProvider());
- if (explicitEntityClasses.size() > 0)
- {
- List<String> classes = pi.getManagedClassNames();
- if (classes == null) classes = explicitEntityClasses;
- else classes.addAll(explicitEntityClasses);
- pi.setManagedClassnames(classes);
- }
- if (metaData.getJtaDataSource() != null)
- {
- pi.setJtaDataSource((javax.sql.DataSource) initialContext.lookup(metaData.getJtaDataSource()));
- }
- else if (transactionType == PersistenceUnitTransactionType.JTA)
- {
- throw new RuntimeException("Specification violation [EJB3 JPA 6.2.1.2] - "
- + "You have not defined a jta-data-source for a JTA enabled persistence context named: " + metaData.getName());
- }
- if (metaData.getNonJtaDataSource() != null)
- {
- pi.setNonJtaDataSource((javax.sql.DataSource) initialContext.lookup(metaData.getNonJtaDataSource()));
- }
- else if (transactionType == PersistenceUnitTransactionType.RESOURCE_LOCAL)
- {
- throw new RuntimeException("Specification violation [EJB3 JPA 6.2.1.2] - "
- + "You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: "
- + metaData.getName());
- }
- pi.setProperties(props);
-
- if (pi.getPersistenceUnitName() == null)
- {
- throw new RuntimeException("you must specify a name in persistence.xml");
- }
-
- Class<?> providerClass = Thread.currentThread().getContextClassLoader().loadClass(pi.getPersistenceProviderClassName());
-
- // EJBTHREE-893
- if(!pi.getProperties().containsKey("hibernate.session_factory_name"))
- {
- pi.getProperties().put("hibernate.session_factory_name", kernelName);
- }
-
- PersistenceProvider pp = (PersistenceProvider) providerClass.newInstance();
- actualFactory = pp.createContainerEntityManagerFactory(pi, null);
-
- managedFactory = new ManagedEntityManagerFactory(actualFactory, kernelName);
-
- // FIXME: Reinstate
-// String entityManagerJndiName = (String) props.get("jboss.entity.manager.jndi.name");
-// if (entityManagerJndiName != null)
-// {
-// EntityManager injectedManager = new TransactionScopedEntityManager(managedFactory);
-// NonSerializableFactory.rebind(initialContext, entityManagerJndiName, injectedManager);
-// }
-// String entityManagerFactoryJndiName = (String) props.get("jboss.entity.manager.factory.jndi.name");
-// if (entityManagerFactoryJndiName != null)
-// {
-// EntityManagerFactory injectedFactory = new InjectedEntityManagerFactory(managedFactory);
-// NonSerializableFactory.rebind(initialContext, entityManagerFactoryJndiName, injectedFactory);
-// }
- }
-
- public void stop() throws Exception
- {
- log.info("Stopping persistence unit " + kernelName);
-
- // FIXME: reinstate
-// String entityManagerJndiName = getProperties().get("jboss.entity.manager.jndi.name");
-// if (entityManagerJndiName != null)
-// {
-// NonSerializableFactory.unbind(initialContext, entityManagerJndiName);
-// }
-// String entityManagerFactoryJndiName = getProperties().get("jboss.entity.manager.factory.jndi.name");
-// if (entityManagerFactoryJndiName != null)
-// {
-// NonSerializableFactory.unbind(initialContext, entityManagerFactoryJndiName);
-// }
- managedFactory.destroy();
- }
-}
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java (from rev 78416, projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitDeployment.java 2008-09-11 10:20:01 UTC (rev 78418)
@@ -0,0 +1,317 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jpa.deployment;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.naming.InitialContext;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.spi.PersistenceProvider;
+
+import org.hibernate.ejb.HibernatePersistence;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.jpa.spi.PersistenceUnit;
+import org.jboss.jpa.spi.PersistenceUnitRegistry;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.jpa.spec.PersistenceUnitMetaData;
+import org.jboss.virtual.VFSUtils;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision$
+ */
+public class PersistenceUnitDeployment //extends AbstractJavaEEComponent
+ implements PersistenceUnit
+{
+ private static final Logger log = Logger.getLogger(PersistenceUnitDeployment.class);
+
+ protected InitialContext initialContext;
+ protected VFSDeploymentUnit di;
+ protected List<String> explicitEntityClasses = new ArrayList<String>();
+ protected ManagedEntityManagerFactory managedFactory;
+ protected EntityManagerFactory actualFactory;
+ protected PersistenceUnitMetaData metaData;
+ protected String kernelName;
+ protected PersistenceDeployment deployment;
+ private Properties defaultPersistenceProperties;
+
+ public PersistenceUnitDeployment(InitialContext initialContext, PersistenceDeployment deployment, List<String> explicitEntityClasses, PersistenceUnitMetaData metadata, String kernelName, VFSDeploymentUnit deploymentUnit, Properties defaultPersistenceProperties)
+ {
+ //super(new SimpleJavaEEModule((deployment.getEar() != null ? deployment.getEar().getShortName() : null), deployment.getDeploymentUnit().getShortName()));
+
+ this.deployment = deployment;
+ this.initialContext = initialContext;
+ this.di = deploymentUnit;
+ this.explicitEntityClasses = explicitEntityClasses;
+ this.metaData = metadata;
+ this.defaultPersistenceProperties = defaultPersistenceProperties;
+
+ this.kernelName = kernelName;
+ }
+
+ public void create()
+ {
+ // To allow for serializable objects to obtain a reference back
+ PersistenceUnitRegistry.register(this);
+ }
+
+ public void destroy()
+ {
+ PersistenceUnitRegistry.unregister(this);
+ }
+
+ public static String getDefaultKernelName(String unitName)
+ {
+ int hashIndex = unitName.indexOf('#');
+ if (hashIndex != -1)
+ {
+ String relativePath = unitName.substring(3, hashIndex);
+ String name = unitName.substring(hashIndex + 1);
+ return "persistence.units:jar=" + relativePath + "," + "unitName=" + name;
+ }
+ return "persistence.units:unitName=" + unitName;
+ }
+
+ public PersistenceDeployment getDeployment()
+ {
+ return deployment;
+ }
+
+ protected String getJaccContextId()
+ {
+ return di.getSimpleName();
+ }
+
+ public EntityManagerFactory getActualFactory()
+ {
+ return actualFactory;
+ }
+
+ public PersistenceUnitMetaData getXml()
+ {
+ return metaData;
+ }
+
+ public String getKernelName()
+ {
+ return kernelName;
+ }
+
+ public String getName()
+ {
+ return getKernelName();
+ }
+
+ /**
+ * Find the persistence unit root, which can be the root of a jar
+ * or WEB-INF/classes of a war.
+ * @return the persistence unit root
+ */
+ protected VirtualFile getPersistenceUnitRoot()
+ {
+ // FIXME: What is the correct way to find the persistence unit root?
+ try
+ {
+ VirtualFile metaData = di.getMetaDataFile("persistence.xml");
+ assert metaData != null : "Can't find persistence.xml in " + di;
+ return metaData.getParent().getParent();
+ }
+ catch(IOException e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public EntityManagerFactory getContainerEntityManagerFactory()
+ {
+ return getManagedFactory().getEntityManagerFactory();
+ }
+
+ public String getEntityManagerName()
+ {
+ return metaData.getName();
+ }
+
+ public ManagedEntityManagerFactory getManagedFactory()
+ {
+ if(managedFactory == null)
+ log.warn("managed factory is null, persistence unit " + kernelName + " has not yet been started");
+ return managedFactory;
+ }
+
+ protected Map<String, String> getProperties()
+ {
+ Map<String, String> properties = metaData.getProperties();
+ return (properties != null) ? properties : Collections.<String, String>emptyMap();
+ }
+
+ private URL getRelativeURL(String jar)
+ {
+ try
+ {
+ return new URL(jar);
+ }
+ catch (MalformedURLException e)
+ {
+ try
+ {
+ URL url = di.getFile("").toURL();
+ return new URL(url, jar);
+ }
+ catch (Exception e1)
+ {
+ throw new RuntimeException("could not find relative path: " + jar, e1);
+ }
+ }
+ }
+
+// public void addDependencies(DependencyPolicy policy)
+// {
+// Map<String, String> props = getProperties();
+// if (!props.containsKey("jboss.no.implicit.datasource.dependency"))
+// {
+// if (metaData.getJtaDataSource() != null)
+// {
+// String ds = metaData.getJtaDataSource();
+// policy.addDatasource(ds);
+// }
+// if (metaData.getNonJtaDataSource() != null)
+// {
+// String ds = metaData.getNonJtaDataSource();
+// policy.addDatasource(ds);
+// }
+// }
+// for (Object prop : props.keySet())
+// {
+// String property = (String)prop;
+// if (property.startsWith("jboss.depends"))
+// {
+// policy.addDependency(props.get(property));
+// }
+// }
+//
+// }
+
+ public void start() throws Exception
+ {
+ log.info("Starting persistence unit " + kernelName);
+
+ Properties props = new Properties();
+ props.putAll(defaultPersistenceProperties);
+ props.put(HibernatePersistence.JACC_CONTEXT_ID, getJaccContextId());
+
+ List<URL> jarFiles = new ArrayList<URL>();
+ Set<String> files = metaData.getJarFiles();
+ if (files != null)
+ {
+ for (String jar : files)
+ {
+ jarFiles.add(getRelativeURL(jar));
+ }
+ }
+
+ VirtualFile root = getPersistenceUnitRoot();
+ log.debug("Persistence root: " + root);
+ // TODO - update this with VFSUtils helper method
+ // hack the JPA url
+ URL url = root.toURL();
+ // is not nested, so direct VFS URL is not an option
+ if (VFSUtils.isNestedFile(root) == false)
+ {
+ String urlString = url.toExternalForm();
+ if (urlString.startsWith("vfs"))
+ {
+ // treat vfszip as file
+ if (urlString.startsWith("vfszip"))
+ url = new URL("file" + urlString.substring(6));
+ else
+ url = new URL(urlString.substring(3)); // (vfs)file and (vfs)jar are ok
+ }
+ }
+
+ PersistenceUnitInfoImpl pi = new PersistenceUnitInfoImpl(metaData, props, di.getClassLoader(), url, jarFiles, initialContext);
+
+ if (explicitEntityClasses.size() > 0)
+ {
+ List<String> classes = pi.getManagedClassNames();
+ if (classes == null) classes = explicitEntityClasses;
+ else classes.addAll(explicitEntityClasses);
+ pi.setManagedClassnames(classes);
+ }
+
+ Class<?> providerClass = Thread.currentThread().getContextClassLoader().loadClass(pi.getPersistenceProviderClassName());
+
+ // EJBTHREE-893
+ if(!pi.getProperties().containsKey("hibernate.session_factory_name"))
+ {
+ pi.getProperties().put("hibernate.session_factory_name", kernelName);
+ }
+
+ PersistenceProvider pp = (PersistenceProvider) providerClass.newInstance();
+ actualFactory = pp.createContainerEntityManagerFactory(pi, null);
+
+ managedFactory = new ManagedEntityManagerFactory(actualFactory, kernelName);
+
+ // FIXME: Reinstate
+// String entityManagerJndiName = (String) props.get("jboss.entity.manager.jndi.name");
+// if (entityManagerJndiName != null)
+// {
+// EntityManager injectedManager = new TransactionScopedEntityManager(managedFactory);
+// NonSerializableFactory.rebind(initialContext, entityManagerJndiName, injectedManager);
+// }
+// String entityManagerFactoryJndiName = (String) props.get("jboss.entity.manager.factory.jndi.name");
+// if (entityManagerFactoryJndiName != null)
+// {
+// EntityManagerFactory injectedFactory = new InjectedEntityManagerFactory(managedFactory);
+// NonSerializableFactory.rebind(initialContext, entityManagerFactoryJndiName, injectedFactory);
+// }
+ }
+
+ public void stop() throws Exception
+ {
+ log.info("Stopping persistence unit " + kernelName);
+
+ // FIXME: reinstate
+// String entityManagerJndiName = getProperties().get("jboss.entity.manager.jndi.name");
+// if (entityManagerJndiName != null)
+// {
+// NonSerializableFactory.unbind(initialContext, entityManagerJndiName);
+// }
+// String entityManagerFactoryJndiName = getProperties().get("jboss.entity.manager.factory.jndi.name");
+// if (entityManagerFactoryJndiName != null)
+// {
+// NonSerializableFactory.unbind(initialContext, entityManagerFactoryJndiName);
+// }
+ managedFactory.destroy();
+ }
+}
Deleted: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java
===================================================================
--- projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java 2008-09-11 07:54:36 UTC (rev 78404)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java 2008-09-11 10:20:01 UTC (rev 78418)
@@ -1,188 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jpa.deployment;
-
-import java.net.URL;
-import java.util.List;
-import java.util.Properties;
-
-import javax.persistence.spi.ClassTransformer;
-import javax.persistence.spi.PersistenceUnitInfo;
-import javax.persistence.spi.PersistenceUnitTransactionType;
-import javax.sql.DataSource;
-
-/**
- * Comment
- *
- * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
- * @version $Revision$
- */
-public class PersistenceUnitInfoImpl implements PersistenceUnitInfo
-{
- private String entityManagerName;
- private DataSource jtaDataSource;
- private DataSource nonJtaDataSource;
- private List<String> mappingFileNames;
- private List<URL> jarFiles;
- private List<String> entityclassNames;
- private Properties properties;
- private ClassLoader classLoader;
- private String persistenceProviderClassName;
- private PersistenceUnitTransactionType transactionType;
- private URL persistenceUnitRootUrl;
- private boolean excludeClasses;
-
- public PersistenceUnitInfoImpl()
- {
- }
-
- public void addTransformer(ClassTransformer transformer)
- {
- //throw new RuntimeException("NOT IMPLEMENTED");
- }
-
- public ClassLoader getNewTempClassLoader()
- {
- return null;
- }
-
- public String getPersistenceProviderClassName()
- {
- return persistenceProviderClassName;
- }
-
- public void setPersistenceProviderClassName(String persistenceProviderClassName)
- {
- this.persistenceProviderClassName = persistenceProviderClassName;
- }
-
- public String getPersistenceUnitName()
- {
- return entityManagerName;
- }
-
- public void setPersistenceUnitName(String entityManagerName)
- {
- this.entityManagerName = entityManagerName;
- }
-
- public DataSource getJtaDataSource()
- {
- return jtaDataSource;
- }
-
- public void setJtaDataSource(DataSource jtaDataSource)
- {
- this.jtaDataSource = jtaDataSource;
- }
-
- public DataSource getNonJtaDataSource()
- {
- return nonJtaDataSource;
- }
-
- public void setNonJtaDataSource(DataSource nonJtaDataSource)
- {
- this.nonJtaDataSource = nonJtaDataSource;
- }
-
- public List<String> getMappingFileNames()
- {
- return mappingFileNames;
- }
-
- public void setMappingFileNames(List<String> mappingFileNames)
- {
- this.mappingFileNames = mappingFileNames;
- }
-
- public List<URL> getJarFileUrls()
- {
- return jarFiles;
- }
-
- public void setJarFiles(List<URL> jarFiles)
- {
- this.jarFiles = jarFiles;
- }
-
- public List<String> getManagedClassNames()
- {
- return entityclassNames;
- }
-
- public void setManagedClassnames(List<String> entityclassNames)
- {
- this.entityclassNames = entityclassNames;
- }
-
- public Properties getProperties()
- {
- return properties;
- }
-
- public void setProperties(Properties properties)
- {
- this.properties = properties;
- }
-
- public ClassLoader getClassLoader()
- {
- return classLoader;
- }
-
- public void setClassLoader(ClassLoader classLoader)
- {
- this.classLoader = classLoader;
- }
-
- public PersistenceUnitTransactionType getTransactionType()
- {
- return transactionType;
- }
-
- public void setTransactionType(PersistenceUnitTransactionType transactionType)
- {
- this.transactionType = transactionType;
- }
-
- public URL getPersistenceUnitRootUrl()
- {
- return persistenceUnitRootUrl;
- }
-
- public void setPersistenceUnitRootUrl(URL persistenceUnitRootUrl)
- {
- this.persistenceUnitRootUrl = persistenceUnitRootUrl;
- }
-
- public boolean excludeUnlistedClasses()
- {
- return excludeClasses;
- }
-
- public void setExcludeUnlistedClasses(boolean excludeClasses)
- {
- this.excludeClasses = excludeClasses;
- }
-
-}
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java (from rev 78416, projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/deployment/PersistenceUnitInfoImpl.java 2008-09-11 10:20:01 UTC (rev 78418)
@@ -0,0 +1,298 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jpa.deployment;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.persistence.spi.ClassTransformer;
+import javax.persistence.spi.PersistenceUnitInfo;
+import javax.persistence.spi.PersistenceUnitTransactionType;
+import javax.sql.DataSource;
+
+import org.hibernate.ejb.HibernatePersistence;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.jpa.spec.PersistenceUnitMetaData;
+import org.jboss.metadata.jpa.spec.TransactionType;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @version $Revision$
+ */
+public class PersistenceUnitInfoImpl implements PersistenceUnitInfo
+{
+ private static final Logger log = Logger.getLogger(PersistenceUnitInfoImpl.class);
+
+ private String entityManagerName;
+ private DataSource jtaDataSource;
+ private DataSource nonJtaDataSource;
+ private List<String> mappingFileNames;
+ private List<URL> jarFiles;
+ private List<String> entityclassNames;
+ private Properties properties;
+ private ClassLoader classLoader;
+ private String persistenceProviderClassName;
+ private PersistenceUnitTransactionType transactionType;
+ private URL persistenceUnitRootUrl;
+ private boolean excludeClasses;
+
+ public PersistenceUnitInfoImpl()
+ {
+ }
+
+ /**
+ * Note that the jarFiles in metaData are ignore and should be
+ * specified in the jarFiles argument.
+ *
+ * @param metaData the persistence unit meta data
+ * @param props properties for the persistence provider
+ * @param classLoader the class loader used for entity class loading
+ * @param persistenceUnitRootUrl a jar or JarInputStream where the entities are packaged
+ * @param jarFiles a list of URLs pointing to jar or JarInputStreams where entities are packaged
+ * @param ctx naming context for looking up data sources
+ * @throws NamingException when a data source can't be located
+ */
+ public PersistenceUnitInfoImpl(PersistenceUnitMetaData metaData, Properties props, ClassLoader classLoader, URL persistenceUnitRootUrl, List<URL> jarFiles, Context ctx) throws NamingException
+ {
+ log.debug("Using class loader " + classLoader);
+ this.setClassLoader(classLoader);
+
+ this.setJarFiles(jarFiles);
+ this.setPersistenceProviderClassName(HibernatePersistence.class.getName());
+ log.debug("Found persistence.xml file in EJB3 jar");
+ this.setManagedClassnames(safeList(metaData.getClasses()));
+ this.setPersistenceUnitName(metaData.getName());
+ this.setMappingFileNames(safeList(metaData.getMappingFiles()));
+ this.setExcludeUnlistedClasses(metaData.isExcludeUnlistedClasses());
+ this.setPersistenceUnitRootUrl(persistenceUnitRootUrl);
+ PersistenceUnitTransactionType transactionType = getJPATransactionType(metaData);
+ this.setTransactionType(transactionType);
+
+ if (metaData.getProvider() != null) this.setPersistenceProviderClassName(metaData.getProvider());
+ /*
+ if (explicitEntityClasses.size() > 0)
+ {
+ List<String> classes = this.getManagedClassNames();
+ if (classes == null) classes = explicitEntityClasses;
+ else classes.addAll(explicitEntityClasses);
+ this.setManagedClassnames(classes);
+ }
+ */
+ if (metaData.getJtaDataSource() != null)
+ {
+ this.setJtaDataSource((javax.sql.DataSource) ctx.lookup(metaData.getJtaDataSource()));
+ }
+ else if (transactionType == PersistenceUnitTransactionType.JTA)
+ {
+ throw new RuntimeException("Specification violation [EJB3 JPA 6.2.1.2] - "
+ + "You have not defined a jta-data-source for a JTA enabled persistence context named: " + metaData.getName());
+ }
+ if (metaData.getNonJtaDataSource() != null)
+ {
+ this.setNonJtaDataSource((javax.sql.DataSource) ctx.lookup(metaData.getNonJtaDataSource()));
+ }
+ else if (transactionType == PersistenceUnitTransactionType.RESOURCE_LOCAL)
+ {
+ throw new RuntimeException("Specification violation [EJB3 JPA 6.2.1.2] - "
+ + "You have not defined a non-jta-data-source for a RESOURCE_LOCAL enabled persistence context named: "
+ + metaData.getName());
+ }
+ props.putAll(getProperties(metaData));
+ this.setProperties(props);
+
+ if (this.getPersistenceUnitName() == null)
+ {
+ throw new RuntimeException("you must specify a name in persistence.xml");
+ }
+
+ // EJBTHREE-893
+ /* TODO: can this work remotely?
+ if(!this.getProperties().containsKey("hibernate.session_factory_name"))
+ {
+ this.getProperties().put("hibernate.session_factory_name", kernelName);
+ }
+ */
+ }
+
+ public void addTransformer(ClassTransformer transformer)
+ {
+ //throw new RuntimeException("NOT IMPLEMENTED");
+ }
+
+ private static List<String> safeList(Set<String> set)
+ {
+ return (set == null || set.isEmpty()) ? Collections.<String>emptyList() : new ArrayList<String>(set);
+ }
+
+ public ClassLoader getNewTempClassLoader()
+ {
+ return null;
+ }
+
+ public String getPersistenceProviderClassName()
+ {
+ return persistenceProviderClassName;
+ }
+
+ public void setPersistenceProviderClassName(String persistenceProviderClassName)
+ {
+ this.persistenceProviderClassName = persistenceProviderClassName;
+ }
+
+ public String getPersistenceUnitName()
+ {
+ return entityManagerName;
+ }
+
+ public void setPersistenceUnitName(String entityManagerName)
+ {
+ this.entityManagerName = entityManagerName;
+ }
+
+ public DataSource getJtaDataSource()
+ {
+ return jtaDataSource;
+ }
+
+ public void setJtaDataSource(DataSource jtaDataSource)
+ {
+ this.jtaDataSource = jtaDataSource;
+ }
+
+ protected static PersistenceUnitTransactionType getJPATransactionType(PersistenceUnitMetaData metaData)
+ {
+ TransactionType type = metaData.getTransactionType();
+ if (type == TransactionType.RESOURCE_LOCAL)
+ return PersistenceUnitTransactionType.RESOURCE_LOCAL;
+ else // default or actually being JTA
+ return PersistenceUnitTransactionType.JTA;
+ }
+
+ public DataSource getNonJtaDataSource()
+ {
+ return nonJtaDataSource;
+ }
+
+ public void setNonJtaDataSource(DataSource nonJtaDataSource)
+ {
+ this.nonJtaDataSource = nonJtaDataSource;
+ }
+
+ public List<String> getMappingFileNames()
+ {
+ return mappingFileNames;
+ }
+
+ public void setMappingFileNames(List<String> mappingFileNames)
+ {
+ this.mappingFileNames = mappingFileNames;
+ }
+
+ public List<URL> getJarFileUrls()
+ {
+ return jarFiles;
+ }
+
+ public void setJarFiles(List<URL> jarFiles)
+ {
+ // Hibernate EM 3.3.2.GA LogHelper at 49
+ assert jarFiles != null : "jarFiles is null";
+
+ this.jarFiles = jarFiles;
+ }
+
+ public List<String> getManagedClassNames()
+ {
+ return entityclassNames;
+ }
+
+ public void setManagedClassnames(List<String> entityclassNames)
+ {
+ this.entityclassNames = entityclassNames;
+ }
+
+ public Properties getProperties()
+ {
+ return properties;
+ }
+
+ protected static Map<String, String> getProperties(PersistenceUnitMetaData metaData)
+ {
+ Map<String, String> properties = metaData.getProperties();
+ return (properties != null) ? properties : Collections.<String, String>emptyMap();
+ }
+
+ public void setProperties(Properties properties)
+ {
+ this.properties = properties;
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+
+ public void setClassLoader(ClassLoader classLoader)
+ {
+ this.classLoader = classLoader;
+ }
+
+ public PersistenceUnitTransactionType getTransactionType()
+ {
+ return transactionType;
+ }
+
+ public void setTransactionType(PersistenceUnitTransactionType transactionType)
+ {
+ this.transactionType = transactionType;
+ }
+
+ public URL getPersistenceUnitRootUrl()
+ {
+ return persistenceUnitRootUrl;
+ }
+
+ public void setPersistenceUnitRootUrl(URL persistenceUnitRootUrl)
+ {
+ this.persistenceUnitRootUrl = persistenceUnitRootUrl;
+ }
+
+ public boolean excludeUnlistedClasses()
+ {
+ return excludeClasses;
+ }
+
+ public void setExcludeUnlistedClasses(boolean excludeClasses)
+ {
+ this.excludeClasses = excludeClasses;
+ }
+
+}
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/main/java/org/jboss/jpa/remote (from rev 78416, projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/remote)
Deleted: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java
===================================================================
--- projects/jpa/trunk/deployers/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java 2008-09-11 07:54:36 UTC (rev 78404)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java 2008-09-11 10:20:01 UTC (rev 78418)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jpa.deployers.test.common;
-
-import java.sql.Connection;
-
-import javax.naming.InitialContext;
-
-import org.apache.derby.jdbc.EmbeddedDataSource;
-import org.jboss.logging.Logger;
-
-/**
- * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
- * @version $Revision: $
- */
-public class DerbyService
-{
- private static final Logger log = Logger.getLogger(DerbyService.class);
-
- private String className = "org.apache.derby.jdbc.EmbeddedDataSource";
- private String databaseName = "./target/derby.db";
- private boolean createDatabase = true;
- private String jndiName = "java:/DefaultDS";
-
- private EmbeddedDataSource ds;
- private InitialContext ctx;
-
- public void create() throws Exception
- {
- log.info("Creating derby service");
-
- System.setProperty("derby.stream.error.file", "target/derby.log");
-
- Class<? extends EmbeddedDataSource> cls = (Class<? extends EmbeddedDataSource>) Class.forName(className);
- this.ds = cls.newInstance();
- ds.setDatabaseName(databaseName);
- if(createDatabase)
- ds.setCreateDatabase("create");
-
- ctx = new InitialContext();
- }
-
- public void destroy() throws Exception
- {
- log.info("Destroying derby service");
-
- ctx.close();
- ctx = null;
- ds = null;
- }
-
- public void start() throws Exception
- {
- log.info("Starting derby service");
-
- // Make sure that database is created before we go on.
- Connection con = ds.getConnection();
- con.close();
-
- ctx.bind(jndiName, ds);
- }
-
- public void stop() throws Exception
- {
- log.info("Stopping derby service");
-
- ctx.unbind(jndiName);
- }
-}
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java (from rev 78416, projects/jpa/trunk/deployers/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/deployers/test/common/DerbyService.java 2008-09-11 10:20:01 UTC (rev 78418)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jpa.deployers.test.common;
+
+import java.sql.Connection;
+
+import javax.naming.InitialContext;
+
+import org.apache.derby.jdbc.EmbeddedDataSource;
+import org.jboss.logging.Logger;
+
+/**
+ * @author <a href="mailto:cdewolf at redhat.com">Carlo de Wolf</a>
+ * @version $Revision: $
+ */
+public class DerbyService
+{
+ private static final Logger log = Logger.getLogger(DerbyService.class);
+
+ private String className = "org.apache.derby.jdbc.EmbeddedDataSource";
+ private String databaseName = "./target/derby.db";
+ private boolean createDatabase = true;
+ private String jndiName = "java:/DefaultDS";
+
+ private EmbeddedDataSource ds;
+ private InitialContext ctx;
+
+ public void create() throws Exception
+ {
+ log.info("Creating derby service");
+
+ System.setProperty("derby.stream.error.file", "target/derby.log");
+
+ Class<? extends EmbeddedDataSource> cls = (Class<? extends EmbeddedDataSource>) Class.forName(className);
+ this.ds = cls.newInstance();
+ ds.setDatabaseName(databaseName);
+ if(createDatabase)
+ ds.setCreateDatabase("create");
+
+ ctx = new InitialContext();
+ }
+
+ public void destroy() throws Exception
+ {
+ log.info("Destroying derby service");
+
+ ctx.close();
+ ctx = null;
+ ds = null;
+ }
+
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ public void start() throws Exception
+ {
+ log.info("Starting derby service");
+
+ // Make sure that database is created before we go on.
+ Connection con = ds.getConnection();
+ con.close();
+
+ ctx.bind(jndiName, ds);
+ }
+
+ public void stop() throws Exception
+ {
+ log.info("Stopping derby service");
+
+ ctx.unbind(jndiName);
+ }
+}
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/java/org/jboss/jpa/remote (from rev 78416, projects/jpa/trunk/deployers/src/test/java/org/jboss/jpa/remote)
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/resources/META-INF (from rev 78416, projects/jpa/trunk/deployers/src/test/resources/META-INF)
Copied: projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/resources/log4j.xml (from rev 78415, projects/jpa/trunk/deployers/src/test/resources/log4j.xml)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/resources/log4j.xml (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-0.1.2/src/test/resources/log4j.xml 2008-09-11 10:20:01 UTC (rev 78418)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 68671 2008-01-08 10:04:25Z wolfc $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <param name="File" value="target/test.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- A size based file rolling appender
+ <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+ <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="500KB"/>
+ <param name="MaxBackupIndex" value="1"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+ -->
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="DEBUG"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Limit JBoss categories to INFO
+ <category name="org.jboss">
+ <priority value="INFO" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!-- Increase the priority threshold for the DefaultDS category
+ <category name="DefaultDS">
+ <priority value="FATAL"/>
+ </category>
+ -->
+
+ <!-- Decrease the priority threshold for the org.jboss.varia category
+ <category name="org.jboss.varia">
+ <priority value="DEBUG"/>
+ </category>
+ -->
+
+ <!--
+ | An example of enabling the custom TRACE level priority that is used
+ | by the JBoss internals to diagnose low level details. This example
+ | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+ | subpackages. This will produce A LOT of logging output.
+ <category name="org.jboss.system">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <category name="org.jboss">
+ <priority value="INFO"/>
+ </category>
+
+ <category name="org.jboss.jpa">
+ <priority value="DEBUG"/>
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <priority value="ALL" />
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
More information about the jboss-cvs-commits
mailing list