geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viol...@apache.org
Subject svn commit: r1172000 - /geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Date Sat, 17 Sep 2011 15:04:36 GMT
Author: violalu
Date: Sat Sep 17 15:04:35 2011
New Revision: 1172000

URL: http://svn.apache.org/viewvc?rev=1172000&view=rev
Log:
GERONIMO-5181 make datasource connection pool parameters effective when restart geronimo.

Modified:
    geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java

Modified: geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java?rev=1172000&r1=1171999&r2=1172000&view=diff
==============================================================================
--- geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
(original)
+++ geronimo/server/branches/2.2/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Sat Sep 17 15:04:35 2011
@@ -105,6 +105,7 @@ import org.apache.geronimo.kernel.reposi
 import org.apache.geronimo.kernel.repository.ListableRepository;
 import org.apache.geronimo.kernel.repository.WriteableRepository;
 import org.apache.geronimo.kernel.util.XmlUtil;
+import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
 import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
 import org.slf4j.Logger;
@@ -1146,8 +1147,10 @@ public class DatabasePoolPortlet extends
                                 entry.getValue());
                     }
                 }
-                //todo: push the lookup into ManagementHelper
-                PoolingAttributes pool = (PoolingAttributes) factory.getConnectionManagerContainer();
+                //Make pool setting effective after server restart                
+                Jsr77Naming naming = new Jsr77Naming();
+                AbstractName connectionManagerName = naming.createChildName(new AbstractName(URI.create(data.getAbstractName())),
data.getName(), NameFactory.JCA_CONNECTION_MANAGER);
+                PoolingAttributes pool = (PoolingAttributes) PortletManager.getManagedBean(request,
connectionManagerName);
                 pool.setPartitionMinSize(
                         data.minSize == null || data.minSize.equals("") ? 0 : Integer.parseInt(data.minSize));
                 pool.setPartitionMaxSize(



Mime
View raw message