admin@glassfish.java.net

Code review

From: Nandini Ektare <Nandini.Ektare_at_Sun.COM>
Date: Tue, 30 Jan 2007 14:36:27 -0800

Please review.

Following were the changes that should have been done for JKS changes
for GF v2. This broke the NodeAgent and Instance sync when master
password was other than changeit.
I will create a bug and add the checkins log after review.

QLs pass.

Thanks,
Nandini

$ cvs diff -u NodeAgent.java
Index: NodeAgent.java
===================================================================
RCS file:
/cvs/glassfish/admin-ee/nodeagent/src/java/com/sun/enterprise/ee/nodeagent/NodeAgent.java,v

retrieving revision 1.6
diff -u -r1.6 NodeAgent.java
--- NodeAgent.java 23 Jan 2007 04:33:03 -0000 1.6
+++ NodeAgent.java 30 Jan 2007 22:16:57 -0000
@@ -1712,7 +1712,12 @@
     private void setPasswords(final AgentConfig ac) {
             ac.put(AgentConfig.K_DAS_USER, IdentityManager.getUser());
             ac.put(AgentConfig.K_DAS_PASSWORD,
IdentityManager.getPassword());
- ac.put(AgentConfig.K_MASTER_PASSWORD,
IdentityManager.getMasterPassword());
+ String mp = IdentityManager.getMasterPassword();
+ ac.put(AgentConfig.K_MASTER_PASSWORD, mp);
+ // Also make sure to have the system properties new JKS
loading will
+ // require in the NodeAgent VM. This was missed during JKS
changes
+ System.setProperty("javax.net.ssl.keyStorePassword", mp);
+ System.setProperty("javax.net.ssl.trustStorePassword", mp);
     }

     private ClientPluggableFeatureFactory getFeatureFactory() {
@@ -1761,6 +1766,10 @@
                    System.getProperty("javax.net.ssl.keyStore"));
                ar.add("-D" + "javax.net.ssl.trustStore" + "=" +
                    System.getProperty("javax.net.ssl.trustStore"));
+ ar.add("-D" + "javax.net.ssl.keyStorePassword" + "=" +
+ System.getProperty("javax.net.ssl.keyStorePassword"));
+ ar.add("-D" + "javax.net.ssl.trustStorePassword" + "=" +
+
System.getProperty("javax.net.ssl.trustStorePassword"));
            }
        } else {
            ar.add("-D" + SystemPropertyConstants.NSS_ROOT_PROPERTY + "=" +