[jboss-cvs] JBossAS SVN: r109614 - in projects/jpa/tags: jboss-jpa-deployers-1.0.2-alpha-2 and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Dec 1 02:52:18 EST 2010
Author: jaikiran
Date: 2010-12-01 02:52:18 -0500 (Wed, 01 Dec 2010)
New Revision: 109614
Added:
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/pom.xml
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java
Removed:
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/pom.xml
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java
Modified:
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.classpath
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.project
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.settings/org.eclipse.jdt.core.prefs
projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.settings/org.maven.ide.eclipse.prefs
Log:
[maven-release-plugin] copy for tag jboss-jpa-deployers-1.0.2-alpha-2
Copied: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2 (from rev 109611, projects/jpa/trunk/deployers)
Modified: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.classpath
===================================================================
--- projects/jpa/trunk/deployers/.classpath 2010-11-30 23:46:05 UTC (rev 109611)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.classpath 2010-12-01 07:52:18 UTC (rev 109614)
@@ -1,8 +1,9 @@
+<?xml version="1.0" encoding="UTF-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
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="src" output="target/tests-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/tests-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Modified: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.project
===================================================================
--- projects/jpa/trunk/deployers/.project 2010-11-30 23:46:05 UTC (rev 109611)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.project 2010-12-01 07:52:18 UTC (rev 109614)
@@ -1,20 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-jpa-deployers</name>
- <comment>The JBoss Container Managed JPA Deployers for deploying persistence units.
+ <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
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jpa/trunk/deployers/.settings/org.eclipse.jdt.core.prefs 2010-11-30 23:46:05 UTC (rev 109611)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.settings/org.eclipse.jdt.core.prefs 2010-12-01 07:52:18 UTC (rev 109614)
@@ -1,5 +1,3 @@
-#Fri Jun 27 12:12:33 CEST 2008
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+#Wed Nov 24 21:47:06 IST 2010
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.source=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
Modified: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jpa/trunk/deployers/.settings/org.maven.ide.eclipse.prefs 2010-11-30 23:46:05 UTC (rev 109611)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/.settings/org.maven.ide.eclipse.prefs 2010-12-01 07:52:18 UTC (rev 109614)
@@ -1,8 +1,9 @@
-#Thu Sep 11 10:13:35 CEST 2008
-activeProfiles=eclipse
+#Sat Sep 04 13:49:08 IST 2010
+activeProfiles=
eclipse.preferences.version=1
fullBuildGoals=process-test-resources
includeModules=false
resolveWorkspaceProjects=true
resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
version=1
Deleted: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/pom.xml
===================================================================
--- projects/jpa/trunk/deployers/pom.xml 2010-11-30 23:46:05 UTC (rev 109611)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/pom.xml 2010-12-01 07:52:18 UTC (rev 109614)
@@ -1,166 +0,0 @@
-<!--
- vi:ts=2:sw=2:expandtab
--->
-<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>1.0.1</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>jboss-jpa-deployers</artifactId>
- <version>1.0.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>
-
- <properties>
- <version.org.jboss.deployers>2.0.5.GA</version.org.jboss.deployers>
- <version.switchboard>1.0.0-alpha-8</version.switchboard>
- </properties>
-
- <dependencies>
- <!-- For 'mocking' a TransactionManager we use JBossTS -->
- <dependency>
- <groupId>jboss.jbossts</groupId>
- <artifactId>jbossjta</artifactId>
- <version>4.4.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>${version.org.hibernate.hibernate-entitymanager}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.integration</groupId>
- <artifactId>jboss-transaction-spi</artifactId>
- <version>5.0.3.GA</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>${version.org.jboss.deployers}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.deployers</groupId>
- <artifactId>jboss-deployers-vfs-spi</artifactId>
- <version>${version.org.jboss.deployers}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jpa</groupId>
- <artifactId>jboss-jpa-impl</artifactId>
- <version>1.0.0</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.jpa</groupId>
- <artifactId>jboss-jpa-spi</artifactId>
- <version>1.0.0</version>
- <!-- TODO: we should really use the right jpa-spi -->
- <exclusions>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>ejb3-persistence</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.metadata</groupId>
- <artifactId>jboss-metadata</artifactId>
- <version>1.0.0.CR17</version>
- <exclusions>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>ejb3-persistence</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <!-- For @JMX -->
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-aop-mc-int</artifactId>
- <version>2.0.4.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.naming</groupId>
- <artifactId>jnpserver</artifactId>
- <version>5.0.1.GA</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.4.0.GA</version>
- <scope>test</scope>
- </dependency>
-
- <!-- Hibernate core logging -->
- <dependency>
- <groupId>org.jboss.slf4j</groupId>
- <artifactId>slf4j-jboss-logging</artifactId>
- <version>1.0.0.GA</version>
- <scope>test</scope>
- </dependency>
-
- <!-- jboss-common-core (For JNDI Utils) -->
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jboss-common-core</artifactId>
- <version>2.2.11.GA</version>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.switchboard</groupId>
- <artifactId>jboss-switchboard-mc-spi</artifactId>
- <version>${version.switchboard}</version>
- </dependency>
-
- <!-- switchboard -->
- <dependency>
- <groupId>org.jboss.switchboard</groupId>
- <artifactId>jboss-switchboard-javaee</artifactId>
- <version>${version.switchboard}</version>
- </dependency>
-
-
- </dependencies>
-</project>
Copied: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/pom.xml (from rev 109613, projects/jpa/trunk/deployers/pom.xml)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/pom.xml (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/pom.xml 2010-12-01 07:52:18 UTC (rev 109614)
@@ -0,0 +1,172 @@
+<!--
+ vi:ts=2:sw=2:expandtab
+-->
+<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>1.0.1</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>jboss-jpa-deployers</artifactId>
+ <version>1.0.2-alpha-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>
+
+ <properties>
+ <version.org.jboss.deployers>2.0.5.GA</version.org.jboss.deployers>
+ <version.switchboard>1.0.0-alpha-8</version.switchboard>
+ </properties>
+
+ <dependencies>
+ <!-- For 'mocking' a TransactionManager we use JBossTS -->
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjta</artifactId>
+ <version>4.4.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>${version.org.hibernate.hibernate-entitymanager}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-transaction-spi</artifactId>
+ <version>5.0.3.GA</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>${version.org.jboss.deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.deployers</groupId>
+ <artifactId>jboss-deployers-vfs-spi</artifactId>
+ <version>${version.org.jboss.deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jpa</groupId>
+ <artifactId>jboss-jpa-impl</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.jpa</groupId>
+ <artifactId>jboss-jpa-spi</artifactId>
+ <version>1.0.0</version>
+ <!-- TODO: we should really use the right jpa-spi -->
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>ejb3-persistence</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ <version>1.0.0.CR17</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>ejb3-persistence</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- For @JMX -->
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ <version>2.0.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.naming</groupId>
+ <artifactId>jnpserver</artifactId>
+ <version>5.0.1.GA</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.4.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- Hibernate core logging -->
+ <dependency>
+ <groupId>org.jboss.slf4j</groupId>
+ <artifactId>slf4j-jboss-logging</artifactId>
+ <version>1.0.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!-- jboss-common-core (For JNDI Utils) -->
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>2.2.11.GA</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.switchboard</groupId>
+ <artifactId>jboss-switchboard-mc-spi</artifactId>
+ <version>${version.switchboard}</version>
+ </dependency>
+
+ <!-- switchboard -->
+ <dependency>
+ <groupId>org.jboss.switchboard</groupId>
+ <artifactId>jboss-switchboard-javaee</artifactId>
+ <version>${version.switchboard}</version>
+ </dependency>
+
+
+ </dependencies>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2</developerConnection>
+ <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2</url>
+ </scm>
+</project>
Deleted: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java
===================================================================
--- projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java 2010-11-30 23:46:05 UTC (rev 109611)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java 2010-12-01 07:52:18 UTC (rev 109614)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.switchboard;
-
-import org.jboss.jpa.deployment.PersistenceUnitDeployment;
-import org.jboss.jpa.spi.PersistenceUnitRegistry;
-import org.jboss.switchboard.spi.Resource;
-
-/**
- *
- * <p>
- *
- * </p>
- *
- * @author Scott Marlow
- */
-public class PersistenceUnitRefResource implements Resource
-{
-
- private final String persistenceUnitDeploymentMCBeanName;
-
- public PersistenceUnitRefResource(String persistenceUnitDeploymentMCBeanName)
- {
- this.persistenceUnitDeploymentMCBeanName = persistenceUnitDeploymentMCBeanName;
- }
-
- public Object getDependency()
- {
- // We need the PersistenceUnitDeployer MC bean to be started before we can bind
- // the PersistenceUnitDeployment.getManagedFactory() to JNDI
- return persistenceUnitDeploymentMCBeanName;
- }
-
- public Object getTarget()
- {
- return ((PersistenceUnitDeployment)PersistenceUnitRegistry.getPersistenceUnit(persistenceUnitDeploymentMCBeanName)).getManagedFactory();
- }
-}
Copied: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java (from rev 109612, projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitRefResource.java 2010-12-01 07:52:18 UTC (rev 109614)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.switchboard;
+
+import org.jboss.jpa.deployment.ManagedEntityManagerFactory;
+import org.jboss.jpa.deployment.PersistenceUnitDeployment;
+import org.jboss.jpa.spi.PersistenceUnitRegistry;
+import org.jboss.switchboard.spi.Resource;
+
+/**
+ *
+ * <p>
+ *
+ * </p>
+ *
+ * @author Scott Marlow
+ */
+public class PersistenceUnitRefResource implements Resource
+{
+
+ private final String puSupplier;
+
+ public PersistenceUnitRefResource(String puSupplier)
+ {
+ if (puSupplier == null)
+ {
+ throw new IllegalArgumentException("Cannot create a PersistenceUnitRefResource for a null persistence unit supplier");
+ }
+ this.puSupplier = puSupplier;
+ }
+
+ @Override
+ public Object getDependency()
+ {
+ // We need the PersistenceUnitDeployer MC bean to be started before we can bind
+ // the PersistenceUnitDeployment.getManagedFactory().getEntityManagerFactory() to JNDI
+ return puSupplier;
+ }
+
+ @Override
+ public Object getTarget()
+ {
+ ManagedEntityManagerFactory managedEntityManagerFactory = ((PersistenceUnitDeployment)PersistenceUnitRegistry.getPersistenceUnit(puSupplier)).getManagedFactory();
+ return managedEntityManagerFactory.getEntityManagerFactory();
+ }
+
+ @Override
+ public String toString()
+ {
+ return PersistenceUnitRefResource.class.getSimpleName() + "[supplier=" + this.puSupplier + "]";
+ }
+}
Deleted: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java
===================================================================
--- projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java 2010-11-30 23:46:05 UTC (rev 109611)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java 2010-12-01 07:52:18 UTC (rev 109614)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.switchboard;
-
-import org.jboss.beans.metadata.api.annotations.Inject;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.jpa.resolvers.PersistenceUnitDependencyResolver;
-import org.jboss.logging.Logger;
-import org.jboss.switchboard.javaee.environment.PersistenceUnitRefType;
-import org.jboss.switchboard.mc.spi.MCBasedResourceProvider;
-import org.jboss.switchboard.spi.Resource;
-
-/**
- * {@link MCBasedResourceProvider} for processing PersistenceUnit references in a
- * Java EE component.
- *
- * @see #provide(DeploymentUnit, PersistenceUnitRefType)
- *
- * @author Scott Marlow
- */
-public class PersistenceUnitResourceProvider implements MCBasedResourceProvider<PersistenceUnitRefType>
-{
- private static final Logger log = Logger.getLogger(PersistenceUnitResourceProvider.class);
- private PersistenceUnitDependencyResolver persistenceUnitDependencyResolver;
- /**
- *
- * @param resolver For resolving the PU bean name
- */
- public PersistenceUnitResourceProvider(PersistenceUnitDependencyResolver resolver)
- {
- this.persistenceUnitDependencyResolver = resolver;
- }
-
-
- @Override
- public Resource provide(DeploymentUnit deploymentUnit, PersistenceUnitRefType persistenceUnitRefType)
- {
- String lookupName = persistenceUnitRefType.getLookupName();
- String persistenceUnitName = persistenceUnitDependencyResolver.createBeanName(deploymentUnit,deploymentUnit.getName());
- if (log.isTraceEnabled())
- log.trace("PersistenceUnitResourceProvider.provide: " + deploymentUnit.getName() + ", " + lookupName + ", " + persistenceUnitName);
- return new PersistenceUnitRefResource(persistenceUnitName);
- }
-
- public Class<PersistenceUnitRefType> getEnvironmentEntryType()
- {
- return PersistenceUnitRefType.class;
- }
-
-
-}
Copied: projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java (from rev 109612, projects/jpa/trunk/deployers/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java)
===================================================================
--- projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java (rev 0)
+++ projects/jpa/tags/jboss-jpa-deployers-1.0.2-alpha-2/src/main/java/org/jboss/jpa/deployers/switchboard/PersistenceUnitResourceProvider.java 2010-12-01 07:52:18 UTC (rev 109614)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, 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.switchboard;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.jpa.resolvers.PersistenceUnitDependencyResolver;
+import org.jboss.logging.Logger;
+import org.jboss.switchboard.javaee.environment.PersistenceUnitRefType;
+import org.jboss.switchboard.mc.spi.MCBasedResourceProvider;
+import org.jboss.switchboard.spi.Resource;
+
+/**
+ * {@link MCBasedResourceProvider} for processing PersistenceUnit references in a
+ * Java EE component.
+ *
+ * @see #provide(DeploymentUnit, PersistenceUnitRefType)
+ *
+ * @author Scott Marlow
+ */
+public class PersistenceUnitResourceProvider implements MCBasedResourceProvider<PersistenceUnitRefType>
+{
+ private static final Logger log = Logger.getLogger(PersistenceUnitResourceProvider.class);
+
+ /**
+ * PU resolver
+ */
+ private PersistenceUnitDependencyResolver persistenceUnitDependencyResolver;
+
+ /**
+ *
+ * @param resolver For resolving the PU bean name
+ */
+ public PersistenceUnitResourceProvider(PersistenceUnitDependencyResolver resolver)
+ {
+ this.persistenceUnitDependencyResolver = resolver;
+ }
+
+
+ @Override
+ public Resource provide(DeploymentUnit unit, PersistenceUnitRefType puRef)
+ {
+ // the DU which depends on this persistence-unit-ref
+ DeploymentUnit dependentDU = unit;
+ // the PersistenceUnitDependencyResolver works on non-component deployment units.
+ // So if we are currently processing component DUs (like we do for EJBs), then pass the
+ // component DUs parent during resolution.
+ if (unit.isComponent())
+ {
+ dependentDU = unit.getParent();
+ }
+ // resolve the PU supplier for the persistence-unit-ref
+ log.debug("Resolving PU supplier for: " + puRef.getPersistenceUnitName() + " in unit " + dependentDU);
+ String puSupplier = persistenceUnitDependencyResolver.resolvePersistenceUnitSupplier(dependentDU, puRef.getPersistenceUnitName());
+ log.debug("Resolved PU supplier: " + puSupplier + " for persistence-unit-ref: " + puRef.getName() + " in unit " + dependentDU);
+
+ // create a PU ref resource
+ return new PersistenceUnitRefResource(puSupplier);
+ }
+
+ @Override
+ public Class<PersistenceUnitRefType> getEnvironmentEntryType()
+ {
+ return PersistenceUnitRefType.class;
+ }
+
+}
More information about the jboss-cvs-commits
mailing list