geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From viol...@apache.org
Subject svn commit: r1171985 - /geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Date Sat, 17 Sep 2011 14:07:03 GMT
Author: violalu
Date: Sat Sep 17 14:07:03 2011
New Revision: 1171985

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

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

Modified: geronimo/server/branches/2.1/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.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java?rev=1171985&r1=1171984&r2=1171985&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
(original)
+++ geronimo/server/branches/2.1/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Sat Sep 17 14:07:03 2011
@@ -98,6 +98,7 @@ import org.apache.geronimo.deployment.se
 import org.apache.geronimo.deployment.tools.loader.ConnectorDeployable;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationUtil;
 import org.apache.geronimo.kernel.management.State;
@@ -1126,9 +1127,13 @@ public class DatabasePoolPortlet extends
                         factory.setConfigProperty(entry.getKey().substring("property-".length()),
                                 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