geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xiam...@apache.org
Subject svn commit: r1245880 - /geronimo/server/branches/3.0-beta/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Date Sat, 18 Feb 2012 07:36:40 GMT
Author: xiaming
Date: Sat Feb 18 07:36:39 2012
New Revision: 1245880

URL: http://svn.apache.org/viewvc?rev=1245880&view=rev
Log:
GERONIMO-6162 re-enable Datasource Connection Pool Parameters Setting, for 3.0-beta

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

Modified: geronimo/server/branches/3.0-beta/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/3.0-beta/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java?rev=1245880&r1=1245879&r2=1245880&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
(original)
+++ geronimo/server/branches/3.0-beta/plugins/system-database/sysdb-portlets/src/main/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
Sat Feb 18 07:36:39 2012
@@ -715,7 +715,18 @@ public class DatabasePoolPortlet extends
         data.blockingTimeout = Integer.toString(pool.getBlockingTimeoutMilliseconds());
         data.idleTimeout = Integer.toString(pool.getIdleTimeoutMinutes());
         */
-
+        try {
+            Jsr77Naming naming = new Jsr77Naming();
+            AbstractName connectionManagerName = naming.createChildName(abstractFactoryName,
data.getName(), NameFactory.JCA_CONNECTION_MANAGER);
+            PoolingAttributes pool = (PoolingAttributes) PortletManager.getManagedBean(actionRequest,
connectionManagerName);
+
+            data.minSize = Integer.toString(pool.getPartitionMinSize());
+            data.maxSize = Integer.toString(pool.getPartitionMaxSize());
+            data.blockingTimeout = Integer.toString(pool.getBlockingTimeoutMilliseconds());
+            data.idleTimeout = Integer.toString(pool.getIdleTimeoutMinutes());
+        } catch (Exception e) {
+            log.error("Cannot load pool data");
+        }
     }
 
     protected void doView(RenderRequest renderRequest, RenderResponse renderResponse) throws
IOException, PortletException {



Mime
View raw message