Repository: tomee Updated Branches: refs/heads/tomee-1.7.x 55e587fcf -> 65639b43a
mergin with master resource postconstruct fix + fixing example openejb version Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/65639b43 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/65639b43 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/65639b43 Branch: refs/heads/tomee-1.7.x Commit: 65639b43aa8d260ca406e5beb7aec30e1659bd13 Parents: 55e587f Author: Romain Manni-Bucau <rmannibu...@apache.org> Authored: Wed Apr 29 13:21:37 2015 +0200 Committer: Romain Manni-Bucau <rmannibu...@apache.org> Committed: Wed Apr 29 13:21:37 2015 +0200 ---------------------------------------------------------------------- .../apache/openejb/assembler/classic/Assembler.java | 13 ++++++++++--- examples/bean-validation-design-by-contract/pom.xml | 2 +- examples/cdi-event-realm/pom.xml | 2 +- examples/change-jaxws-url/pom.xml | 2 +- examples/datasource-ciphered-password/pom.xml | 2 +- examples/datasource-definition/pom.xml | 2 +- examples/dynamic-datasource-routing/pom.xml | 2 +- examples/mbean-auto-registration/pom.xml | 2 +- examples/pojo-webservice/pom.xml | 2 +- examples/resources-declared-in-webapp/pom.xml | 2 +- examples/resources-jmx-example/pom.xml | 4 ++-- examples/rest-example-with-application/pom.xml | 4 ++-- examples/simple-cmp2/pom.xml | 2 +- 13 files changed, 24 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java index d7b4941..c725ced 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/Assembler.java @@ -517,10 +517,12 @@ public class Assembler extends AssemblerTool implements org.apache.openejb.spi.A createSecurityService(configInfo.facilities.securityService); + final Set<String> rIds = new HashSet<String>(configInfo.facilities.resources.size()); for (final ResourceInfo resourceInfo : configInfo.facilities.resources) { createResource(resourceInfo); + rIds.add(resourceInfo.id); } - postConstructResources(ParentClassLoaderFinder.Helper.get(), systemInstance.getComponent(ContainerSystem.class).getJNDIContext(), null); + postConstructResources(rIds, ParentClassLoaderFinder.Helper.get(), systemInstance.getComponent(ContainerSystem.class).getJNDIContext(), null); // Containers for (final ContainerInfo serviceInfo : containerSystemInfo.containers) { @@ -942,7 +944,7 @@ public class Assembler extends AssemblerTool implements org.apache.openejb.spi.A } } - postConstructResources(classLoader, containerSystemContext, appContext); + postConstructResources(appInfo.resourceIds, classLoader, containerSystemContext, appContext); deployedApplications.put(appInfo.path, appInfo); resumePersistentSchedulers(appContext); @@ -963,7 +965,9 @@ public class Assembler extends AssemblerTool implements org.apache.openejb.spi.A } } - private void postConstructResources(final ClassLoader classLoader, final Context containerSystemContext, final AppContext appContext) throws NamingException, OpenEJBException { + private void postConstructResources( + final Set<String> resourceIds, final ClassLoader classLoader, + final Context containerSystemContext, final AppContext appContext) throws NamingException, OpenEJBException { final Thread thread = Thread.currentThread(); final ClassLoader oldCl = thread.getContextClassLoader(); @@ -973,6 +977,9 @@ public class Assembler extends AssemblerTool implements org.apache.openejb.spi.A final List<ResourceInfo> resourceList = config.facilities.resources; for (final ResourceInfo resourceInfo : resourceList) { + if (!resourceIds.contains(resourceInfo.id)) { + continue; + } if (isTemplatizedResource(resourceInfo)) { continue; } http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/bean-validation-design-by-contract/pom.xml ---------------------------------------------------------------------- diff --git a/examples/bean-validation-design-by-contract/pom.xml b/examples/bean-validation-design-by-contract/pom.xml index 223ed49..2c073de 100755 --- a/examples/bean-validation-design-by-contract/pom.xml +++ b/examples/bean-validation-design-by-contract/pom.xml @@ -24,7 +24,7 @@ <name>OpenEJB :: Examples :: Bean Validation Design By Contract</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> </properties> <build> <defaultGoal>install</defaultGoal> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/cdi-event-realm/pom.xml ---------------------------------------------------------------------- diff --git a/examples/cdi-event-realm/pom.xml b/examples/cdi-event-realm/pom.xml index 3a459a6..1a16ea8 100644 --- a/examples/cdi-event-realm/pom.xml +++ b/examples/cdi-event-realm/pom.xml @@ -26,7 +26,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> <tomee.version>1.7.3-SNAPSHOT</tomee.version> <tomcat.version>7.0.57</tomcat.version> </properties> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/change-jaxws-url/pom.xml ---------------------------------------------------------------------- diff --git a/examples/change-jaxws-url/pom.xml b/examples/change-jaxws-url/pom.xml index d75ecf9..6e96c81 100644 --- a/examples/change-jaxws-url/pom.xml +++ b/examples/change-jaxws-url/pom.xml @@ -25,7 +25,7 @@ <name>OpenEJB :: Web Examples :: Change JAXWS URL</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> <tomee.version>1.7.3-SNAPSHOT</tomee.version> </properties> <repositories> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/datasource-ciphered-password/pom.xml ---------------------------------------------------------------------- diff --git a/examples/datasource-ciphered-password/pom.xml b/examples/datasource-ciphered-password/pom.xml index c9cadd2..2a202b5 100644 --- a/examples/datasource-ciphered-password/pom.xml +++ b/examples/datasource-ciphered-password/pom.xml @@ -24,7 +24,7 @@ <name>OpenEJB :: Examples :: Datasource Ciphered Password</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> </properties> <build> <defaultGoal>install</defaultGoal> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/datasource-definition/pom.xml ---------------------------------------------------------------------- diff --git a/examples/datasource-definition/pom.xml b/examples/datasource-definition/pom.xml index ed01519..aedb166 100644 --- a/examples/datasource-definition/pom.xml +++ b/examples/datasource-definition/pom.xml @@ -24,7 +24,7 @@ <name>OpenEJB :: Examples :: Datasource Definition</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> </properties> <build> <defaultGoal>install</defaultGoal> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/dynamic-datasource-routing/pom.xml ---------------------------------------------------------------------- diff --git a/examples/dynamic-datasource-routing/pom.xml b/examples/dynamic-datasource-routing/pom.xml index e10c547..a89bfb2 100755 --- a/examples/dynamic-datasource-routing/pom.xml +++ b/examples/dynamic-datasource-routing/pom.xml @@ -24,7 +24,7 @@ <name>OpenEJB :: Examples :: Dynamic Datasource Routing</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> </properties> <build> <defaultGoal>install</defaultGoal> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/mbean-auto-registration/pom.xml ---------------------------------------------------------------------- diff --git a/examples/mbean-auto-registration/pom.xml b/examples/mbean-auto-registration/pom.xml index 7a8725f..fc9d88e 100755 --- a/examples/mbean-auto-registration/pom.xml +++ b/examples/mbean-auto-registration/pom.xml @@ -24,7 +24,7 @@ <name>OpenEJB :: Examples :: MBean Auto Registration</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> </properties> <build> <defaultGoal>install</defaultGoal> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/pojo-webservice/pom.xml ---------------------------------------------------------------------- diff --git a/examples/pojo-webservice/pom.xml b/examples/pojo-webservice/pom.xml index 77c91ce..4d32052 100644 --- a/examples/pojo-webservice/pom.xml +++ b/examples/pojo-webservice/pom.xml @@ -25,7 +25,7 @@ <name>OpenEJB :: Web Examples :: Pojo WS</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <tomee.version>1.7.2</tomee.version> + <tomee.version>1.7.3-SNAPSHOT</tomee.version> </properties> <repositories> <repository> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/resources-declared-in-webapp/pom.xml ---------------------------------------------------------------------- diff --git a/examples/resources-declared-in-webapp/pom.xml b/examples/resources-declared-in-webapp/pom.xml index de4b17e..77371d8 100644 --- a/examples/resources-declared-in-webapp/pom.xml +++ b/examples/resources-declared-in-webapp/pom.xml @@ -26,7 +26,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> </properties> <repositories> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/resources-jmx-example/pom.xml ---------------------------------------------------------------------- diff --git a/examples/resources-jmx-example/pom.xml b/examples/resources-jmx-example/pom.xml index b50d74d..19583a5 100644 --- a/examples/resources-jmx-example/pom.xml +++ b/examples/resources-jmx-example/pom.xml @@ -29,8 +29,8 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <version.openejb>4.7.2</version.openejb> - <version.tomee>1.7.2</version.tomee> + <version.openejb>4.7.3-SNAPSHOT</version.openejb> + <version.tomee>1.7.3-SNAPSHOT</version.tomee> <version.openjpa>2.4.0</version.openjpa> </properties> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/rest-example-with-application/pom.xml ---------------------------------------------------------------------- diff --git a/examples/rest-example-with-application/pom.xml b/examples/rest-example-with-application/pom.xml index a782878..e68f883 100644 --- a/examples/rest-example-with-application/pom.xml +++ b/examples/rest-example-with-application/pom.xml @@ -25,8 +25,8 @@ <name>OpenEJB :: Web Examples :: REST Example With Application</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> - <tomee.version>1.7.2</tomee.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> + <tomee.version>1.7.3-SNAPSHOT</tomee.version> </properties> <repositories> <repository> http://git-wip-us.apache.org/repos/asf/tomee/blob/65639b43/examples/simple-cmp2/pom.xml ---------------------------------------------------------------------- diff --git a/examples/simple-cmp2/pom.xml b/examples/simple-cmp2/pom.xml index 1de2718..466b906 100644 --- a/examples/simple-cmp2/pom.xml +++ b/examples/simple-cmp2/pom.xml @@ -28,7 +28,7 @@ <name>OpenEJB :: Examples :: Simple CMP2 Entity</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <openejb.version>4.7.2</openejb.version> + <openejb.version>4.7.3-SNAPSHOT</openejb.version> </properties> <build> <defaultGoal>install</defaultGoal>