[jboss-cvs] JBossAS SVN: r108152 - in branches/infinispan-int: client and 47 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 15 17:29:33 EDT 2010
Author: pferraro
Date: 2010-09-15 17:29:30 -0400 (Wed, 15 Sep 2010)
New Revision: 108152
Added:
branches/infinispan-int/ejb3/src/main/java/org/jboss/ejb3/deployers/EJB3MetadataOnDemandDeploymentDeployer.java
branches/infinispan-int/ejb3/src/resources/standard/jpa-deployers-jboss-beans.xml
branches/infinispan-int/testsuite/.externalToolBuilders/
branches/infinispan-int/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java
branches/infinispan-int/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java
branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/
branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/
branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml
branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/
branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/
branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainterIntegrationDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ArchiveLoader.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/LibraryDiscoveryService.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ServiceRegistryFactory.java
Removed:
branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/
branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml
branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/
branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainerDependencyDeployer.java
Modified:
branches/infinispan-int/build/build.xml
branches/infinispan-int/client/pom.xml
branches/infinispan-int/component-matrix/pom.xml
branches/infinispan-int/depchain/pom.xml
branches/infinispan-int/ejb3/pom.xml
branches/infinispan-int/ejb3/src/main/java/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java
branches/infinispan-int/ejb3/src/resources/META-INF/ejb3-as-deployers-jboss-beans.xml
branches/infinispan-int/embedded/pom.xml
branches/infinispan-int/profileservice/pom.xml
branches/infinispan-int/resteasy-int/test/cdi-test-2/src/main/java/org/jboss/resteasy/cdi/test/ejb/BeanClassLocalViewEjb.java
branches/infinispan-int/server/src/etc/deployers/scanning-deployers-jboss-beans.xml
branches/infinispan-int/testsuite/
branches/infinispan-int/testsuite/build.xml
branches/infinispan-int/testsuite/imports/sections/aop.xml
branches/infinispan-int/testsuite/imports/sections/cluster.xml
branches/infinispan-int/testsuite/imports/sections/jca.xml
branches/infinispan-int/testsuite/imports/sections/mdb.xml
branches/infinispan-int/testsuite/imports/sections/security.xml
branches/infinispan-int/testsuite/imports/sections/weld.xml
branches/infinispan-int/testsuite/src/main/org/jboss/test/aop/test/ScopedAttachUnitTestCase.java
branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/multicfg/ejb2/test/StatefulPassivationExpirationUnitTestCase.java
branches/infinispan-int/testsuite/src/main/org/jboss/test/jca/test/ScopedRARNoJBossAppUnitTestCase.java
branches/infinispan-int/testsuite/src/main/org/jboss/test/jca/test/ScopedRARUnitTestCase.java
branches/infinispan-int/testsuite/src/main/org/jboss/test/management/test/JSR77SpecUnitTestCase.java
branches/infinispan-int/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
branches/infinispan-int/testsuite/src/main/org/jboss/test/security/test/authorization/ACLIntegrationUnitTestCase.java
branches/infinispan-int/tomcat/pom.xml
branches/infinispan-int/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
branches/infinispan-int/webservices/pom.xml
branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
branches/infinispan-int/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
branches/infinispan-int/weld-int/assembly/src/main/assembly/resources/META-INF/weld-deployers-jboss-beans.xml
branches/infinispan-int/weld-int/deployer-mc-int/pom.xml
branches/infinispan-int/weld-int/deployer/pom.xml
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/DeployersUtils.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldCoreIntegrationDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldFacesIntegrationDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldMcExtensionsIntegrationDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldWebTierIntegrationDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/AbstractBootstrapInfoDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/ArchiveDiscoveryDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/JBossDeploymentDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldBootstrapDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldDiscoveryEnvironment.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/Archive.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ClasspathFactory.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/DeploymentImpl.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/NoDuplicatesClasspath.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/SecurityActions.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/helpers/BootstrapBean.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/jndi/JndiBinderDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/PostJBossAppMetadataDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/PostWebMetadataDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldAwareMetadataDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldClassloadingDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldEjbInterceptorMetadataDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldFilesDeployer.java
branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/injection/WeldInjector.java
branches/infinispan-int/weld-int/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockCoreIntegrationDeployer.java
branches/infinispan-int/weld-int/deployer/src/test/java/org/jboss/test/deployers/test/PostDeployersTestCase.java
branches/infinispan-int/weld-int/ejb/pom.xml
branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossBussinessInterfaceDescriptorAdaptor.java
branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEJBDescriptorAdaptor.java
branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEjbInjectionServices.java
branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEjbServices.java
branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossMessageDrivenBeanDescriptorAdaptor.java
branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossSessionBean31DescriptorAdaptor.java
branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossSessionBeanDescriptorAdaptor.java
branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/util/JBossEjb.java
Log:
merge --depth=infinity -r107943:108151
Modified: branches/infinispan-int/build/build.xml
===================================================================
--- branches/infinispan-int/build/build.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/build/build.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -493,6 +493,13 @@
<include name="ejb3-deployers-jboss-beans.xml"/>
</fileset>
</copy>
+
+ <!-- override jpa-deployers-jboss-beans.xml for generator strategy compliance -->
+ <copy todir="${install.standard.deployers}/ejb3.deployer/META-INF" overwrite="true">
+ <fileset dir="${project.root}/ejb3/src/resources/standard">
+ <include name="jpa-deployers-jboss-beans.xml"/>
+ </fileset>
+ </copy>
</target>
<target name="jboss-all-client" depends="configure"
@@ -728,8 +735,10 @@
</copy>
- <mkdir dir="${install.server}/all/deploy/jboss-ejb3-timerservice-mk2.jar"/>
- <unjar dest="${install.server}/all/deploy/jboss-ejb3-timerservice-mk2.jar">
+
+ <mkdir dir="${install.common.deploy}/jboss-ejb3-timerservice-mk2.jar"/>
+ <!-- Extract to JBOSS_HOME/common/deploy/jboss-ejb3-timerservice-mk2.jar -->
+ <unjar dest="${install.common.deploy}/jboss-ejb3-timerservice-mk2.jar">
<fileset refid="org.jboss.ejb3.timerservice:jboss-ejb3-timerservice-mk2:jar"/>
</unjar>
@@ -2091,7 +2100,6 @@
<fileset refid="org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar"/>
<fileset refid="org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar"/>
<fileset refid="org.jboss.spec.javax.xml.registry:jboss-jaxr-api_1.0_spec:jar"/>
- <fileset refid="org.jboss.spec.javax.xml.soap:jboss-saaj-api_1.3_spec:jar"/>
<fileset refid="org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec:jar"/>
<fileset refid="org.jboss.naming:jnpserver:jar"/>
<fileset refid="org.jboss.jbossts:jbossjts:jar"/>
@@ -2109,6 +2117,9 @@
<fileset refid="org.jboss.ejb3.container:jboss-ejb3-container-spi:jar"/>
<fileset refid="org.jboss.ejb3.context:jboss-ejb3-context-base:jar"/>
<fileset refid="org.jboss.ejb3.context:jboss-ejb3-context-naming:jar"/>
+ <fileset refid="org.jboss.ejb3.ejbref.resolver:ejbref-resolver-spi:jar"/>
+ <fileset refid="org.jboss.ejb3.ejbref.resolver:ejbref-resolver-ejb30-impl:jar"/>
+ <fileset refid="org.jboss.ejb3.ejbref.resolver:ejbref-resolver-ejb31-impl:jar"/>
<fileset refid="org.jboss.ejb3.embedded:jboss-ejb3-embedded-api:jar"/>
<fileset refid="org.jboss.ejb3.embedded:jboss-ejb3-embedded-api-shrinkwrap:jar"/>
<fileset refid="org.jboss.ejb3.embedded:jboss-ejb3-embedded-impl-base:jar"/>
@@ -2386,7 +2397,6 @@
<fileset refid="org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar"/>
<fileset refid="org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar"/>
<fileset refid="org.jboss.spec.javax.xml.registry:jboss-jaxr-api_1.0_spec:jar"/>
- <fileset refid="org.jboss.spec.javax.xml.soap:jboss-saaj-api_1.3_spec:jar"/>
<fileset refid="org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec:jar"/>
<fileset refid="org.jboss.mx:jboss-j2se:jar"/>
<fileset refid="org.jboss.mx:jboss-jmx-annotations:jar"/>
@@ -2504,7 +2514,13 @@
<!-- Unpack the javaee dtds/schemas from jboss-metadata.jar -->
<mkdir dir="${install.dtd}"/>
<mkdir dir="${install.schema}"/>
- <unzip src="${org.jboss.metadata:jboss-metadata:jar}" dest="${install.docs}">
+ <unzip dest="${install.docs}">
+ <fileset refid="org.jboss.metadata:jboss-metadata-client:jar"/>
+ <fileset refid="org.jboss.metadata:jboss-metadata-common:jar"/>
+ <fileset refid="org.jboss.metadata:jboss-metadata-ear:jar"/>
+ <fileset refid="org.jboss.metadata:jboss-metadata-ejb:jar"/>
+ <fileset refid="org.jboss.metadata:jboss-metadata-rar:jar"/>
+ <fileset refid="org.jboss.metadata:jboss-metadata-war:jar"/>
<patternset>
<include name="dtd/*"/>
<include name="schema/*"/>
Modified: branches/infinispan-int/client/pom.xml
===================================================================
--- branches/infinispan-int/client/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/client/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -135,6 +135,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>apache-xerces</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
@@ -187,6 +191,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>sun-jaxws</groupId>
<artifactId>jsr181-api</artifactId>
</exclusion>
@@ -214,6 +222,10 @@
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
</exclusions>
</dependency>
@@ -266,6 +278,10 @@
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
</exclusions>
</dependency>
Modified: branches/infinispan-int/component-matrix/pom.xml
===================================================================
--- branches/infinispan-int/component-matrix/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/component-matrix/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -59,7 +59,7 @@
<version.jboss.jbossws-framework>3.4.0.Beta2</version.jboss.jbossws-framework>
<version.jboss.jbossws-spi>1.4.0.Beta2</version.jboss.jbossws-spi>
<version.jboss.jms-integration-tests>1.0.1.GA</version.jboss.jms-integration-tests>
- <version.jboss.jsf-deployer>1.0.0</version.jboss.jsf-deployer>
+ <version.jboss.jsf-deployer>1.0.2</version.jboss.jsf-deployer>
<version.jboss.osgi.blueprint>1.0.0.Beta2</version.jboss.osgi.blueprint>
<version.jboss.osgi.common>1.0.4</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
@@ -96,7 +96,7 @@
<version.org.jboss.aspects.security>1.0.1</version.org.jboss.aspects.security>
<version.org.jboss.aspects.transaction>1.0.0.GA</version.org.jboss.aspects.transaction>
<version.org.jboss.bootstrap>2.1.0-alpha-5</version.org.jboss.bootstrap>
- <version.org.jboss.cl>2.2.0.Alpha7</version.org.jboss.cl>
+ <version.org.jboss.cl>2.2.0.Alpha8</version.org.jboss.cl>
<version.org.jboss.classpool>1.0.0.Alpha6</version.org.jboss.classpool>
<version.org.jboss.cluster.cache.spi>3.0.0.Alpha6</version.org.jboss.cluster.cache.spi>
<version.org.jboss.cluster.cache.ispn>1.0.0.Alpha13</version.org.jboss.cluster.cache.ispn>
@@ -105,8 +105,8 @@
<version.org.jboss.cluster.server.core>1.0.0.Alpha5</version.org.jboss.cluster.server.core>
<version.org.jboss.cluster.server.ispn>1.0.0.Alpha11</version.org.jboss.cluster.server.ispn>
<version.org.jboss.common.core>2.2.17.GA</version.org.jboss.common.core>
- <version.org.jboss.deployers>2.2.0.Alpha6</version.org.jboss.deployers>
- <version.org.jboss.ejb3.depchain>1.0.0-alpha-3</version.org.jboss.ejb3.depchain>
+ <version.org.jboss.deployers>2.2.0.Alpha7</version.org.jboss.deployers>
+ <version.org.jboss.ejb3.depchain>1.0.0-alpha-5</version.org.jboss.ejb3.depchain>
<!-- This to move into the EJB3 BOM -->
<version.org.jboss.ejb3.embedded>1.0.0-alpha-1</version.org.jboss.ejb3.embedded>
<version.org.jboss.ejb.api>1.0-alpha-1</version.org.jboss.ejb.api>
@@ -133,7 +133,7 @@
<version.org.jboss.metadata.client>2.0.0.Alpha2</version.org.jboss.metadata.client>
<version.org.jboss.metadata.common>2.0.0.Alpha16</version.org.jboss.metadata.common>
<version.org.jboss.metadata.ear>2.0.0.Alpha4</version.org.jboss.metadata.ear>
- <version.org.jboss.metadata.ejb>2.0.0-alpha-17</version.org.jboss.metadata.ejb>
+ <version.org.jboss.metadata.ejb>2.0.0-alpha-18</version.org.jboss.metadata.ejb>
<version.org.jboss.metadata.rar>2.0.0.Alpha</version.org.jboss.metadata.rar>
<version.org.jboss.metadata.war>2.0.0.Alpha15</version.org.jboss.metadata.war>
<version.org.jboss.mod_cluster>1.1.0.CR3</version.org.jboss.mod_cluster>
@@ -147,7 +147,7 @@
<version.org.jboss.remoting>2.5.3</version.org.jboss.remoting>
<version.org.jboss.remoting3>3.1.0.Beta2</version.org.jboss.remoting3>
<version.org.jboss.remoting3.metadata>1.0.0.Beta2</version.org.jboss.remoting3.metadata>
- <version.org.jboss.scanning>1.0.0.Alpha5</version.org.jboss.scanning>
+ <version.org.jboss.scanning>1.0.0.Alpha6</version.org.jboss.scanning>
<version.org.jboss.security>3.0.0.Beta4</version.org.jboss.security>
<version.org.jboss.security.negotiation>2.0.3.SP1</version.org.jboss.security.negotiation>
<version.org.jboss.service.binding>1.1.1.Final</version.org.jboss.service.binding>
@@ -1961,6 +1961,24 @@
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata-war</artifactId>
<version>${version.org.jboss.metadata.war}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jms-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jboss.web</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -3124,6 +3142,10 @@
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
</exclusions>
</dependency>
@@ -3176,6 +3198,10 @@
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>ejb3-persistence</artifactId>
+ </exclusion>
<exclusion>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
@@ -4059,13 +4085,15 @@
<exclude>sun-jaxws:streambuffer</exclude>
<exclude>sun-jaxws:jsr181-api</exclude>
<exclude>sun-jaxws:jaxws-api</exclude>
- <!-- JBAS-7531 org.jboss.ejb3:jboss-ejb3-as-int is retired. -->
- <exclude>org.jboss.ejb3:jboss-ejb3-as-int</exclude>
- <!-- JBAS-8307 Use org.jboss.ejb3.depchain:jboss-ejb3-depchain-as6 -->
- <exclude>org.jboss.ejb3:jboss-ejb3_1</exclude>
- <exclude>org.jboss.microcontainer:jboss-aop-mc-int</exclude>
- <exclude>org.jboss.microcontainer:jboss-dependency</exclude>
- <exclude>org.jboss.microcontainer:jboss-guice-int</exclude>
+ <!-- JBAS-7531 org.jboss.ejb3:jboss-ejb3-as-int is retired. -->
+ <exclude>org.jboss.ejb3:jboss-ejb3-as-int</exclude>
+ <!-- JBAS-8307 Use org.jboss.ejb3.depchain:jboss-ejb3-depchain-as6 -->
+ <exclude>org.jboss.ejb3:jboss-ejb3_1</exclude>
+ <exclude>org.hibernate:ejb3-persistence</exclude>
+ <exclude>org.jboss.metadata:jboss-metadata</exclude>
+ <exclude>org.jboss.microcontainer:jboss-aop-mc-int</exclude>
+ <exclude>org.jboss.microcontainer:jboss-dependency</exclude>
+ <exclude>org.jboss.microcontainer:jboss-guice-int</exclude>
<exclude>org.jboss.microcontainer:jboss-jmx-aop-mc-int</exclude>
<exclude>org.jboss.microcontainer:jboss-jmx-mc-int</exclude>
<exclude>org.jboss.microcontainer:jboss-kernel</exclude>
Modified: branches/infinispan-int/depchain/pom.xml
===================================================================
--- branches/infinispan-int/depchain/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/depchain/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -542,6 +542,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>apache-xerces</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
@@ -729,6 +733,10 @@
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
@@ -771,6 +779,10 @@
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
Modified: branches/infinispan-int/ejb3/pom.xml
===================================================================
--- branches/infinispan-int/ejb3/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/ejb3/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -379,6 +379,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>sun-jaxws</groupId>
<artifactId>jsr181-api</artifactId>
</exclusion>
Modified: branches/infinispan-int/ejb3/src/main/java/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java
===================================================================
--- branches/infinispan-int/ejb3/src/main/java/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/ejb3/src/main/java/org/jboss/as/javaee/SimpleJavaEEModuleInformer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -44,7 +44,17 @@
public String getModulePath(DeploymentUnit unit)
{
- return unit.getRelativePath();
+ // first check if this a JavaEE Application (i.e. if it's a .ear).
+ // If yes, then return the relative path (i.e. module name) of the unit
+ // relative to the .ear
+ DeploymentUnit topLevel = unit.getTopLevel();
+ if(topLevel.isAttachmentPresent(JBossAppMetaData.class))
+ {
+ return unit.getRelativePath();
+ }
+ // if it's not a JavaEE application (i.e. not a .ear), then
+ // return the simple name of the unit
+ return unit.getSimpleName();
}
public ModuleType getModuleType(DeploymentUnit unit)
Copied: branches/infinispan-int/ejb3/src/main/java/org/jboss/ejb3/deployers/EJB3MetadataOnDemandDeploymentDeployer.java (from rev 108151, trunk/ejb3/src/main/java/org/jboss/ejb3/deployers/EJB3MetadataOnDemandDeploymentDeployer.java)
===================================================================
--- branches/infinispan-int/ejb3/src/main/java/org/jboss/ejb3/deployers/EJB3MetadataOnDemandDeploymentDeployer.java (rev 0)
+++ branches/infinispan-int/ejb3/src/main/java/org/jboss/ejb3/deployers/EJB3MetadataOnDemandDeploymentDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,503 @@
+/*
+ * 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.ejb3.deployers;
+
+import java.net.URI;
+import java.util.Collection;
+import java.util.Collections;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb3.common.deployers.spi.AttachmentNames;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.profileservice.profile.metadata.helpers.ProfileMetaDataFactory;
+import org.jboss.profileservice.spi.NoSuchProfileException;
+import org.jboss.profileservice.spi.Profile;
+import org.jboss.profileservice.spi.ProfileKey;
+import org.jboss.profileservice.spi.ProfileService;
+import org.jboss.profileservice.spi.metadata.ProfileMetaData;
+
+/**
+ * Activates a profile on-demand. The presence of a EJB3.x deployment unit in the server
+ * triggers the activation.
+ *
+ * @author Jaikiran Pai
+ * @version $Revision: $
+ */
+// Majority of this implementation is inspired (copied ;) ) from org.jboss.web.tomcat.service.ondemand.OnDemandContextProfileManager
+// Forum thread reference: http://community.jboss.org/thread/155800
+// JIRA: https://jira.jboss.org/browse/JBAS-8380
+public class EJB3MetadataOnDemandDeploymentDeployer extends AbstractDeployer
+{
+ /** Logger */
+ private static final Logger log = Logger.getLogger(EJB3MetadataOnDemandDeploymentDeployer.class);
+
+ /** The default profile name to be used if no explicit profile name is provided for the on-demand profile */
+ private static final String DEFAULT_EJB3_ONDEMAND_PROFILE_NAME = "EJB3_OnDemand_Profile";
+
+ /** The profile service */
+ private ProfileService profileService;
+
+ /** The root of the profile */
+ private URI deploymentRoot;
+
+ /** The deployment names. */
+ private Collection<String> deploymentNames;
+
+ /** Whether this deployer has activated its profile */
+ private boolean activated;
+
+ /** The profile service key domain */
+ private String profileDomain;
+
+ /** The profile service key server */
+ private String profileServer;
+
+ /** The profile service key name */
+ private String profileName;
+
+ /** The profile service key */
+ private ProfileKey profileKey;
+
+ /** By default, we active the profile on-demand */
+ private boolean activateOnDemand = true;
+
+ /**
+ * Instantiate the deployer and setup the {@link DeploymentStages} when
+ * this deployer is expected to run and set the appropriate input for this deployer
+ */
+ public EJB3MetadataOnDemandDeploymentDeployer()
+ {
+ this.setStage(DeploymentStages.POST_CLASSLOADER);
+ this.setInput(JBossMetaData.class);
+ // ordering
+ this.addInput(AttachmentNames.PROCESSED_METADATA);
+ }
+
+ /**
+ * Get the deployment root
+ *
+ * @return the deployment root
+ */
+ public URI getDeploymentRoot()
+ {
+ return deploymentRoot;
+ }
+
+ /**
+ * Set the deployment root.
+ *
+ * @param deploymentRoot the deployment root
+ */
+ public void setDeploymentRoot(URI deploymentRoot)
+ {
+ this.deploymentRoot = deploymentRoot;
+ }
+
+ /**
+ * Get the deployment names.
+ *
+ * @return the deployment names
+ */
+ public Collection<String> getDeploymentNames()
+ {
+ return deploymentNames;
+ }
+
+ /**
+ * Set the deployment names
+ *
+ * @param deploymentNames the deployment names
+ */
+ public void setDeploymentNames(Collection<String> deploymentNames)
+ {
+ this.deploymentNames = deploymentNames;
+ }
+
+ /**
+ * Set a single deployment
+ *
+ * @param name the deployment name
+ */
+ public void setSingleDeployment(String name)
+ {
+ this.deploymentNames = Collections.singleton(name);
+ }
+
+ /**
+ * Gets the value that should be used for the
+ * {@link ProfileKey#getDomain() domain} portion of
+ * the on-demand @{link Profile}'s {@link #getProfileKey() ProfileKey}.
+ *
+ * @return the domain, or null if not set
+ */
+ public String getProfileDomain()
+ {
+ return profileDomain;
+ }
+
+ /**
+ * Sets the value that should be used for the
+ * {@link ProfileKey#getDomain() domain} portion of
+ * the singleton @{link Profile}'s {@link #getProfileKey() ProfileKey}.
+ *
+ * @param profileDomain the domain, or null
+ */
+ public void setProfileDomain(String profileDomain)
+ {
+ this.profileDomain = profileDomain;
+ }
+
+ /**
+ * Gets the value that should be used for the
+ * {@link ProfileKey#getServer() server} portion of
+ * the on-demand @{link Profile}'s {@link #getProfileKey() ProfileKey}.
+ *
+ * @return the server, or null if not set
+ */
+ public String getProfileServer()
+ {
+ return profileServer;
+ }
+
+ /**
+ * Sets the value that should be used for the
+ * {@link ProfileKey#getServer() server} portion of
+ * the on-demand @{link Profile}'s {@link #getProfileKey() ProfileKey}.
+ *
+ * @param profileServer the server, or null
+ */
+ public void setProfileServer(String profileServer)
+ {
+ this.profileServer = profileServer;
+ }
+
+ /**
+ * Gets the value that should be used for the
+ * {@link ProfileKey#getName() name} portion of
+ * the on-demand @{link Profile}'s {@link #getProfileKey() ProfileKey}.
+ *
+ * @return Returns the profile name if it is set. Else returns {@link #DEFAULT_EJB3_ONDEMAND_PROFILE_NAME}
+ */
+ public String getProfileName()
+ {
+ if (profileName == null)
+ {
+ this.profileName = DEFAULT_EJB3_ONDEMAND_PROFILE_NAME;
+ }
+ return profileName;
+ }
+
+ /**
+ * Sets the value that should be used for the
+ * {@link ProfileKey#getName() name} portion of
+ * the singleton @{link Profile}'s {@link #getProfileKey() ProfileKey}.
+ *
+ * @param profileName the name, or null
+ */
+ public void setProfileName(String profileName)
+ {
+ this.profileName = profileName;
+ }
+
+ /**
+ * Gets whether this deployer has activated its profile.
+ *
+ * @return true if {@link #activateProfile()} has successfully
+ * completed and {@link #releaseProfile()} has not been called;
+ * false otherwise.
+ */
+ public boolean isActivated()
+ {
+ return activated;
+ }
+
+ /**
+ * Sets the ProfileService reference.
+ *
+ * @param profileService the profileService. Cannot be null
+ * @throws IllegalArgumentException if profileService is null
+ */
+ public void setProfileService(ProfileService profileService)
+ {
+ if (profileService == null)
+ {
+ throw new IllegalArgumentException("profileService is null");
+ }
+
+ this.profileService = profileService;
+ }
+
+ /**
+ * Gets whether the profile should be activated on during the {@link #start()}
+ * phase of this bean's deployment rather than on first EJB3.x deployment.
+ * This property allows a simple configuration to turn off the "on-demand"
+ * behavior for environments (e.g. production servers) where a more
+ * deterministic startup is appropriate.
+ *
+ * @return false if the profile should be activated as part of
+ * startup of this bean; true if activation should
+ * be deferred until an EJB3.x deployment is available in the server.
+ * Default is true
+ *
+ */
+ public boolean isActivateOnDemand()
+ {
+ return activateOnDemand;
+ }
+
+ /**
+ * Sets whether the profile should be activated on during the {@link #start()}
+ * phase of this bean's deployment rather than on first EJB3.x deployment.
+ * This property allows a simple configuration to turn off the "on-demand"
+ * behavior for environments (e.g. production servers) where a more
+ * deterministic startup is appropriate.
+ *
+ * @param activateOnDemand false if the profile should be
+ * activated as part of startup of this bean;
+ * true if activation should be
+ * deferred until an EJB3.x deployment is available in the server.
+ *
+ */
+ public void setActivateOnDemand(boolean activateOnDemand)
+ {
+ this.activateOnDemand = activateOnDemand;
+ }
+
+ /**
+ * Builds a profile from the {@link #getDeploymentRoot()} and {@link #getDeploymentNames() list}
+ * and registers it under the configured {@link #getProfileKey()}.
+ */
+ public void start() throws Exception
+ {
+ if (profileService == null)
+ {
+ throw new IllegalStateException("Must configure ProfileService");
+ }
+
+ if (deploymentRoot == null)
+ {
+ throw new IllegalStateException("Must configure deployment root");
+ }
+
+ if (deploymentNames == null || deploymentNames.isEmpty())
+ {
+ throw new IllegalStateException("Must configure deployment name(s)");
+ }
+
+ // TODO add dependencies on bootstrap profiles
+ String[] rootSubProfiles = new String[0];
+ // Create a hotdeployment profile
+ // FIXME JBAS-7720 restore hot deploy capability (and make it configurable too)
+ ProfileMetaData profileMetaData = ProfileMetaDataFactory.createFilteredProfileMetaData(getProfileName(),deploymentRoot, this.deploymentNames.toArray(new String[this.deploymentNames.size()]));
+ // register the profile metadata with the profile service
+ this.profileKey = this.profileService.registerProfile(profileMetaData);
+
+ // if on-demand is disabled, then just activate it now
+ if (this.activateOnDemand == false)
+ {
+ // we don't validate as we expect the PS to do it at the end
+ // of startup; need to check if this is correct
+ activateProfile(false);
+ }
+ }
+
+ /**
+ * Unregisters the profile registered in {@link #start()}.
+ */
+ public void stop() throws Exception
+ {
+ ProfileKey profKey = null;
+ try
+ {
+ profKey = getProfileKey();
+ }
+ catch (IllegalStateException e)
+ {
+ return;
+ }
+
+ if (profileService != null && profKey != null)
+ {
+ try
+ {
+ // Inactivate first if needed
+ if (profileService.getActiveProfileKeys().contains(profKey))
+ {
+ releaseProfile();
+ }
+
+ profileService.unregisterProfile(profKey);
+ }
+ catch (NoSuchProfileException e)
+ {
+ log.warn("Could not unregister unknown profile " + profKey);
+ }
+ }
+ }
+
+ /**
+ * Tells the ProfileService to
+ * {@link ProfileService#activateProfile(ProfileKey) activate the on-demand profile}.
+ */
+ public void activateProfile() throws Exception
+ {
+ activateProfile(true);
+ }
+
+ /**
+ * Gets the key for the {@link Profile} that we activate and release.
+ *
+ * @return the key. Will not return null
+ * @throws IllegalStateException if {@link #getProfileName()} returns null
+ * @see #getProfileDomain()
+ * @see #getProfileServer()
+ * @see #getProfileName()
+ */
+ public ProfileKey getProfileKey()
+ {
+ if (this.profileKey == null)
+ {
+ String profileName = getProfileName();
+ if (profileName == null)
+ {
+ throw new IllegalStateException("Must configure profileName or contextName before calling getProfileKey()");
+ }
+ // create the ProfileKey
+ this.profileKey = new ProfileKey(getProfileDomain(), getProfileServer(), profileName);
+ }
+ return this.profileKey;
+ }
+
+ /**
+ * First checks whether the on-demand profile is already activated. If yes, then this method
+ * returns immediately. If the profile hasn't yet been activated, the method then checks
+ * whether the <code>unit</code> is a EJB3.x deployment. If not, the method returns immediately.
+ * <p>
+ * For EJB3.x deployments, this method then activates the on-demand {@link Profile} containing the
+ * on-demand deployments
+ * </p>
+ *
+ * @param unit The {@link DeploymentUnit} currently being deployed
+ * @throws DeploymentException
+ */
+ @Override
+ public void deploy(DeploymentUnit unit) throws DeploymentException
+ {
+ if (this.isActivated())
+ {
+ return;
+ }
+ // get the metadata
+ JBossMetaData metadata = unit.getAttachment(JBossMetaData.class);
+
+ if (metadata.isEJB3x() == false)
+ {
+ return;
+ }
+
+ // activate the on-demand profile
+ try
+ {
+ this.activateProfile(true);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("Could not activate on-demand profile: " + this.getProfileName()
+ + " while deploying unit: " + unit);
+ }
+ }
+
+ /**
+ * Activates the on-demand {@link Profile}
+ *
+ * @param validate If true, then the {@link Profile} is validated after being activated
+ * @throws Exception
+ */
+ private synchronized void activateProfile(boolean validate) throws Exception
+ {
+ if (this.profileService == null)
+ {
+ throw new IllegalStateException("Must configure the ProfileService");
+ }
+
+ ProfileKey profKey = getProfileKey();
+
+ // only activate the profile if it's *not* already activated
+ if (this.profileService.getActiveProfileKeys().contains(profKey) == false)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("Activating on-demand profile: " + profKey);
+ }
+ // activate
+ this.profileService.activateProfile(profKey);
+
+ if (validate)
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("Validating on-demand profile: " + profKey);
+ }
+
+ // Validate if the activation was successful
+ this.profileService.validateProfile(profKey);
+ }
+
+ this.activated = true;
+ }
+ else
+ {
+ if (log.isDebugEnabled())
+ {
+ log.debug("Profile " + profKey + " is already activated");
+ }
+ this.activated = true;
+ }
+
+ }
+
+ /**
+ * Tells the ProfileService to {@link ProfileService#releaseProfile(ProfileKey) release the profile}.
+ *
+ */
+ private synchronized void releaseProfile() throws Exception
+ {
+ if (this.activated)
+ {
+ try
+ {
+ this.profileService.deactivateProfile(getProfileKey());
+ }
+ catch (NoSuchProfileException e)
+ {
+ log.warn("Can't deactivate profile since no Profile is registered under key " + getProfileKey());
+ }
+
+ this.activated = false;
+ }
+ }
+
+}
\ No newline at end of file
Modified: branches/infinispan-int/ejb3/src/resources/META-INF/ejb3-as-deployers-jboss-beans.xml
===================================================================
--- branches/infinispan-int/ejb3/src/resources/META-INF/ejb3-as-deployers-jboss-beans.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/ejb3/src/resources/META-INF/ejb3-as-deployers-jboss-beans.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -272,5 +272,47 @@
<parameter class="java.lang.String">jms-ra.rar</parameter>
</constructor>
</bean>
+
+ <!-- The EJB3MetadataOnDemandDeploymentDeployer activates on-demand profile containing the specified deployments
+
+ -->
+ <bean name="EJB3MetadataOnDemandDeploymentDeployer" class="org.jboss.ejb3.deployers.EJB3MetadataOnDemandDeploymentDeployer">
+
+ <property name="profileService"><inject bean="jboss.profileservice:service=ProfileService"/></property>
+
+ <!-- Build a profile from the contents of this single URI -->
+ <property name="deploymentRoot">${jboss.common.base.url}deploy</property>
+
+ <!-- We just have a single on-demand deployment - the jboss-ejb3-timerservice-mk2.jar
+ Note: If there are multiple deployments which need to be deployed on-demand, then
+ set the "deploymentNames" collection property *instead of* "singleDeployment"
+ property
+ -->
+ <property name="singleDeployment">jboss-ejb3-timerservice-mk2.jar</property>
+
+ <!--
+ Whether activation of the profile (i.e. deployment of the URI contents)
+ should be deferred until the first EJB3.x deployment (true) or done as part of
+ the start of this bean (false).
+
+ WARNING: This configuration option may be altered in a subsequent AS 6.0
+ milestone release.
+
+ FIXME: https://jira.jboss.org/jira/browse/JBAS-7714
+ -->
+ <property name="activateOnDemand">${jboss.as.deployment.ondemand:true}</property>
+ </bean>
+
+ <!-- EJB reference resolver based on the new org.jboss.ejb3.ejbref.resolver SPI -->
+ <bean name="org.jboss.ejb3.ejbref.resolver.EjbReferenceResolver" class="org.jboss.ejb3.ejbref.resolver.ejb31.impl.ScopedEJBReferenceResolver"/>
+
+ <!-- Deprecated. This is here to make sure that any dependents (Weld, WS) of the outdated
+ org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver interface or the org.jboss.ejb3.EjbReferenceResolver
+ MC bean name, don't fail.
+ TODO: Remove this once the dependents move to the new ejbref-resolver SPI -->
+ <bean name="org.jboss.ejb3.EjbReferenceResolver" class="org.jboss.ejb3.core.resolvers.ScopedEJBReferenceResolver"/>
+
+
+
</deployment>
Copied: branches/infinispan-int/ejb3/src/resources/standard/jpa-deployers-jboss-beans.xml (from rev 108151, trunk/ejb3/src/resources/standard/jpa-deployers-jboss-beans.xml)
===================================================================
--- branches/infinispan-int/ejb3/src/resources/standard/jpa-deployers-jboss-beans.xml (rev 0)
+++ branches/infinispan-int/ejb3/src/resources/standard/jpa-deployers-jboss-beans.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ vi:ts=3:sw=3:expandtab
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <!-- Install the default CEMFBuilder, this will build a JPA 1 compliant
+ container entity manager factory. -->
+ <bean name="CEMFBuilder" class="org.jboss.as.jpa.scanner.HackCEMFBuilder"/>
+
+ <bean name="DataSourceDependencyResolver" class="org.jboss.as.jpa.resolvers.JBossASDataSourceDependencyResolver"/>
+
+ <bean name="JavaEEModuleInformer" class="org.jboss.as.javaee.SimpleJavaEEModuleInformer"/>
+
+ <bean name="JBossSearchStrategy" class="org.jboss.jpa.resolvers.strategy.JBossSearchStrategy"/>
+
+ <bean name="SpecCompliantSearchStrategy" class="org.jboss.jpa.resolvers.strategy.SpecCompliantSearchStrategy"/>
+
+ <!--
+ Can be DefaultPersistenceUnitDependencyResolver for spec compliant resolving,
+ InterApplicationPersistenceUnitDependencyResolver for resolving beyond EARs,
+ or DynamicPersistencePersistenceUnitDependencyResolver which allows configuration via JMX.
+ -->
+ <bean name="PersistenceUnitDependencyResolver" class="org.jboss.jpa.resolvers.DynamicPersistenceUnitDependencyResolver"/>
+
+ <bean name="XPCResolver" class="org.jboss.ejb3.stateful.EJB3XPCResolver"/>
+
+ <bean name="PersistenceParsingDeployer" class="org.jboss.jpa.deployers.PersistenceParsingDeployer">
+ <property name="filter">
+ <bean class="org.jboss.deployers.spi.structure.MetaDataTypeFilter">
+ <constructor factoryClass="org.jboss.deployment.MetaDataTypeFilterFactory" factoryMethod="getAll"/>
+ </bean>
+ </property>
+ </bean>
+
+ <bean name="PersistenceDeployer" class="org.jboss.jpa.deployers.PersistenceDeployer"/>
+
+ <bean name="PUHackDeployer" class="org.jboss.deployment.PUHackDeployer">
+ <constructor>
+ <parameter><inject bean="PersistenceUnitDeployer"/></parameter>
+ </constructor>
+ </bean>
+
+ <bean name="PersistenceUnitDeployer" class="org.jboss.jpa.deployers.PersistenceUnitDeployer" autowire-candidate="false">
+ <property name="defaultPersistenceProperties">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry>
+ <key>hibernate.ejb.resource_scanner</key>
+ <value>org.jboss.as.jpa.scanner.HackTLScanner</value>
+ </entry>
+ <entry>
+ <key>hibernate.transaction.manager_lookup_class</key>
+ <value>org.hibernate.transaction.JBossTransactionManagerLookup</value>
+ </entry>
+ <!--entry>
+ <key>hibernate.connection.release_mode</key>
+ <value>after_statement</value>
+ </entry-->
+ <!--entry>
+ <key>hibernate.transaction.flush_before_completion</key>
+ <value>false</value>
+ </entry-->
+ <!--entry>
+ <key>hibernate.transaction.auto_close_session</key>
+ <value>false</value>
+ </entry-->
+ <!--entry>
+ <key>hibernate.query.factory_class</key>
+ <value>org.hibernate.hql.ast.ASTQueryTranslatorFactory</value>
+ </entry-->
+ <!--entry>
+ <key>hibernate.hbm2ddl.auto</key>
+ <value>create-drop</value>
+ </entry-->
+ <entry>
+ <key>hibernate.cache.provider_class</key>
+ <value>org.hibernate.cache.HashtableCacheProvider</value>
+ </entry>
+ <!-- Clustered cache with JBoss Cache -->
+ <!--entry>
+ <key>hibernate.cache.region.factory_class</key>
+ <value>org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory</value>
+ </entry>
+ <entry>
+ <key>hibernate.cache.region.jbc2.cachefactory</key>
+ <value>java:CacheManager</value>
+ </entry>
+ <entry>
+ <key>hibernate.cache.region.jbc2.cfg.entity</key>
+ <value>pessimistic-entity</value>
+ </entry>
+ <entry>
+ <key>hibernate.cache.region.jbc2.cfg.query</key>
+ <value>local-query</value>
+ </entry-->
+ <!--entry>
+ <key>hibernate.dialect</key>
+ <value>org.hibernate.dialect.HSQLDialect</value>
+ </entry-->
+ <entry>
+ <key>hibernate.jndi.java.naming.factory.initial</key>
+ <value>org.jnp.interfaces.NamingContextFactory</value>
+ </entry>
+ <entry>
+ <key>hibernate.jndi.java.naming.factory.url.pkgs</key>
+ <value>org.jboss.naming:org.jnp.interfaces</value>
+ </entry>
+ <entry>
+ <key>hibernate.bytecode.use_reflection_optimizer</key>
+ <value>false</value>
+ </entry>
+ <!-- I don't think this is honored, but EJB3Deployer uses it -->
+ <entry>
+ <key>hibernate.bytecode.provider</key>
+ <value>javassist</value>
+ </entry>
+ <!-- Setting to indicate whether or not to use the new IdentifierGenerator
+ implementations which are used for AUTO, TABLE and SEQUENCE. The new generators
+ are more efficient and relevant to the JPA 2 specification semantic. -->
+ <entry>
+ <key>hibernate.id.new_generator_mappings</key>
+ <value>true</value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+</deployment>
Modified: branches/infinispan-int/embedded/pom.xml
===================================================================
--- branches/infinispan-int/embedded/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/embedded/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -97,6 +97,12 @@
<version>${version.org.jboss.jbossas}</version>
<scope>test</scope>
<type>pom</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss.jbossas.osgi</groupId>
+ <artifactId>jboss-as-osgi-distribution</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- $JBOSS_HOME fully built, but not yet installed -->
<dependency>
Modified: branches/infinispan-int/profileservice/pom.xml
===================================================================
--- branches/infinispan-int/profileservice/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/profileservice/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -259,6 +259,10 @@
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
Modified: branches/infinispan-int/resteasy-int/test/cdi-test-2/src/main/java/org/jboss/resteasy/cdi/test/ejb/BeanClassLocalViewEjb.java
===================================================================
--- branches/infinispan-int/resteasy-int/test/cdi-test-2/src/main/java/org/jboss/resteasy/cdi/test/ejb/BeanClassLocalViewEjb.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/resteasy-int/test/cdi-test-2/src/main/java/org/jboss/resteasy/cdi/test/ejb/BeanClassLocalViewEjb.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -2,6 +2,7 @@
import javax.ejb.EJB;
import javax.ejb.Stateless;
+import javax.enterprise.context.Dependent;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@@ -14,6 +15,7 @@
import org.jboss.resteasy.cdi.test.Subresource;
@Stateless
+ at Dependent
@Path("/beanClassLocalViewEjb")
@Produces("text/plain")
public class BeanClassLocalViewEjb
Modified: branches/infinispan-int/server/src/etc/deployers/scanning-deployers-jboss-beans.xml
===================================================================
--- branches/infinispan-int/server/src/etc/deployers/scanning-deployers-jboss-beans.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/server/src/etc/deployers/scanning-deployers-jboss-beans.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -143,6 +143,7 @@
<property name="patterns">
<set>
<value>**/*.hbm.xml</value>
+ <value>META-INF/orm.xml</value>
</set>
</property>
</bean>
Property changes on: branches/infinispan-int/testsuite
___________________________________________________________________
Name: svn:ignore
- .git
.metadata
target
bin
*.ipr
*.iws
*.iml
.idea
*.patch
.settings
.classpath
.project
output
junit*.properties
build.log
failed.txt
transaction.log
run.tstamp
+ .git
.metadata
target
bin
*.ipr
*.iws
*.iml
.idea
*.patch
.settings
.classpath
.project
output
junit*.properties
build.log
failed.txt
transaction.log
run.tstamp
manifest_test
Copied: branches/infinispan-int/testsuite/.externalToolBuilders (from rev 108151, trunk/testsuite/.externalToolBuilders)
Modified: branches/infinispan-int/testsuite/build.xml
===================================================================
--- branches/infinispan-int/testsuite/build.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/build.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -1188,6 +1188,8 @@
<!-- Pending completion of JBAS-5878 / JBPAPP-3674 -->
<exclude name="org/jboss/test/web/test/StatusServletTestCase.class"/>
+ <!-- JBAS-8239 -->
+ <exclude name="org/jboss/test/deadlock/test/BeanStressTestCase.class"/>
</patternset>
<patternset id="aop-with-classloader.excludes">
Modified: branches/infinispan-int/testsuite/imports/sections/aop.xml
===================================================================
--- branches/infinispan-int/testsuite/imports/sections/aop.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/imports/sections/aop.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -582,7 +582,7 @@
<include name="META-INF/jboss-aop.xml"/>
</fileset>
</jar>
- <jar destfile="${build.lib}/aop-scopedattachtest1.sar">
+ <jar destfile="${build.lib}/aop-scopedattachtest01.sar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/aop/scopedattach/ScopedTester*.class"/>
<include name="org/jboss/test/aop/scopedattach/POJO.class"/>
@@ -604,7 +604,7 @@
<include name="META-INF/jboss-aop.xml"/>
</fileset>
</jar>
- <jar destfile="${build.lib}/aop-scopedattachtest2.sar">
+ <jar destfile="${build.lib}/aop-scopedattachtest02.sar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/aop/scopedattach/ScopedTester*.class"/>
<include name="org/jboss/test/aop/scopedattach/POJO.class"/>
Modified: branches/infinispan-int/testsuite/imports/sections/cluster.xml
===================================================================
--- branches/infinispan-int/testsuite/imports/sections/cluster.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/imports/sections/cluster.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -766,7 +766,7 @@
</jar>
<!-- build sfsb-passexp.jar -->
- <jar destfile="${build.lib}/sfsb-passexp.jar">
+ <jar destfile="${build.lib}/sfsb-passexp1.jar">
<fileset dir="${build.classes}">
<patternset refid="jboss.test.util.ejb.set"/>
<include name="org/jboss/test/testbean/interfaces/**"/>
Modified: branches/infinispan-int/testsuite/imports/sections/jca.xml
===================================================================
--- branches/infinispan-int/testsuite/imports/sections/jca.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/imports/sections/jca.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -284,7 +284,7 @@
<include name="*.xml"/>
</metainf>
</jar>
- <jar destfile="${build.lib}/testscopedrar.jar">
+ <jar destfile="${build.lib}/testscopedrar1.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/jca/mbean/Scoped*"/>
@@ -304,7 +304,7 @@
<include name="*.xml"/>
</metainf>
</jar>
- <jar destfile="${build.lib}/testscopedrar-nojbossapp.jar">
+ <jar destfile="${build.lib}/testscopedrar-nojbossapp1.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/jca/mbean/Scoped*"/>
Modified: branches/infinispan-int/testsuite/imports/sections/mdb.xml
===================================================================
--- branches/infinispan-int/testsuite/imports/sections/mdb.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/imports/sections/mdb.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -43,7 +43,7 @@
</jar>
<!-- build testmessagedriven.jar -->
- <jar destfile="${build.lib}/testmessagedriven.jar">
+ <jar destfile="${build.lib}/testmessagedriven2.jar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/messagedriven/beans/**"/>
</fileset>
@@ -53,7 +53,7 @@
</jar>
<!-- build testmessagedriven.sar -->
- <jar destfile="${build.lib}/testmessagedriven.sar">
+ <jar destfile="${build.lib}/testmessagedriven1.sar">
<fileset dir="${build.classes}">
<include name="org/jboss/test/messagedriven/mbeans/**"/>
</fileset>
Modified: branches/infinispan-int/testsuite/imports/sections/security.xml
===================================================================
--- branches/infinispan-int/testsuite/imports/sections/security.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/imports/sections/security.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -454,8 +454,8 @@
</zipfileset>
</ear>
- <!-- acl-integration.jar -->
- <jar destfile="${build.lib}/acl-integration.jar">
+ <!-- acl-integration1.jar -->
+ <jar destfile="${build.lib}/acl-integration1.jar">
<metainf dir="${build.resources}/security/authorization/acl-ejb/META-INF">
<include name="jboss-acl-policy.xml" />
</metainf>
Modified: branches/infinispan-int/testsuite/imports/sections/weld.xml
===================================================================
--- branches/infinispan-int/testsuite/imports/sections/weld.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/imports/sections/weld.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -36,7 +36,65 @@
</fileset>
</jar>
</target>
+
+ <!-- translator example with a plain, non-weld, ejb jar -->
+ <target name="plainEjbTranslator" depends="compile">
+ <mkdir dir="${build.lib}" />
+
+ <jar destfile="${build.lib}/weld-translator-without-beans.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/test/deployers/weld/translator/ejb/**"/>
+ </fileset>
+ </jar>
+
+ <jar destfile="${build.lib}/weld-translatorplainejb.ear">
+ <fileset dir="${build.lib}">
+ <include name="weld-translator-without-beans.jar"/>
+ <include name="weld-translator.war"/>
+ </fileset>
+ <fileset dir="${source.resources}/deployers/weld/plainEjbTranslator">
+ <include name="META-INF/application.xml"/>
+ </fileset>
+ </jar>
+ </target>
+ <target name="translatorWithManifestClasspath" depends="compile">
+ <mkdir dir="${build.lib}" />
+
+ <jar destfile="${build.lib}/weld-translator-manifestclasspath.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/test/deployers/weld/translator/ejb/**"/>
+ <exclude name="org/jboss/test/deployers/weld/translator/ejb/SentenceParser.class"/>
+ </fileset>
+ <fileset dir="${source.resources}/deployers/weld/translator/ejb">
+ <include name="META-INF/beans.xml"/>
+ </fileset>
+ <manifest>
+ <attribute name="Class-Path" value="../weld-translator-lib.jar"/>
+ </manifest>
+ </jar>
+
+ <jar destfile="${build.lib}/weld-translator-lib.jar">
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/test/deployers/weld/translator/ejb/SentenceParser.class"/>
+ </fileset>
+ <fileset dir="${source.resources}/deployers/weld/translator/ejb">
+ <include name="META-INF/beans.xml"/>
+ </fileset>
+ </jar>
+
+ <jar destfile="${build.lib}/weld-translatormanifestcp.ear">
+ <fileset dir="${build.lib}">
+ <include name="weld-translator-manifestclasspath.jar"/>
+ <include name="weld-translator-lib.jar"/>
+ <include name="weld-translator.war"/>
+ </fileset>
+ <fileset dir="${source.resources}/deployers/weld/translatorWithManifestClasspath">
+ <include name="META-INF/application.xml"/>
+ </fileset>
+ </jar>
+ </target>
+
<target name="numberguess" depends="compile">
<mkdir dir="${build.lib}" />
@@ -58,7 +116,7 @@
</target>
- <target name="_jars-weld" depends="numberguess, translator">
+ <target name="_jars-weld" depends="numberguess, translator, plainEjbTranslator,translatorWithManifestClasspath">
<mkdir dir="${build.lib}" />
</target>
Modified: branches/infinispan-int/testsuite/src/main/org/jboss/test/aop/test/ScopedAttachUnitTestCase.java
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/aop/test/ScopedAttachUnitTestCase.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/aop/test/ScopedAttachUnitTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -143,9 +143,9 @@
TestSuite suite = new TestSuite();
suite.addTest(new TestSuite(ScopedAttachUnitTestCase.class));
- setup = new AOPClassLoaderHookTestSetup(suite, "aop-scopedattachtest1.sar,aop-scopedattachtest2.sar");
+ setup = new AOPClassLoaderHookTestSetup(suite, "aop-scopedattachtest01.sar,aop-scopedattachtest02.sar");
//Since this test relies on some of the aspects from base-aspects.xml, deploy those for this test
setup.setUseBaseXml(true);
return setup;
}
-}
\ No newline at end of file
+}
Modified: branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/multicfg/ejb2/test/StatefulPassivationExpirationUnitTestCase.java
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/multicfg/ejb2/test/StatefulPassivationExpirationUnitTestCase.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/multicfg/ejb2/test/StatefulPassivationExpirationUnitTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -67,7 +67,7 @@
public static Test suite() throws Exception
{
return JBossClusteredTestCase.getDeploySetup(StatefulPassivationExpirationUnitTestCase.class,
- "sfsb-passexp.sar, sfsb-passexp.jar");
+ "sfsb-passexp.sar, sfsb-passexp1.jar");
}
/**
Copied: branches/infinispan-int/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java (from rev 108151, trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java)
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java (rev 0)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorManifestCPExampleUnitTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.deployers.weld.test;
+
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+
+/**
+ * Same as WeldTranslatorExampleUnitTestCase, with the difference that this
+ * test deploys an ear whose ejb jar lacks the class SentenceParser. This class
+ * is located in the weld-translator-lib.jar, referenced in the classpath entry
+ * of the ejb-jar manifest file. The weld-translator-lib.jar contains
+ * the META-INF/beans.xml file and should be also scanned by the Weld deployers.
+ *
+ * @author <a href="mailto:flavia.rainone at jboss.com">Flavia Rainone</a>
+ *
+ */
+public class WeldTranslatorManifestCPExampleUnitTestCase extends WeldExampleTest
+{
+ public WeldTranslatorManifestCPExampleUnitTestCase(String test)
+ {
+ super(test);
+ setTestExpected(true);
+ }
+
+ @Override
+ protected URL getBaseURL() throws Exception {
+ return new URL(getBaseURLString() + getWebContextName() + "/home.jsf");
+ }
+
+ @Override
+ protected Set<String> getExpectedDeployments(String topLevelDeployment, String exampleName)
+ {
+ final Set<String> expected = new HashSet<String>();
+ expected.add(topLevelDeployment);
+ expected.add(String.format(exampleJar, "translator-manifestclasspath"));
+ expected.add(String.format(exampleWar, "translator"));
+ return expected;
+ }
+
+ public static Test suite() throws Exception
+ {
+ return deploy(WeldTranslatorManifestCPExampleUnitTestCase.class, false);
+ }
+}
+
Copied: branches/infinispan-int/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java (from rev 108151, trunk/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java)
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java (rev 0)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/deployers/weld/test/WeldTranslatorPlainEjbExampleUnitTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, 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.test.deployers.weld.test;
+
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+
+/**
+ * Same as WeldTranslatorExampleUnitTestCase, with the difference that this
+ * test deploys an ear whose ejb jar file is a non-weld archive
+ * (i.e, it lacks the META-INF/beans.xml).
+ * This example asserts that Deployment.loadBeanDeploymentArchive works
+ * correctly in such scenario.
+ *
+ *
+ * @author <a href="mailto:flavia.rainone at jboss.com">Flavia Rainone</a>
+ *
+ */
+public class WeldTranslatorPlainEjbExampleUnitTestCase extends WeldExampleTest
+{
+ public WeldTranslatorPlainEjbExampleUnitTestCase(String test)
+ {
+ super(test);
+ setTestExpected(true);
+ }
+
+ @Override
+ protected URL getBaseURL() throws Exception {
+ return new URL(getBaseURLString() + getWebContextName() + "/home.jsf");
+ }
+
+ @Override
+ protected Set<String> getExpectedDeployments(String topLevelDeployment, String exampleName)
+ {
+ final Set<String> expected = new HashSet<String>();
+ expected.add(topLevelDeployment);
+ expected.add(String.format(exampleJar, "translator-without-beans"));
+ expected.add(String.format(exampleWar, "translator"));
+ return expected;
+ }
+
+ public static Test suite() throws Exception
+ {
+ return deploy(WeldTranslatorPlainEjbExampleUnitTestCase.class, false);
+ }
+}
+
Modified: branches/infinispan-int/testsuite/src/main/org/jboss/test/jca/test/ScopedRARNoJBossAppUnitTestCase.java
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/jca/test/ScopedRARNoJBossAppUnitTestCase.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/jca/test/ScopedRARNoJBossAppUnitTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -46,7 +46,7 @@
deploy("testscopedrar-nojbossapp.ear");
try
{
- deploy("testscopedrar-nojbossapp.jar");
+ deploy("testscopedrar-nojbossapp1.jar");
try
{
ObjectName name = new ObjectName("jboss.test:test=Scoped");
@@ -55,7 +55,7 @@
}
finally
{
- undeploy("testscopedrar-nojbossapp.jar");
+ undeploy("testscopedrar-nojbossapp1.jar");
}
}
finally
Modified: branches/infinispan-int/testsuite/src/main/org/jboss/test/jca/test/ScopedRARUnitTestCase.java
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/jca/test/ScopedRARUnitTestCase.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/jca/test/ScopedRARUnitTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -45,7 +45,7 @@
deploy("testscopedrar.ear");
try
{
- deploy("testscopedrar.jar");
+ deploy("testscopedrar1.jar");
try
{
ObjectName name = new ObjectName("jboss.test:test=Scoped");
@@ -54,7 +54,7 @@
}
finally
{
- undeploy("testscopedrar.jar");
+ undeploy("testscopedrar1.jar");
}
}
finally
Modified: branches/infinispan-int/testsuite/src/main/org/jboss/test/management/test/JSR77SpecUnitTestCase.java
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/management/test/JSR77SpecUnitTestCase.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/management/test/JSR77SpecUnitTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -248,9 +248,11 @@
jsr77MEJB.remove();
}
- /** Test JMSResource availability.
+ /* Test JMSResource availability.
* @throws Exception
- */
+ *
+ * JBAS-8238 - exclude
+
public void testJMSResource() throws Exception
{
getLog().debug("+++ testJMSResource");
@@ -267,7 +269,7 @@
while (iter.hasNext())
getLog().debug("JMSResource: " + iter.next());
jsr77MEJB.remove();
- }
+ } */
// NYI - see JBAS-5545
//
Modified: branches/infinispan-int/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/messagedriven/support/BasicMessageDrivenUnitTest.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -96,8 +96,8 @@
protected Thread thread;
protected boolean running = false;
- protected String mdbjar = "testmessagedriven.jar";
- protected String mbeansar = "testmessagedriven.sar";
+ protected String mdbjar = "testmessagedriven2.jar";
+ protected String mbeansar = "testmessagedriven1.sar";
protected ObjectName jmxDestination = ObjectNameFactory.create("does:not=exist");
protected String connectionFactoryJNDI = "ConnectionFactory";
Modified: branches/infinispan-int/testsuite/src/main/org/jboss/test/security/test/authorization/ACLIntegrationUnitTestCase.java
===================================================================
--- branches/infinispan-int/testsuite/src/main/org/jboss/test/security/test/authorization/ACLIntegrationUnitTestCase.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/main/org/jboss/test/security/test/authorization/ACLIntegrationUnitTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -167,7 +167,7 @@
// deploy the web application that calls the ACL module.
deploy("acl-integration.war");
// deploy the ejb application that calls the ACL module.
- deploy("acl-integration.jar");
+ deploy("acl-integration1.jar");
}
/*
@@ -179,7 +179,7 @@
protected void tearDown() throws Exception
{
// undeploy the test ejb application.
- undeploy("acl-integration.jar");
+ undeploy("acl-integration1.jar");
// undeploy the test web application.
undeploy("acl-integration.war");
// undeploy the application policy.
Copied: branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator (from rev 108151, trunk/testsuite/src/resources/deployers/weld/plainEjbTranslator)
Copied: branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF (from rev 108151, trunk/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF)
Deleted: branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-
-<application xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
- version="5">
-
- <display-name>weld-translatorplainejb-ear</display-name>
- <module>
- <web>
- <web-uri>weld-translator.war</web-uri>
- <context-root>/weld-translatorplainejb</context-root>
- </web>
- </module>
- <module>
- <ejb>weld-translator-without-beans.jar</ejb>
- </module>
-</application>
Copied: branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml (from rev 108151, trunk/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml)
===================================================================
--- branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml (rev 0)
+++ branches/infinispan-int/testsuite/src/resources/deployers/weld/plainEjbTranslator/META-INF/application.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+
+<application xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
+
+ <display-name>weld-translatorplainejb-ear</display-name>
+ <module>
+ <web>
+ <web-uri>weld-translator.war</web-uri>
+ <context-root>/weld-translatorplainejb</context-root>
+ </web>
+ </module>
+ <module>
+ <ejb>weld-translator-without-beans.jar</ejb>
+ </module>
+</application>
Copied: branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath (from rev 108151, trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath)
Copied: branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF (from rev 108151, trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF)
Deleted: branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml
===================================================================
--- trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -1,18 +0,0 @@
-<?xml version="1.0"?>
-
-<application xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
- version="5">
-
- <display-name>weld-translatormanifestcp-ear</display-name>
- <module>
- <web>
- <web-uri>weld-translator.war</web-uri>
- <context-root>/weld-translatormanifestcp</context-root>
- </web>
- </module>
- <module>
- <ejb>weld-translator-manifestclasspath.jar</ejb>
- </module>
-</application>
Copied: branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml (from rev 108151, trunk/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml)
===================================================================
--- branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml (rev 0)
+++ branches/infinispan-int/testsuite/src/resources/deployers/weld/translatorWithManifestClasspath/META-INF/application.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+
+<application xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
+ version="5">
+
+ <display-name>weld-translatormanifestcp-ear</display-name>
+ <module>
+ <web>
+ <web-uri>weld-translator.war</web-uri>
+ <context-root>/weld-translatormanifestcp</context-root>
+ </web>
+ </module>
+ <module>
+ <ejb>weld-translator-manifestclasspath.jar</ejb>
+ </module>
+</application>
Modified: branches/infinispan-int/tomcat/pom.xml
===================================================================
--- branches/infinispan-int/tomcat/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/tomcat/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -349,6 +349,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>sun-jaxws</groupId>
<artifactId>jsr181-api</artifactId>
</exclusion>
Modified: branches/infinispan-int/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java
===================================================================
--- branches/infinispan-int/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/tomcat/src/main/java/org/jboss/web/tomcat/service/deployers/TomcatDeployment.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -36,6 +36,7 @@
import org.jboss.metadata.web.spec.TldMetaData;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.naming.NonSerializableFactory;
+import org.jboss.reloaded.naming.CurrentComponent;
import org.jboss.reloaded.naming.deployers.javaee.JavaEEComponentInformer;
import org.jboss.reloaded.naming.spi.JavaEEComponent;
import org.jboss.reloaded.naming.spi.JavaEEModule;
@@ -295,6 +296,8 @@
JBossContextConfig.deploymentUnitLocal.set(unit);
try
{
+ // JBAS-8406: Temp hack, will move to NamingListener
+ CurrentComponent.push(component);
// Start it
context.start();
// Build the ENC
@@ -314,6 +317,8 @@
JBossContextConfig.kernelLocal.set(null);
JBossContextConfig.deploymentUnitLocal.set(null);
+ // JBAS-8406: Temp hack, will move to NamingListener
+ CurrentComponent.pop();
}
if (context.getState() != 1)
{
@@ -539,8 +544,17 @@
if (server.isRegistered(objectName))
{
- // Contexts should be stopped by the host already
- server.invoke(objectName, "destroy", new Object[] {}, new String[] {});
+ try
+ {
+ // JBAS-8406: Temp hack, will move to NamingListener
+ CurrentComponent.push(component);
+ // Contexts should be stopped by the host already
+ server.invoke(objectName, "destroy", new Object[] {}, new String[] {});
+ }
+ finally
+ {
+ CurrentComponent.pop();
+ }
}
}
Modified: branches/infinispan-int/webservices/pom.xml
===================================================================
--- branches/infinispan-int/webservices/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/webservices/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -165,6 +165,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>sun-jaxws</groupId>
<artifactId>jsr181-api</artifactId>
</exclusion>
@@ -296,6 +300,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>apache-xerces</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
Modified: branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
--- branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -27,8 +27,8 @@
import javax.ejb.EJB;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.common.resolvers.spi.EjbReference;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReference;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.wsf.common.injection.resolvers.AbstractReferenceResolver;
/**
Modified: branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -33,7 +33,7 @@
import javax.ejb.EJB;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
import org.jboss.metadata.javaee.spec.EnvironmentEntriesMetaData;
@@ -45,6 +45,7 @@
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.deployment.Service;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
import org.jboss.wsf.spi.metadata.injection.InjectionMetaData;
@@ -131,20 +132,20 @@
this.log.debug("Building injection meta data for JAXWS EJB3 webservice deployment: " + dep.getSimpleName());
final WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(unit,
WebServiceDeployment.class);
+ final Service service = dep.getService();
// iterate through all EJB3 endpoints
for (final WebServiceDeclaration container : webServiceDeployment.getServiceEndpoints())
{
- if (ASHelper.isWebServiceBean(container))
+ final String ejbName = container.getComponentName();
+ final Endpoint endpoint = service.getEndpointByName(ejbName);
+ if (endpoint != null && ASHelper.isWebServiceBean(container))
{
- final String ejbName = container.getComponentName();
-
// build EJB 3 injections meta data
final EnvironmentEntriesMetaData ejbEnvEntries = this.getEnvironmentEntries(ejbName, unit);
final InjectionsMetaData injectionsMD = this.buildInjectionsMetaData(ejbEnvEntries, resolvers);
// associate injections meta data with EJB 3 endpoint
- final Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
}
}
Modified: branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java
===================================================================
--- branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/webservices/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreator.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -32,6 +32,7 @@
import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
import org.jboss.metadata.web.spec.ServletMappingMetaData;
import org.jboss.metadata.web.spec.WebResourceCollectionsMetaData;
+import org.jboss.webservices.integration.util.ASHelper;
import org.jboss.webservices.integration.util.WebMetaDataHelper;
import org.jboss.wsf.common.integration.WSHelper;
import org.jboss.wsf.spi.deployment.Deployment;
@@ -74,7 +75,11 @@
void create(final Deployment dep)
{
final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
- final JBossWebMetaData jbossWebMD = new JBossWebMetaData();
+ JBossWebMetaData jbossWebMD = ASHelper.getOptionalAttachment(unit, JBossWebMetaData.class);
+ if (jbossWebMD == null)
+ {
+ jbossWebMD = new JBossWebMetaData();
+ }
this.createWebAppDescriptor(dep, jbossWebMD);
this.createJBossWebAppDescriptor(dep, jbossWebMD);
Modified: branches/infinispan-int/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- branches/infinispan-int/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -72,7 +72,7 @@
<bean name="WSInjectionMetaDataDeploymentAspect" class="org.jboss.webservices.integration.injection.InjectionMetaDataDeploymentAspect">
<property name="requires">WebMetaData</property>
<property name="provides">InjectionMetaData</property>
- <property name="ejbReferenceResolver"><inject bean="org.jboss.ejb3.EjbReferenceResolver"/></property>
+ <property name="ejbReferenceResolver"><inject bean="org.jboss.ejb3.ejbref.resolver.EjbReferenceResolver"/></property>
</bean>
<!-- TODO: remove this hacky aspect -->
@@ -111,7 +111,7 @@
</bean>
<bean name="WSEndpointRegistryDeploymentAspect" class="org.jboss.wsf.framework.deployment.EndpointRegistryDeploymentAspect">
- <property name="requires">EndpointName</property>
+ <property name="requires">EndpointName, EndpointAddress</property>
<property name="provides">RegisteredEndpoint</property>
</bean>
@@ -126,7 +126,7 @@
</bean>
<bean name="WSWebMetaDataCreatingDeploymentAspect" class="org.jboss.webservices.integration.tomcat.WebMetaDataCreatingDeploymentAspect">
- <property name="requires">VirtualHosts,URLPattern</property>
+ <property name="requires">VirtualHosts,URLPattern,EndpointAddress</property>
<property name="provides">WebMetaData</property>
</bean>
Modified: branches/infinispan-int/weld-int/assembly/src/main/assembly/resources/META-INF/weld-deployers-jboss-beans.xml
===================================================================
--- branches/infinispan-int/weld-int/assembly/src/main/assembly/resources/META-INF/weld-deployers-jboss-beans.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/assembly/src/main/assembly/resources/META-INF/weld-deployers-jboss-beans.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -11,13 +11,14 @@
<bean name="WeldFilesDeployer" class="org.jboss.weld.integration.deployer.metadata.WeldFilesDeployer"/>
<!-- Responsible for discovering Weld classes -->
- <bean name="WeldDiscoveryDeployer" class="org.jboss.weld.integration.deployer.env.WeldDiscoveryDeployer"/>
+ <bean name="ArchiveInfoDeployer" class="org.jboss.weld.integration.deployer.env.ArchiveInfoDeployer"/>
+ <bean name="ArchiveDiscoveryDeployer" class="org.jboss.weld.integration.deployer.env.ArchiveDiscoveryDeployer"/>
<!-- Responsible for discovering Weld classes -->
<bean name="EjbServicesDeployer" class="org.jboss.weld.integration.deployer.env.EjbServicesDeployer"/>
<!-- Responsible for discovering Weld classes -->
- <bean name="FlatDeploymentDeployer" class="org.jboss.weld.integration.deployer.env.FlatDeploymentDeployer"/>
+ <bean name="DeploymentDeployer" class="org.jboss.weld.integration.deployer.env.JBossDeploymentDeployer"/>
<!-- Responsible for dynamic ejb dependency creation -->
<bean name="DynamicDependencyCreator" class="org.jboss.weld.integration.deployer.env.DynamicDependencyCreator">
@@ -53,7 +54,7 @@
<bean name="PostWebMetadataDeployer" class="org.jboss.weld.integration.deployer.metadata.PostWebMetadataDeployer"/>
<!-- Responsible for making sure that the CDI container is started before the web application(s)-->
- <bean name="WebContainerDependencyDeployer" class="org.jboss.weld.integration.deployer.env.WebContainerDependencyDeployer"/>
+ <bean name="WebContainerDependencyDeployer" class="org.jboss.weld.integration.deployer.env.WebContainterIntegrationDeployer"/>
<!-- Responsible for adding the Weld Manager object factory to JNDI -->
<!--<bean name="WeldJndiBinder" class="org.jboss.weld.integration.deployer.env.WeldJndiBinder">-->
@@ -66,9 +67,7 @@
<!-- For non-flat deployments, comment this definition and uncomment the next one -->
- <bean name="BeanDeploymentArchiveLocator" class="org.jboss.weld.integration.deployer.jndi.FlatBeanDeploymentArchiveLocator"/>
-
- <!--<bean name="BeanDeploymentArchiveLocator" class="org.jboss.weld.integration.deployer.jndi.JBossBeanDeploymentArchiveLocator"/>-->
+ <bean name="BeanDeploymentArchiveLocator" class="org.jboss.weld.integration.deployer.jndi.JBossBeanDeploymentArchiveLocator"/>
<!-- Responsible for binding bean managers -->
Modified: branches/infinispan-int/weld-int/deployer/pom.xml
===================================================================
--- branches/infinispan-int/weld-int/deployer/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -51,6 +51,11 @@
</dependency>
<dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>weld-int-ejb</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
<scope>provided</scope>
@@ -120,6 +125,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>sun-jaxws</groupId>
<artifactId>jsr181-api</artifactId>
</exclusion>
@@ -344,6 +353,11 @@
</dependency>
<dependency>
+ <groupId>org.jboss.bootstrap</groupId>
+ <artifactId>jboss-bootstrap-api-as</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
@@ -387,6 +401,10 @@
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-dependency</artifactId>
</exclusion>
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/DeployersUtils.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/DeployersUtils.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/DeployersUtils.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -117,7 +117,7 @@
* @param unit the deployment unit
* @return true if beans.xml files exist, false otherwise
*/
- public static boolean checkForWeldFiles(DeploymentUnit unit)
+ public static boolean checkForWeldFilesInUnitAndChildren(DeploymentUnit unit)
{
if (unit == null)
throw new IllegalArgumentException("Null deployment unit");
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldCoreIntegrationDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldCoreIntegrationDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldCoreIntegrationDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -23,7 +23,7 @@
@Override // we override this, as we want any beans.xml
protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
{
- return DeployersUtils.checkForWeldFiles(unit);
+ return DeployersUtils.checkForWeldFilesInUnitAndChildren(unit);
}
@Override
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldFacesIntegrationDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldFacesIntegrationDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldFacesIntegrationDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -14,7 +14,7 @@
public class WeldFacesIntegrationDeployer extends WeldUrlIntegrationDeployer<JBossWebMetaData>
{
public WeldFacesIntegrationDeployer()
- {
+ {
super(JBossWebMetaData.class);
// We do this at top level to ensure that any deployment (ear or war)
// that supports WB gets this integration (even if that particular war doesn't have beans.xml)
@@ -26,7 +26,7 @@
@Override // we override this, as we want any beans.xml
protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
{
- return DeployersUtils.checkForWeldFiles(unit);
+ return unit.getAttachment(DeployersUtils.WELD_FILES) != null;
}
@Override
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldMcExtensionsIntegrationDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldMcExtensionsIntegrationDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldMcExtensionsIntegrationDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -23,7 +23,7 @@
@Override // we override this, as we want any beans.xml
protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
{
- return DeployersUtils.checkForWeldFiles(unit);
+ return DeployersUtils.checkForWeldFilesInUnitAndChildren(unit);
}
@Override
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldWebTierIntegrationDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldWebTierIntegrationDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/cl/WeldWebTierIntegrationDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -22,7 +22,7 @@
@Override
protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
{
- return DeployersUtils.checkForWeldFiles(unit);
+ return unit.getAttachment(DeployersUtils.WELD_FILES) != null;
}
protected String getShortLibName()
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/AbstractBootstrapInfoDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/AbstractBootstrapInfoDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/AbstractBootstrapInfoDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -55,7 +55,7 @@
{
deployInternal(unit, info);
}
- else if (DeployersUtils.checkForWeldFiles(unit))
+ else if (DeployersUtils.checkForWeldFilesInUnitAndChildren(unit))
{
info = new BootstrapInfo();
unit.addAttachment(BootstrapInfo.class, info);
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/ArchiveDiscoveryDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/ArchiveDiscoveryDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/ArchiveDiscoveryDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -124,11 +124,11 @@
}
- private static class WBDiscoveryVisitor implements ResourceVisitor
+ static class WBDiscoveryVisitor implements ResourceVisitor
{
private WeldDiscoveryEnvironment wbdi;
- private WBDiscoveryVisitor(WeldDiscoveryEnvironment wbdi)
+ WBDiscoveryVisitor(WeldDiscoveryEnvironment wbdi)
{
this.wbdi = wbdi;
}
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/JBossDeploymentDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/JBossDeploymentDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/JBossDeploymentDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -25,6 +25,7 @@
import java.util.Collection;
import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.beans.metadata.spi.factory.BeanFactory;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.integration.deployer.env.bda.ArchiveInfo;
@@ -60,6 +61,7 @@
builder.addConstructorParameter(String.class.getName(), unit.getName());
builder.addConstructorParameter(Collection.class.getName(), getArchiveInfos(unit));
builder.addConstructorParameter(Collection.class.getName(), builder.createInject(info.getEjbServices().getUnderlyingValue(), "ejbs"));
+ builder.addConstructorParameter(BeanFactory.class.getName(), builder.createInject("JBossEjbServices"));
builder.addUninstall("undeploy");
}
Deleted: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainerDependencyDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainerDependencyDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainerDependencyDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -1,41 +0,0 @@
-package org.jboss.weld.integration.deployer.env;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.weld.integration.deployer.DeployersUtils;
-
-/**
- * Ensures that Weld is bootstrapped before the Web Application is started
- * (if this is a CDI-enabled deployment)
- *
- * @author Marius Bogoevici
- * @author Ales Justin
- */
-public class WebContainerDependencyDeployer extends AbstractSimpleRealDeployer<JBossWebMetaData>
-{
- public WebContainerDependencyDeployer()
- {
- super(JBossWebMetaData.class);
- setOutput(JBossWebMetaData.class);
- }
-
- @Override
- public void deploy(DeploymentUnit unit, JBossWebMetaData deployment) throws DeploymentException
- {
- if (DeployersUtils.isBootstrapBeanPresent(unit))
- {
- List<String> depends = deployment.getDepends();
- if (depends == null)
- {
- depends = new ArrayList<String>();
- deployment.setDepends(depends);
- }
- depends.add(DeployersUtils.getBootstrapBeanName(unit));
- }
- }
-}
Copied: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainterIntegrationDeployer.java (from rev 108151, trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainterIntegrationDeployer.java)
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainterIntegrationDeployer.java (rev 0)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WebContainterIntegrationDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,55 @@
+package org.jboss.weld.integration.deployer.env;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.weld.integration.deployer.DeployersUtils;
+import org.jboss.weld.integration.deployer.env.helpers.BootstrapBean;
+import org.jboss.weld.integration.injection.WeldInjector;
+
+/**
+ * Ensures that Weld is bootstrapped before the Web Application is started
+ * (if this is a CDI-enabled deployment)
+ *
+ * @author Marius Bogoevici
+ * @author Ales Justin
+ */
+public class WebContainterIntegrationDeployer extends AbstractSimpleRealDeployer<JBossWebMetaData>
+{
+ public WebContainterIntegrationDeployer()
+ {
+ super(JBossWebMetaData.class);
+ setOutput(JBossWebMetaData.class);
+ }
+
+ @Override
+ public void deploy(DeploymentUnit unit, JBossWebMetaData deployment) throws DeploymentException
+ {
+ if (DeployersUtils.isBootstrapBeanPresent(unit) && unit.getAttachment(DeployersUtils.WELD_FILES) != null)
+ {
+ String injectorName = unit.getName() + "_WBInjector";
+ String bootstrapBeanName = DeployersUtils.getBootstrapBeanName(unit);
+
+ BeanMetaDataBuilder weldInjector = BeanMetaDataBuilder.createBuilder(injectorName, WeldInjector.class.getName());
+
+ weldInjector.addConstructorParameter(BootstrapBean.class.getName(), weldInjector.createInject(bootstrapBeanName));
+ weldInjector.addConstructorParameter(String.class.getName(), unit.getClassLoader().toString());
+ weldInjector.setDestroy("cleanup");
+ unit.addAttachment(injectorName + "_" + BeanMetaData.class.getSimpleName(), weldInjector.getBeanMetaData());
+
+ List<String> depends = deployment.getDepends();
+ if (depends == null)
+ {
+ depends = new ArrayList<String>();
+ deployment.setDepends(depends);
+ }
+ depends.add(bootstrapBeanName);
+ }
+ }
+}
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldBootstrapDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldBootstrapDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldBootstrapDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -29,10 +29,10 @@
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.weld.bootstrap.api.Bootstrap;
-import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.context.api.BeanStore;
import org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore;
import org.jboss.weld.integration.deployer.DeployersUtils;
+import org.jboss.weld.integration.deployer.env.bda.DeploymentImpl;
import org.jboss.weld.integration.deployer.env.helpers.BootstrapBean;
import org.jboss.weld.integration.injection.WeldInjector;
@@ -71,7 +71,7 @@
BeanMetaDataBuilder bootstrap = BeanMetaDataBuilder.createBuilder(bootstrapName, "org.jboss.weld.integration.deployer.env.helpers.BootstrapBean");
bootstrap.addConstructorParameter(Bootstrap.class.getName(), createBootstrap(unit));
- bootstrap.addConstructorParameter(FlatDeployment.class.getName(), deploymentValue);
+ bootstrap.addConstructorParameter(DeploymentImpl.class.getName(), deploymentValue);
bootstrap.addPropertyMetaData("ejbServices", ejbServicesValue);
bootstrap.addPropertyMetaData("ejbInjectionServices", ejbInjectionServicesValue);
bootstrap.addPropertyMetaData("jpaServices", createServiceConnector("JBossJpaServices", "org.jboss.weld.integration.persistence.JBossJpaServices", unit));
@@ -97,12 +97,6 @@
install.addParameterMetaData(String.class.getName(), "Create");
unit.addAttachment(DeployersUtils.getBootstrapBeanAttachmentName(unit), bootstrap.getBeanMetaData());
-
- String injectorName = unit.getName() + "_WBInjector";
- BeanMetaDataBuilder weldInjector = BeanMetaDataBuilder.createBuilder(injectorName, WeldInjector.class.getName());
- weldInjector.addConstructorParameter(BootstrapBean.class.getName(), bootstrap.createInject(bootstrapName));
- weldInjector.setDestroy("cleanup");
- unit.addAttachment(injectorName + "_" + BeanMetaData.class.getSimpleName(), weldInjector.getBeanMetaData());
}
/**
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldDiscoveryEnvironment.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldDiscoveryEnvironment.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/WeldDiscoveryEnvironment.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -27,6 +27,8 @@
import java.util.HashSet;
import java.util.Set;
+import org.jboss.classloading.spi.visitor.ResourceVisitor;
+
/**
* WBD env impl.
*
@@ -38,6 +40,16 @@
private Set<URL> urls = new HashSet<URL>();
/**
+ * Create visitor.
+ *
+ * @return the weld discovery visitor
+ */
+ public ResourceVisitor visitor()
+ {
+ return new ArchiveDiscoveryDeployer.WBDiscoveryVisitor(this);
+ }
+
+ /**
* Add weld class.
*
* @param clazz the weld class
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/Archive.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/Archive.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/Archive.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -264,6 +264,10 @@
public void addLifecycleListener(ArchiveLifecycleListener listener)
{
this.lifecycleListeners.add(listener);
+ if (bda != null)
+ {
+ listener.archiveVisible(this, bda);
+ }
}
/**
@@ -281,14 +285,14 @@
*/
public void undeploy()
{
+ synchronized(instances)
+ {
+ instances.remove(this.classLoader);
+ }
for (ArchiveLifecycleListener listener: lifecycleListeners)
{
listener.archiveDestroyed(this);
}
- synchronized(instances)
- {
- instances.remove(this.classLoader);
- }
}
@Override
Copied: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ArchiveLoader.java (from rev 108151, trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ArchiveLoader.java)
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ArchiveLoader.java (rev 0)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ArchiveLoader.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,152 @@
+/*
+ * 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.weld.integration.deployer.env.bda;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.jboss.weld.ejb.spi.EjbDescriptor;
+
+/**
+ * An archive can either be loaded or deployed.
+ * Deployed archives are part of a DeploymentImpl, and will be automatically
+ * undeployed when the corresponding DeploymentImpl is removed from the
+ * system.
+ * Loaded archives are archives that are created for the sole purpose of
+ * fulfilling {code {@link DeploymentImpl#loadBeanDeploymentArchive(Class)}
+ * calls.
+ *
+ * The ArchiveLoader loads those archives and keeps track of which
+ * DeploymentImpl instances required them being loaded, so that it can be
+ * determined when a loaded archive is no longer in use and can be safely
+ * undeployed.
+ *
+ * @author <a href="mailto:flavia.rainone at jboss.com">Flavia Rainone</a>
+ * @version $Revision$
+ * @see DeploymentImpl#loadBeanDeploymentArchive(Class)
+ */
+class ArchiveLoader
+{
+ private Map<Archive, Collection<DeploymentImpl>> loadedArchives;
+
+ /**
+ * Constructor.
+ */
+ public ArchiveLoader()
+ {
+ loadedArchives = new HashMap<Archive, Collection<DeploymentImpl>>();
+ }
+
+ /**
+ * Loads an archive that contains {@code beanClass}.
+ * If such archive already exists, no archive is created and the
+ * preexistent one is returned.
+ *
+ * @param beanClass the class the loaded archive should contain
+ * @param deployment the deployment making this request
+ * @return the requested Archive
+ */
+ public Archive load(Class<?> beanClass, DeploymentImpl deployment)
+ {
+ ClassLoader beanClassLoader = SecurityActions.getClassLoader(beanClass);
+ synchronized(beanClassLoader)
+ {
+ Archive archive = Archive.getInstance(beanClassLoader);
+ if (archive == null)
+ {
+ ArchiveInfo archiveInfo = new ArchiveInfo(beanClassLoader);
+ Collection<EjbDescriptor<?>> ejbs = Collections.emptyList();
+ archive = ArchiveFactory.createArchive(archiveInfo, ejbs);
+ registerArchiveLoadedByDeployment(archive, deployment);
+ }
+ else if (isLoaded(archive))
+ {
+ registerArchiveReloadedByDeployment(archive, deployment);
+ }
+ return archive;
+ }
+ }
+
+ /**
+ * Notifies this ArchiveLoader that the loaded {@code archive} is no longer
+ * being used by {@code deployment}, which should occur when {@code deployment}
+ * is being undeployed.
+ *
+ * @param archive an archive
+ * @param deployment the deployment being undeployed
+ * @return {@code true} if this archive is free to be released, i.e.,
+ * if it is not in use by any other deployment.
+ * @see DeploymentImpl#undeploy()
+ */
+ public boolean unload(Archive archive, DeploymentImpl deployment)
+ {
+ // this archive is not a loaded archive and hence cannot be undeployed
+ // as a loaded archive
+ if (!loadedArchives.containsKey(archive))
+ {
+ return false;
+ }
+ synchronized(archive.getClassLoader())
+ {
+ Collection<DeploymentImpl> deployments = loadedArchives.get(archive);
+ deployments.remove(deployment);
+ if (deployments.isEmpty())
+ {
+ loadedArchives.remove(archive);
+ return true;
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Indicates whether {@code archive} is loaded by this ArchiveLoader.
+ */
+ private boolean isLoaded(Archive archive)
+ {
+ return loadedArchives.containsKey(archive);
+ }
+
+ /**
+ * Record that the loaded {@code archive} is being requested by
+ * {@code deployment}
+ */
+ private void registerArchiveReloadedByDeployment(Archive archive, DeploymentImpl deployment)
+ {
+ Collection<DeploymentImpl> deployments = loadedArchives.get(archive);
+ deployments.add(deployment);
+ }
+
+ /**
+ * Record that the newly created {@code archive} was requested by
+ * {@code deployment}.
+ */
+ private void registerArchiveLoadedByDeployment(Archive archive, DeploymentImpl deployment)
+ {
+ Collection<DeploymentImpl> deployments = new HashSet<DeploymentImpl>();
+ deployments.add(deployment);
+ loadedArchives.put(archive, deployments);
+ }
+}
\ No newline at end of file
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ClasspathFactory.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ClasspathFactory.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ClasspathFactory.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -84,11 +84,10 @@
{
domain = system.getDomain(module.getDeterminedDomainName());
}
- return getClasspath(classLoader, domain);
+ return getClasspath(domain);
}
-
- // FIXME: remove classLoader parameter!
- private Classpath getClasspath(ClassLoader cl, Loader domain)
+
+ private Classpath getClasspath(Loader domain)
{
if (domain == null || domain == DEFAULT_DOMAIN)
{
@@ -96,7 +95,7 @@
}
synchronized(domain)
{
- Classpath classpath = getClasspath(domain);
+ Classpath classpath = getCachedClasspath(domain);
if (classpath == null)
{
if (domain instanceof ClassLoaderToLoaderAdapter)
@@ -106,7 +105,7 @@
ArchiveInfo archiveInfo = unitLoader == null? null: ArchiveInfo.getInstance(unitLoader);
if (archiveInfo == null)
{
- classpath = new ClasspathImpl(domain.toString());
+ classpath = new NoDuplicatesClasspath(domain.toString());
}
else
{
@@ -118,22 +117,21 @@
if (domain instanceof ClassLoaderDomain)
{
ClassLoaderDomain clDomain = (ClassLoaderDomain) domain;
- Classpath parentClasspath = getClasspath(null, clDomain.getParent());
- classpath = new ClasspathImpl(clDomain.getName(), parentClasspath);
+ Classpath parentClasspath = getClasspath(clDomain.getParent());
+ classpath = new NoDuplicatesClasspath(clDomain.getName(), parentClasspath);
}
else
{
throw new RuntimeException("Domain is of unexpected type: " + domain + " - " + domain.getClass());
}
}
- addClasspath(domain, classpath);
+ addClasspathToCache(domain, classpath);
}
return classpath;
}
}
- // FIXME: getCachedClassPath
- private Classpath getClasspath(Loader domain)
+ private Classpath getCachedClasspath(Loader domain)
{
WeakReference<Classpath> ref = domainToClasspath.get(domain);
if (ref == null)
@@ -142,9 +140,8 @@
}
return ref.get();
}
-
- // FIXME addClasspathToCache
- private void addClasspath(Loader domain, Classpath domainClasspath)
+
+ private void addClasspathToCache(Loader domain, Classpath domainClasspath)
{
domainToClasspath.put(domain, new WeakReference<Classpath>(domainClasspath));
}
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/DeploymentImpl.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/DeploymentImpl.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/DeploymentImpl.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -21,14 +21,13 @@
*/
package org.jboss.weld.integration.deployer.env.bda;
-import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
-import java.util.Map;
import javax.enterprise.inject.spi.Extension;
+import org.jboss.beans.metadata.spi.factory.BeanFactory;
import org.jboss.weld.bootstrap.api.Bootstrap;
import org.jboss.weld.bootstrap.api.Service;
import org.jboss.weld.bootstrap.api.ServiceRegistry;
@@ -46,8 +45,7 @@
*/
public class DeploymentImpl implements Deployment
{
- // FIXME bootstrapServices: workaround to keep track of the services needed for new BDAs
- private Map<Class<? extends Service>, Service> bootstrapServices = new HashMap<Class<? extends Service>, Service>();
+ private static ArchiveLoader archiveLoader = new ArchiveLoader();
// the name of this deployment
private String name;
@@ -57,13 +55,17 @@
// the services provided by this deployment
private final ServiceRegistry services;
+
+ // holds the services to be added to all BDAs contained in this deployment
private final ServiceRegistry bdaServices;
+
// a collection of all archives that have been loaded by this DeploymentImpl, i.e.
// created for the purpose of serving loadBeanDeploymentArchive
private Collection<Archive> loadedArchives;
-
- private Collection<EjbDescriptor<?>> ejbs;
-
+
+ // ServiceRegistryFactory to be used by loaded BDAs
+ private ServiceRegistryFactory loadedBDAServiceRegistry;
+
private Iterable<Metadata<Extension>> extensions;
/**
@@ -74,17 +76,18 @@
* contained in this deployment
* @param ejbs the ejb descriptors
*/
- public DeploymentImpl(String name, Collection<ArchiveInfo> archiveInfos, Collection<EjbDescriptor<?>> ejbs)
+ public DeploymentImpl(String name, Collection<ArchiveInfo> archiveInfos, Collection<EjbDescriptor<?>> ejbs, BeanFactory ejbServicesFactory)
{
this.name = name;
this.archives = new ArchiveCollection();
this.services = new SimpleServiceRegistry();
this.bdaServices = new SimpleServiceRegistry();
- this.ejbs = ejbs;
for (ArchiveInfo archiveInfo: archiveInfos)
{
archives.add(ArchiveFactory.createArchive(archiveInfo, ejbs));
}
+ this.loadedBDAServiceRegistry = new ServiceRegistryFactory(ejbServicesFactory);
+ this.loadedArchives = new HashSet<Archive>();
}
public void initialize(Bootstrap bootstrap)
@@ -111,55 +114,18 @@
public BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass)
{
- ClassLoader beanClassLoader = SecurityActions.getClassLoader(beanClass);
- Archive archive = Archive.getInstance(beanClassLoader);
- if (archive == null)
- {
- synchronized(beanClassLoader)
- {
- archive = Archive.getInstance(beanClassLoader);
- if (archive == null)
- {
- ArchiveInfo archiveInfo = new ArchiveInfo(beanClassLoader);
- archive = ArchiveFactory.createArchive(archiveInfo, ejbs);
- if (loadedArchives == null)
- {
- loadedArchives = new ArrayList<Archive>();
- }
- loadedArchives.add(archive);
- }
- }
-
- }
+ Archive archive = archiveLoader.load(beanClass, this);
+ loadedArchives.add(archive);
archive.addClass(beanClass);
- ServiceRegistry serviceRegistry = new SimpleServiceRegistry();
-
- // TODO this was a temporary test to try to make right the ejb service part
- // however, it didn't work as explained in the forum
- /*Map<Class<? extends Service>, Service> temp = new HashMap<Class<? extends Service>, Service>();
- for(Entry<Class<? extends Service>, Service> entry: bootstrapServices.entrySet())
+ BeanDeploymentArchive bda = archive.getBeanDeploymentArchive();
+ if (archive.getBeanDeploymentArchive() == null)
{
- if (entry.getKey() != EjbServices.class && entry.getKey() != EjbInjectionServices.class
- && !entry.getKey().toString().contains("EjbDescriptors"))
- {
- temp.put(entry.getKey(), entry.getValue());
- }
+ ServiceRegistry serviceRegistry = loadedBDAServiceRegistry.create();
+ bda = archive.createBeanDeploymentArchive(serviceRegistry);
}
- serviceRegistry.addAll(temp.entrySet());
- JBossEjbServices ejbServices = null;
- try
- {
- ejbServices = new JBossEjbServices();
- } catch (NamingException e)
- {
- e.printStackTrace();
- }
- serviceRegistry.add(EjbInjectionServices.class, ejbServices);
- serviceRegistry.add(EjbServices.class, ejbServices);*/
- serviceRegistry.addAll(bdaServices.entrySet());
- return archive.createBeanDeploymentArchive(serviceRegistry);//bdaServices);
+ return bda;
}
-
+
/**
* Add bootstrap service to all BDAs in this deployment.
*
@@ -173,9 +139,10 @@
{
beanDeploymentArchive.getServices().add(type, service);
}
- bootstrapServices.put(type, service);
+ bdaServices.add(type, service);
+ loadedBDAServiceRegistry.addService(type, service);
}
-
+
public void undeploy()
{
for(Iterator<Archive> iterator = archives.iterator(); iterator.hasNext(); )
@@ -184,25 +151,29 @@
iterator.remove();
archive.undeploy();
}
- if (loadedArchives != null)
+ for (Archive archive: loadedArchives)
{
- for (Archive archive: loadedArchives)
+ // avoid a race condition where archiveLoader gives an ok to undeploy
+ // the archive while another thread executing archiveLoader.load
+ // retrieves the same archive
+ synchronized(archive.getClassLoader())
{
- // FIXME this does not work ok... what if the loaded Archive is being
- // used by some other dpeloyment???
- archive.undeploy();
+ if (archiveLoader.unload(archive, this))
+ {
+ archive.undeploy();
+ }
}
}
}
-
+
public Iterable<Metadata<Extension>> getExtensions()
{
return extensions;
}
-
+
@Override
public String toString()
{
return "Deployment[" + name + "]";
}
-}
+}
\ No newline at end of file
Copied: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/LibraryDiscoveryService.java (from rev 108151, trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/LibraryDiscoveryService.java)
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/LibraryDiscoveryService.java (rev 0)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/LibraryDiscoveryService.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,157 @@
+/*
+ * 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.weld.integration.deployer.env.bda;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.classloading.spi.visitor.ClassFilter;
+import org.jboss.classloading.spi.visitor.ResourceVisitor;
+import org.jboss.deployers.spi.classloading.ResourceLookupProvider;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.jboss.weld.bootstrap.api.ServiceRegistry;
+import org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry;
+import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.weld.ejb.spi.EjbDescriptor;
+import org.jboss.weld.integration.deployer.env.WeldDiscoveryEnvironment;
+
+/**
+ * Find all Weld libraries.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class LibraryDiscoveryService
+{
+ private ResourceLookupProvider<Module> provider;
+ private Iterable<URL> excludedUrls;
+
+ private Set<BeanDeploymentArchive> libs;
+ private AtomicBoolean checked = new AtomicBoolean();
+
+ public LibraryDiscoveryService(ResourceLookupProvider<Module> provider)
+ {
+ if (provider == null)
+ throw new IllegalArgumentException("Null provider");
+ this.provider = provider;
+ }
+
+ /**
+ * Get libraries.
+ *
+ * @return the weld libraries
+ * @throws Exception for any error
+ */
+ public synchronized Set<BeanDeploymentArchive> getLibraries() throws Exception
+ {
+ if (libs == null || checked.get() == false)
+ {
+ libs = new HashSet<BeanDeploymentArchive>();
+
+ List<VirtualFile> excludedFiles = null;
+ Map<Module, Set<URL>> modules = provider.getMatchingModules();
+ for (Map.Entry<Module, Set<URL>> entry : modules.entrySet())
+ {
+ Set<URL> urls = entry.getValue();
+ if (excludedUrls != null && excludedFiles == null)
+ {
+ excludedFiles = new ArrayList<VirtualFile>();
+ for (URL eu : excludedUrls)
+ excludedFiles.add(VFS.getChild(eu));
+ }
+ Set<VirtualFile> files = new HashSet<VirtualFile>();
+ for (URL u : urls)
+ {
+ VirtualFile vf = VFS.getChild(u);
+ boolean include = true;
+ if (excludedFiles != null)
+ {
+ for (VirtualFile ef : excludedFiles)
+ {
+ if (vf.getParentFileList().contains(ef))
+ {
+ include = false;
+ break;
+ }
+ }
+ }
+ if (include)
+ files.add(vf);
+ }
+ if (files.isEmpty() == false)
+ {
+ ClassLoader cl = SecurityActions.getClassLoaderForModule(entry.getKey());
+ // is this module already installed; past CL stage
+ if (cl != null)
+ {
+ // create an ArchiveInfo with the ClassLoader
+ ArchiveInfo archiveInfo = new ArchiveInfo(cl);
+ // finally create the Archive
+ Archive archive = ArchiveFactory.createArchive(archiveInfo, new ArrayList<EjbDescriptor<?>>());
+ // ... and the corresponding BDA
+ ServiceRegistry serviceRegistry = new SimpleServiceRegistry();
+ // TODO: fill in serviceRegistry? With which services?
+
+ libs.add(archive.createBeanDeploymentArchive(serviceRegistry));
+
+ // the env
+ WeldDiscoveryEnvironment environment = archiveInfo.getEnvironment();
+ // fill in the Weld classes
+ // the WBDiscoveryVisitor from ArchiveDiscoveryDeployer...
+ ResourceVisitor visitor = environment.visitor();
+ Module module = entry.getKey();
+
+ for (VirtualFile child : files)
+ {
+ URL beansXmlURL = child.getChild(provider.getResourceName()).toURL();
+ environment.addWeldXmlURL(beansXmlURL);
+
+ module.visit(visitor, ClassFilter.INSTANCE, null, child.toURL());
+ }
+ }
+ }
+ }
+ checked.set(true);
+ }
+ return libs;
+ }
+
+ /**
+ * Refresh libs
+ */
+ public synchronized void refresh()
+ {
+ checked.set(false);
+ }
+
+ public void setExcludedUrls(Iterable<URL> excludedUrls)
+ {
+ this.excludedUrls = excludedUrls;
+ }
+}
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/NoDuplicatesClasspath.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/NoDuplicatesClasspath.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/NoDuplicatesClasspath.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
@@ -104,7 +105,21 @@
// only the reference BDA points to the other BDAs in this classpath
if (bda == reference)
{
- return getBDAs();
+ Collection<BeanDeploymentArchive> otherBDAs= getBDAs();
+
+ if (otherBDAs.isEmpty())
+ {
+ if (classpath != null)
+ return classpath.getBDAs(bda);
+ return Collections.emptyList();
+ }
+ else
+ {
+ Collection<BeanDeploymentArchive> allBDAs = new ArrayList<BeanDeploymentArchive>();
+ allBDAs.addAll(otherBDAs);
+ allBDAs.addAll(classpath.getBDAs(bda));
+ return allBDAs;
+ }
}
else
{
@@ -150,6 +165,10 @@
iterator.remove();
referenceCollection.add(reference);
}
+ synchronized(this)
+ {
+ archives.remove(archive);
+ }
}
else
{
@@ -157,10 +176,6 @@
}
}
}
- synchronized(this)
- {
- archives.remove(archive);
- }
}
public String toString()
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/SecurityActions.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/SecurityActions.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/SecurityActions.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -92,4 +92,15 @@
}
});
}
+
+ public static ClassLoader getClassLoaderForModule(final Module module)
+ {
+ return AccessController.doPrivileged(new PrivilegedAction<ClassLoader>()
+ {
+ public ClassLoader run()
+ {
+ return ClassLoading.getClassLoaderForModule(module);
+ }
+ });
+ }
}
Copied: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ServiceRegistryFactory.java (from rev 108151, trunk/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ServiceRegistryFactory.java)
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ServiceRegistryFactory.java (rev 0)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/bda/ServiceRegistryFactory.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -0,0 +1,71 @@
+/*
+ * 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.weld.integration.deployer.env.bda;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.beans.metadata.spi.factory.BeanFactory;
+import org.jboss.weld.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.ServiceRegistry;
+import org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry;
+import org.jboss.weld.ejb.spi.EjbServices;
+
+/**
+ * Creates a ServiceRegistry for newly loaded BDAs
+ *
+ * @see DeploymentImpl#loadBeanDeploymentArchive(Class)
+ * @author <a href="mailto:flavia.rainone at jboss.com">Flavia Rainone</a>
+ * @version $Revision$
+ */
+class ServiceRegistryFactory
+{
+ private BeanFactory ejbServicesFactory;
+ private Map<Class<? extends Service>, Service> services;
+
+ public ServiceRegistryFactory(BeanFactory ejbServicesFactory)
+ {
+ this.ejbServicesFactory = ejbServicesFactory;
+ services = new HashMap<Class<? extends Service>, Service>();
+ }
+
+ public void addService(Class<? extends Service> serviceType, Service service)
+ {
+ services.put(serviceType, service);
+ }
+
+ public ServiceRegistry create()
+ {
+ ServiceRegistry serviceRegistry = new SimpleServiceRegistry();
+ serviceRegistry.addAll(services.entrySet());
+ EjbServices ejbServices = null;
+ try
+ {
+ ejbServices = (EjbServices) ejbServicesFactory.createBean();
+ } catch (Throwable e)
+ {
+ throw new RuntimeException(e);
+ }
+ serviceRegistry.add(EjbServices.class, ejbServices);
+ return serviceRegistry;
+ }
+}
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/helpers/BootstrapBean.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/helpers/BootstrapBean.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/env/helpers/BootstrapBean.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -6,12 +6,13 @@
import org.jboss.weld.bootstrap.api.Environments;
import org.jboss.weld.bootstrap.api.Service;
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.context.api.BeanStore;
import org.jboss.weld.ejb.spi.EjbServices;
import org.jboss.weld.injection.spi.EjbInjectionServices;
import org.jboss.weld.injection.spi.JpaInjectionServices;
import org.jboss.weld.injection.spi.ResourceInjectionServices;
-import org.jboss.weld.integration.deployer.env.FlatDeployment;
+import org.jboss.weld.integration.deployer.env.bda.DeploymentImpl;
import org.jboss.weld.security.spi.SecurityServices;
import org.jboss.weld.servlet.api.ServletServices;
import org.jboss.weld.transaction.spi.TransactionServices;
@@ -48,13 +49,13 @@
}
private final Bootstrap bootstrap;
- private final FlatDeployment deployment;
+ private final DeploymentImpl deployment;
private BeanStore applicationBeanStore;
- public BootstrapBean(Bootstrap bootstrap, FlatDeployment flatDeployment)
+ public BootstrapBean(Bootstrap bootstrap, DeploymentImpl deployment)
{
this.bootstrap = bootstrap;
- this.deployment = flatDeployment;
+ this.deployment = deployment;
}
public void setEjbServices(EjbServices ejbServices)
@@ -77,7 +78,7 @@
addBeanDeploymentArchiveService(ResourceInjectionServices.class, resourceServices);
}
- public FlatDeployment getDeployment()
+ public Deployment getDeployment()
{
return deployment;
}
@@ -109,11 +110,7 @@
private <S extends Service> void addBeanDeploymentArchiveService(Class<S> type, S service)
{
- if (getDeployment().getFlatBeanDeploymentArchive() == null)
- {
- throw new IllegalStateException("Must add BeanDeploymentArchive to FlatDeployment first!");
- }
- getDeployment().getFlatBeanDeploymentArchive().getServices().add(type, service);
+ deployment.addBootstrapService(type, service);
}
public void boot()
@@ -131,9 +128,12 @@
public void initialize()
{
- deployment.getFlatBeanDeploymentArchive().setBootstrap(bootstrap);
+ deployment.initialize(bootstrap);
// Create the JBoss Servlet Services
- addDeploymentService(ServletServices.class, new JBossServletServices(deployment.getFlatBeanDeploymentArchive()));
+ for (BeanDeploymentArchive beanDeploymentArchive: deployment.getBeanDeploymentArchives())
+ {
+ addDeploymentService(ServletServices.class, new JBossServletServices(beanDeploymentArchive));
+ }
bootstrap.startContainer(Environments.EE_INJECT, deployment, applicationBeanStore);
}
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/jndi/JndiBinderDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/jndi/JndiBinderDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/jndi/JndiBinderDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -137,6 +137,7 @@
// BeanManager id is simply the BDA ID
String key = beanManager.getId();
beanManagers.put(key, beanManager);
+ seenBdas.add(bda);
for (BeanDeploymentArchive child : bda.getBeanDeploymentArchives())
{
if (!seenBdas.contains(child))
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/PostJBossAppMetadataDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/PostJBossAppMetadataDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/PostJBossAppMetadataDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -27,6 +27,8 @@
import org.jboss.vfs.VirtualFile;
import org.jboss.weld.integration.deployer.DeployersUtils;
+import java.util.Collection;
+
/**
* Post jboss-app.xml weld deployer.
*
@@ -39,7 +41,6 @@
public PostJBossAppMetadataDeployer()
{
super(JBossAppMetaData.class);
- addInput(DeployersUtils.WELD_FILES);
setOptionalWeldXml(true);
}
@@ -49,9 +50,9 @@
}
@Override
- protected boolean isIsolated(VFSDeploymentUnit unit, VirtualFile wbXml)
+ protected boolean isIsolated(VFSDeploymentUnit unit, Collection<VirtualFile> wbXml)
{
- return (super.isIsolated(unit, wbXml) && (wbXml != null || DeployersUtils.checkForWeldFiles(unit)));
+ return (super.isIsolated(unit, wbXml) && (wbXml != null || DeployersUtils.checkForWeldFilesInUnitAndChildren(unit)));
}
protected String getJMXName(JBossAppMetaData metaData, DeploymentUnit unit)
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/PostWebMetadataDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/PostWebMetadataDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/PostWebMetadataDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collection;
import java.util.List;
import org.jboss.deployers.spi.DeploymentException;
@@ -33,8 +34,8 @@
import org.jboss.metadata.web.spec.FilterMetaData;
import org.jboss.metadata.web.spec.FiltersMetaData;
import org.jboss.metadata.web.spec.ListenerMetaData;
+import org.jboss.metadata.web.spec.WebMetaData;
import org.jboss.vfs.VirtualFile;
-import org.jboss.weld.integration.deployer.DeployersUtils;
/**
* Post web.xml weld deployer.
@@ -51,8 +52,11 @@
public PostWebMetadataDeployer()
{
super(JBossWebMetaData.class, true);
- addInput(DeployersUtils.WELD_FILES);
addInput("merged." + JBossWebMetaData.class.getName());
+ addInput("order."+ WebMetaData.class.getName());
+ addInput("overlays."+WebMetaData.class.getName());
+ addInput("localscis."+WebMetaData.class.getName());
+
setStage(DeploymentStages.POST_CLASSLOADER);
setOptionalWeldXml(true);
// create wbl listener
@@ -66,11 +70,12 @@
CPFM = new FilterMappingMetaData();
CPFM.setFilterName("Weld Conversation Propagation Filter");
CPFM.setUrlPatterns(Arrays.asList("/*"));
+ addOutput("merged." + JBossWebMetaData.class.getName());
}
- protected void internalDeploy(VFSDeploymentUnit unit, JBossWebMetaData deployment, VirtualFile wbXml) throws DeploymentException
+ protected void internalDeploy(VFSDeploymentUnit unit, JBossWebMetaData deployment, Collection<VirtualFile> wbXml) throws DeploymentException
{
- if (wbXml != null || DeployersUtils.checkForWeldFiles(unit))
+ if (wbXml != null)
{
List<ListenerMetaData> listeners = deployment.getListeners();
if (listeners == null)
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldAwareMetadataDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldAwareMetadataDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldAwareMetadataDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -26,7 +26,10 @@
import org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.vfs.VirtualFile;
+import org.jboss.weld.integration.deployer.DeployersUtils;
+import java.util.Collection;
+
/**
* Weld aware metadata deployer.
* It looks for weld.xml in metadata.
@@ -43,13 +46,14 @@
{
super(input);
setStage(DeploymentStages.POST_PARSE);
+ addInput(DeployersUtils.WELD_FILES);
if (isInputModified)
addOutput(input); // we also modify input
}
public void deploy(VFSDeploymentUnit unit, T deployment) throws DeploymentException
{
- VirtualFile wbXml = unit.getMetaDataFile("beans.xml");
+ Collection<VirtualFile> wbXml = unit.getAttachment(DeployersUtils.WELD_FILES, Collection.class);
if (wbXml != null || optionalWeldXml)
internalDeploy(unit, deployment, wbXml);
}
@@ -62,7 +66,7 @@
* @param wbXml web beans xml
* @throws org.jboss.deployers.spi.DeploymentException for any deployment error
*/
- protected abstract void internalDeploy(VFSDeploymentUnit unit, T deployment, VirtualFile wbXml) throws DeploymentException;
+ protected abstract void internalDeploy(VFSDeploymentUnit unit, T deployment, Collection<VirtualFile> wbXml) throws DeploymentException;
/**
* Set optional wb xml file.
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldClassloadingDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldClassloadingDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldClassloadingDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -29,6 +29,8 @@
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.vfs.VirtualFile;
+import java.util.Collection;
+
/**
* Handle classloading metadata creation.
*
@@ -47,7 +49,7 @@
addOutput(ClassLoadingMetaData.class);
}
- protected void internalDeploy(VFSDeploymentUnit unit, T deployment, VirtualFile wbXml) throws DeploymentException
+ protected void internalDeploy(VFSDeploymentUnit unit, T deployment, Collection<VirtualFile> wbXml) throws DeploymentException
{
ClassLoadingMetaData classLoadingMetaData = unit.getAttachment(ClassLoadingMetaData.class);
if (classLoadingMetaData != null)
@@ -86,9 +88,9 @@
* @param wbXml weld xml
* @return true is deployment shouold be isolated, false otherwise
*/
- protected boolean isIsolated(VFSDeploymentUnit unit, VirtualFile wbXml)
+ protected boolean isIsolated(VFSDeploymentUnit unit, Collection<VirtualFile> wbXml)
{
- return isIsolated();
+ return isolated;
}
/**
@@ -101,14 +103,6 @@
protected abstract String getJMXName(T metaData, DeploymentUnit unit);
/**
- * @return whether ear deployments should be isolated
- */
- public boolean isIsolated()
- {
- return isolated;
- }
-
- /**
* @param isolated whether ear deployments should be isolated
*/
public void setIsolated(boolean isolated)
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldEjbInterceptorMetadataDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldEjbInterceptorMetadataDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldEjbInterceptorMetadataDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -21,6 +21,7 @@
*/
package org.jboss.weld.integration.deployer.metadata;
+import java.util.Collection;
import java.util.Iterator;
import org.jboss.deployers.spi.DeploymentException;
@@ -63,7 +64,6 @@
{
super(JBossMetaData.class, true);
- addInput(DeployersUtils.WELD_FILES);
addInput("merged." + JBossMetaData.class.getName());
setStage(DeploymentStages.POST_CLASSLOADER);
@@ -105,7 +105,7 @@
}
@Override
- protected void internalDeploy(VFSDeploymentUnit unit, JBossMetaData jbmd, VirtualFile wbXml) throws DeploymentException
+ protected void internalDeploy(VFSDeploymentUnit unit, JBossMetaData jbmd, Collection<VirtualFile> wbXml) throws DeploymentException
{
if (jbmd.getInterceptors() == null)
{
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldFilesDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldFilesDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/deployer/metadata/WeldFilesDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -106,7 +106,7 @@
*/
protected Iterable<VirtualFile> getClassPaths(VFSDeploymentUnit unit) throws Exception
{
- List<VirtualFile> classpath = unit.getClassPath();
+ /*List<VirtualFile> classpath = unit.getClassPath();
if (classpath != null && classpath.isEmpty() == false)
{
List<VirtualFile> matching = new ArrayList<VirtualFile>();
@@ -122,6 +122,7 @@
}
return matching;
}
- return Collections.emptySet();
+ return Collections.emptySet();*/
+ return unit.getClassPath();
}
}
\ No newline at end of file
Modified: branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/injection/WeldInjector.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/injection/WeldInjector.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/main/java/org/jboss/weld/integration/injection/WeldInjector.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -14,12 +14,17 @@
{
private BootstrapBean bootstrapBean;
- public WeldInjector(BootstrapBean bootstrapBean)
+ private String beanDeploymentArchiveId;
+
+ public WeldInjector(BootstrapBean bootstrapBean, String beanDeploymentArchiveId)
{
if (bootstrapBean == null)
throw new IllegalArgumentException("Null bootstrap bean");
+ if (beanDeploymentArchiveId == null)
+ throw new IllegalArgumentException("Null bean deployment archive id");
this.bootstrapBean = bootstrapBean;
+ this.beanDeploymentArchiveId = beanDeploymentArchiveId;
}
public Class getInjectionClass()
@@ -34,9 +39,20 @@
public void inject(Object instance)
{
- // assume that the deployment is flat
- BeanDeploymentArchive beanDeploymentArchive = bootstrapBean.getDeployment().getFlatBeanDeploymentArchive();
- NonContextualObjectInjectionHelper.injectNonContextualInstance(instance, bootstrapBean.getBootstrap().getManager(beanDeploymentArchive));
+ BeanDeploymentArchive foundBeanDeploymentArchive = null;
+ for (BeanDeploymentArchive beanDeploymentArchive: bootstrapBean.getDeployment().getBeanDeploymentArchives())
+ {
+ if (beanDeploymentArchive.getId().equals(beanDeploymentArchiveId))
+ {
+ foundBeanDeploymentArchive = beanDeploymentArchive;
+ }
+ }
+ if (foundBeanDeploymentArchive == null)
+ {
+ throw new IllegalStateException("Cannot find BeanManager for BeanDeploymentArchive with id=" + beanDeploymentArchiveId);
+ }
+ NonContextualObjectInjectionHelper.injectNonContextualInstance(instance, bootstrapBean.getBootstrap().getManager(foundBeanDeploymentArchive));
+
}
public void cleanup()
Modified: branches/infinispan-int/weld-int/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockCoreIntegrationDeployer.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockCoreIntegrationDeployer.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockCoreIntegrationDeployer.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -49,7 +49,7 @@
@Override
protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
{
- return DeployersUtils.checkForWeldFiles(unit);
+ return DeployersUtils.checkForWeldFilesInUnitAndChildren(unit);
}
protected Set<URL> getURLs()
Modified: branches/infinispan-int/weld-int/deployer/src/test/java/org/jboss/test/deployers/test/PostDeployersTestCase.java
===================================================================
--- branches/infinispan-int/weld-int/deployer/src/test/java/org/jboss/test/deployers/test/PostDeployersTestCase.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer/src/test/java/org/jboss/test/deployers/test/PostDeployersTestCase.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -95,29 +95,6 @@
}
}
- public void testWarWithNoWBFile() throws Exception
- {
- VirtualFile ear = VFS.getChild("top-level.ear");
- createAssembledDirectory(ear)
- .addPath("/weld/warwowb")
- .addPath("simple.war", "/weld/warwowb/web")
- .addPath("ejbs.jar", "/weld/warwowb/ejb");
-
- DeploymentUnit topDU = assertDeploy(ear);
- try
- {
- DeploymentUnit ejbDU = assertChild(topDU, "ejbs.jar");
- assertWBInterceptor(ejbDU);
-
- DeploymentUnit webDU = assertChild(topDU, "simple.war");
- assertWBListener(webDU);
- }
- finally
- {
- undeploy(topDU);
- }
- }
-
protected void testJar(String type, boolean testCL) throws Exception
{
VirtualFile topLevel = VFS.getChild("ejbs.jar");
Modified: branches/infinispan-int/weld-int/deployer-mc-int/pom.xml
===================================================================
--- branches/infinispan-int/weld-int/deployer-mc-int/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/deployer-mc-int/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -276,6 +276,10 @@
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-dependency</artifactId>
</exclusion>
Modified: branches/infinispan-int/weld-int/ejb/pom.xml
===================================================================
--- branches/infinispan-int/weld-int/ejb/pom.xml 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/pom.xml 2010-09-15 21:29:30 UTC (rev 108152)
@@ -4,18 +4,18 @@
<artifactId>jboss-as-weld-int</artifactId>
<version>6.0.0-SNAPSHOT</version>
</parent>
-
+
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.jbossas</groupId>
<artifactId>weld-int-ejb</artifactId>
<packaging>jar</packaging>
<name>JBoss Application Server Weld Integration EE services</name>
-
+
<!-- Do not add version information here, use ../pom.xml instead -->
<dependencies>
-
+
<!-- Global dependencies -->
-
+
<dependency>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-spi</artifactId>
@@ -68,6 +68,10 @@
<artifactId>jboss-logging-log4j</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>sun-jaxws</groupId>
<artifactId>jsr181-api</artifactId>
</exclusion>
@@ -88,21 +92,25 @@
<scope>provided</scope>
<exclusions>
<exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
</exclusion>
<exclusion>
<groupId>apache-xerces</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ <exclusion>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-dependency</artifactId>
</exclusion>
<exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-aop-mc-int</artifactId>
- </exclusion>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ </exclusion>
<exclusion>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-jaspi-api</artifactId>
@@ -149,83 +157,98 @@
</exclusion>
</exclusions>
</dependency>
-
+
<dependency>
<groupId>org.jboss.ejb3</groupId>
<artifactId>jboss-ejb3-endpoint-deployer</artifactId>
<exclusions>
- <exclusion>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
- <groupId>org.jboss.ejb3</groupId>
- <artifactId>jboss-ejb3-proxy-impl</artifactId>
- <exclusions>
- <exclusion>
- <groupId>apache-xerces</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- <exclusion>
- <groupId>jboss.web</groupId>
- <artifactId>servlet-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-dependency</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-aop-mc-int</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jaspi-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jms-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-transaction-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-ejb-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jacc-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </exclusion>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-proxy-impl</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jboss.web</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jaspi-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jms-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jacc-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
- </exclusions>
- </dependency>
-
<dependency>
- <groupId>org.jboss.jpa</groupId>
- <artifactId>jboss-jpa-deployers</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-transaction-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jca-api</artifactId>
- </exclusion>
- </exclusions>
+ <groupId>org.jboss.jpa</groupId>
+ <artifactId>jboss-jpa-deployers</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>apache-xerces</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jca-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jms-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -233,49 +256,54 @@
<artifactId>jboss-logging</artifactId>
<scope>provided</scope>
</dependency>
-
+
<dependency>
<groupId>org.jboss.jbossts</groupId>
<artifactId>jbossjts-integration</artifactId>
- <exclusions>
- <exclusion>
- <groupId>ant</groupId>
- <artifactId>ant</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-ejb-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jca-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-transaction-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.logging</groupId>
- <artifactId>jboss-logging-spi</artifactId>
- </exclusion>
+ <exclusions>
+ <exclusion>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jca-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<dependency>
+ <groupId>org.jboss.metadata</groupId>
+ <artifactId>jboss-metadata-war</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
-
+
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.spec.javax.interceptor</groupId>
- <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
+ <groupId>org.jboss.spec.javax.interceptor</groupId>
+ <artifactId>jboss-interceptors-api_1.1_spec</artifactId>
</dependency>
-
+
<!-- Test dependencies -->
<dependency>
<groupId>org.jboss.test</groupId>
@@ -316,31 +344,36 @@
</exclusion>
</exclusions>
</dependency>
-
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata-ejb</artifactId>
<exclusions>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-ejb-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jca-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.javaee</groupId>
- <artifactId>jboss-jms-api</artifactId>
- </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-ejb-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jca-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-jms-api</artifactId>
+ </exclusion>
</exclusions>
</dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.jboss.ejb3.ejbref.resolver</groupId>
+ <artifactId>ejbref-resolver-spi</artifactId>
+ </dependency>
+
+ </dependencies>
</project>
Modified: branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossBussinessInterfaceDescriptorAdaptor.java
===================================================================
--- branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossBussinessInterfaceDescriptorAdaptor.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossBussinessInterfaceDescriptorAdaptor.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -1,7 +1,7 @@
package org.jboss.weld.integration.ejb;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.weld.ejb.spi.BusinessInterfaceDescriptor;
import org.jboss.weld.integration.util.Reflections;
Modified: branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEJBDescriptorAdaptor.java
===================================================================
--- branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEJBDescriptorAdaptor.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEJBDescriptorAdaptor.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -1,7 +1,7 @@
package org.jboss.weld.integration.ejb;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.weld.ejb.spi.EjbDescriptor;
import org.jboss.weld.ejb.spi.InterceptorBindings;
Modified: branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEjbInjectionServices.java
===================================================================
--- branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEjbInjectionServices.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEjbInjectionServices.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -7,8 +7,8 @@
import javax.enterprise.inject.spi.InjectionPoint;
import javax.naming.NamingException;
-import org.jboss.ejb3.common.resolvers.spi.EjbReference;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReference;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.weld.injection.spi.EjbInjectionServices;
import org.jboss.weld.integration.util.AbstractJBossServices;
import org.jboss.weld.integration.vdf.DeploymentUnitAware;
Modified: branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEjbServices.java
===================================================================
--- branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEjbServices.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossEjbServices.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -14,8 +14,7 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.ejb3.common.deployers.spi.AttachmentNames;
-import org.jboss.ejb3.common.resolvers.spi.EjbReference;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
import org.jboss.metadata.ejb.jboss.JBossMetaData;
Modified: branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossMessageDrivenBeanDescriptorAdaptor.java
===================================================================
--- branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossMessageDrivenBeanDescriptorAdaptor.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossMessageDrivenBeanDescriptorAdaptor.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -4,7 +4,7 @@
import java.util.Collection;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.metadata.ejb.jboss.JBossMessageDrivenBeanMetaData;
import org.jboss.weld.ejb.spi.BusinessInterfaceDescriptor;
Modified: branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossSessionBean31DescriptorAdaptor.java
===================================================================
--- branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossSessionBean31DescriptorAdaptor.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossSessionBean31DescriptorAdaptor.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -1,7 +1,7 @@
package org.jboss.weld.integration.ejb;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.metadata.ejb.jboss.JBossSessionBean31MetaData;
import org.jboss.metadata.ejb.jboss.jndi.resolver.impl.JNDIPolicyBasedJNDINameResolverFactory;
import org.jboss.metadata.ejb.jboss.jndi.resolver.spi.SessionBean31JNDINameResolver;
Modified: branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossSessionBeanDescriptorAdaptor.java
===================================================================
--- branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossSessionBeanDescriptorAdaptor.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/ejb/JBossSessionBeanDescriptorAdaptor.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -6,7 +6,7 @@
import java.util.List;
import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.metadata.ejb.jboss.JBossSessionBeanMetaData;
import org.jboss.metadata.ejb.spec.RemoveMethodMetaData;
import org.jboss.weld.ejb.spi.BusinessInterfaceDescriptor;
Modified: branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/util/JBossEjb.java
===================================================================
--- branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/util/JBossEjb.java 2010-09-15 20:58:52 UTC (rev 108151)
+++ branches/infinispan-int/weld-int/ejb/src/main/java/org/jboss/weld/integration/util/JBossEjb.java 2010-09-15 21:29:30 UTC (rev 108152)
@@ -2,7 +2,7 @@
import org.jboss.beans.metadata.api.annotations.Inject;
import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.ejb3.common.resolvers.spi.EjbReferenceResolver;
+import org.jboss.ejb3.ejbref.resolver.spi.EjbReferenceResolver;
import org.jboss.jpa.deployment.PersistenceUnitDeployment;
import org.jboss.kernel.plugins.bootstrap.basic.KernelConstants;
import org.jboss.kernel.spi.dependency.KernelController;
More information about the jboss-cvs-commits
mailing list