geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r530842 - /geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
Date Fri, 20 Apr 2007 16:10:39 GMT
Author: vamsic007
Date: Fri Apr 20 09:10:38 2007
New Revision: 530842

URL: http://svn.apache.org/viewvc?view=rev&rev=530842
Log:
Save the attribute only if the value has changed.

Modified:
    geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java

Modified: geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java?view=diff&rev=530842&r1=530841&r2=530842
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-standard/src/main/java/org/apache/geronimo/console/webmanager/ConnectorPortlet.java
Fri Apr 20 09:10:38 2007
@@ -173,9 +173,9 @@
             // Identify and update the connector
             WebConnector connector = PortletManager.getWebConnector(actionRequest, new AbstractName(URI.create(connectorURI)));
             if(connector != null) {
-                connector.setHost(host);
-                connector.setPort(port);
-                connector.setMaxThreads(maxThreads);
+                if(!connector.getHost().equals(host)) connector.setHost(host);
+                if(connector.getPort() != port) connector.setPort(port);
+                if(connector.getMaxThreads() != maxThreads) connector.setMaxThreads(maxThreads);
                 if(connector instanceof SecureConnector) {
                     String keystoreType = actionRequest.getParameter("keystoreType");
                     String keystoreFile = actionRequest.getParameter("keystoreFile");
@@ -188,12 +188,12 @@
                     String truststorePass = actionRequest.getParameter("truststorePassword");
                     boolean clientAuth = isValid(actionRequest.getParameter("clientAuth"));
                     SecureConnector secure = (SecureConnector) connector;
-                    if(isValid(keystoreType)) {secure.setKeystoreType(keystoreType);}
-                    if(isValid(keystoreFile)) {secure.setKeystoreFileName(keystoreFile);}
+                    if(isValid(keystoreType) && !keystoreType.equals(secure.getKeystoreType()))
{secure.setKeystoreType(keystoreType);}
+                    if(isValid(keystoreFile) && !keystoreFile.equals(secure.getKeystoreFileName()))
{secure.setKeystoreFileName(keystoreFile);}
                     if(isValid(keystorePass)) {secure.setKeystorePassword(keystorePass);}
-                    if(isValid(secureProtocol)) {secure.setSecureProtocol(secureProtocol);}
-                    if(isValid(algorithm)) {secure.setAlgorithm(algorithm);}
-                    secure.setClientAuthRequired(clientAuth);
+                    if(isValid(secureProtocol) && !secureProtocol.equals(secure.getSecureProtocol()))
{secure.setSecureProtocol(secureProtocol);}
+                    if(isValid(algorithm) && !algorithm.equals(secure.getAlgorithm()))
{secure.setAlgorithm(algorithm);}
+                    if(clientAuth != secure.isClientAuthRequired()) secure.setClientAuthRequired(clientAuth);
                     if(server.equals(WEB_SERVER_JETTY)) {
                         if(isValid(privateKeyPass)) {setProperty(secure, "keyPassword", privateKeyPass);}
                         String keyStore = actionRequest.getParameter("unlockKeyStore");
@@ -221,9 +221,9 @@
                         setProperty(secure, "trustStore", isValid(trustStore) ? trustStore
: null);
                     }
                     else if (server.equals(WEB_SERVER_TOMCAT)) {
-                        if(isValid(truststoreType)) {setProperty(secure, "truststoreType",
truststoreType);}
+                        if(isValid(truststoreType) && !truststoreType.equals(getProperty(secure,
"truststoreType"))) {setProperty(secure, "truststoreType", truststoreType);}
                         if(isValid(truststorePass)) {setProperty(secure, "truststorePassword",
truststorePass);}
-                        if(isValid(truststoreFile)) {setProperty(secure, "truststoreFileName",
truststoreFile);}
+                        if(isValid(truststoreFile) && !truststoreFile.equals(getProperty(secure,
"truststoreFileName"))) {setProperty(secure, "truststoreFileName", truststoreFile);}
                     }
                     else {
                         //todo:   Handle "should not occur" condition



Mime
View raw message