tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tveron...@apache.org
Subject [36/50] tomee git commit: Fixes for override tests
Date Thu, 18 Jan 2018 15:44:24 GMT
Fixes for override tests


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/7e5178f2
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/7e5178f2
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/7e5178f2

Branch: refs/heads/master
Commit: 7e5178f29caae2b5ddd3c2958687bb235a84981d
Parents: cf66826
Author: Jonathan Gallimore <jon@jrg.me.uk>
Authored: Fri Jan 5 11:38:31 2018 +0000
Committer: Thiago Veronezi <thiago@veronezi.org>
Committed: Fri Jan 5 06:44:12 2018 -0500

----------------------------------------------------------------------
 .../openejb/core/mdb/MdbContainerFactory.java      | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/7e5178f2/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainerFactory.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainerFactory.java
b/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainerFactory.java
index 3298028..86b6ce9 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainerFactory.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/core/mdb/MdbContainerFactory.java
@@ -21,6 +21,7 @@ import org.apache.openejb.util.Duration;
 import org.apache.openejb.util.Pool;
 
 import javax.resource.spi.ResourceAdapter;
+import java.util.Properties;
 
 public class MdbContainerFactory {
 
@@ -39,6 +40,8 @@ public class MdbContainerFactory {
     private boolean useOneSchedulerThreadByBean = false;
     private int evictionThreads = 1;
     private boolean pool;
+    private Properties properties = new Properties();
+
 
 
     public Object getId() {
@@ -198,17 +201,27 @@ public class MdbContainerFactory {
         this.pool = pool;
     }
 
+    public Properties getProperties() {
+        return properties;
+    }
+
     public BaseMdbContainer create() {
 
         if (pool) {
-            return new MdbPoolContainer(id, securityService, resourceAdapter,
+            final MdbPoolContainer mdbPoolContainer = new MdbPoolContainer(id, securityService,
resourceAdapter,
                     messageListenerInterface, activationSpecClass,
                     failOnUnknownActivationSpec, accessTimeout, closeTimeout, poolBuilder,
                     callbackThreads, useOneSchedulerThreadByBean, evictionThreads);
+
+            mdbPoolContainer.getProperties().putAll(this.getProperties());
+            return mdbPoolContainer;
         } else {
-            return new MdbContainer(id, securityService, resourceAdapter,
+            final MdbContainer mdbContainer = new MdbContainer(id, securityService, resourceAdapter,
                     messageListenerInterface, activationSpecClass, instanceLimit,
                     failOnUnknownActivationSpec);
+
+            mdbContainer.getProperties().putAll(this.getProperties());
+            return mdbContainer;
         }
     }
 }


Mime
View raw message