This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch xbean-4.30-SNAPSHOT
in repository https://gitbox.apache.org/repos/asf/tomee.git


The following commit(s) were added to refs/heads/xbean-4.30-SNAPSHOT by this 
push:
     new 80d3889c7a Set ctor arguments in FlushableDataSourceHandler
80d3889c7a is described below

commit 80d3889c7a17c2d7c45496dab2ea49c5544eaa83
Author: Richard Zowalla <[email protected]>
AuthorDate: Mon Jan 5 22:31:43 2026 +0100

    Set ctor arguments in FlushableDataSourceHandler
---
 .../apache/openejb/resource/jdbc/FlushableDataSourceHandler.java  | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/FlushableDataSourceHandler.java
 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/FlushableDataSourceHandler.java
index 876f18b3d7..18d8ee3ce3 100644
--- 
a/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/FlushableDataSourceHandler.java
+++ 
b/container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/FlushableDataSourceHandler.java
@@ -16,6 +16,7 @@
  */
 package org.apache.openejb.resource.jdbc;
 
+import org.apache.openejb.util.Duration;
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 import org.apache.xbean.recipe.ObjectRecipe;
@@ -38,6 +39,10 @@ public class FlushableDataSourceHandler implements 
DelegatableHandler {
     public static final String[] FACTORY_ARGS = new String[]{
         "ServiceId", "JtaManaged", "JdbcDriver", "Definition", "MaxWaitTime", 
"TimeBetweenEvictionRuns", "MinEvictableIdleTime", "OpenEJBResourceClasspath"
     };
+    public static final Class[] FACTORY_ARG_TYPES = new Class[]{
+            String.class, boolean.class, Class.class, String.class,
+            Duration.class, Duration.class, Duration.class,
+            boolean.class};
 
     private final FlushConfig config;
     private final ReadWriteLock lock = new ReentrantReadWriteLock();
@@ -53,7 +58,8 @@ public class FlushableDataSourceHandler implements 
DelegatableHandler {
     private void createANewDelegate() {
         final CommonDataSource old = delegate.get();
         try {
-            final ObjectRecipe recipe = new 
ObjectRecipe(DataSourceFactory.class.getName(), "create", FACTORY_ARGS);
+            final ObjectRecipe recipe = new 
ObjectRecipe(DataSourceFactory.class.getName(), "create",
+                    FACTORY_ARGS, FACTORY_ARG_TYPES);
             recipe.allow(Option.CASE_INSENSITIVE_PROPERTIES);
             recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
             recipe.allow(Option.NAMED_PARAMETERS);

Reply via email to