geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shenghao Fang <michael1224.f...@gmail.com>
Subject [Discussion] About GERONIMO-6010
Date Mon, 20 Jun 2011 08:16:30 GMT
Hi,

Currently I'm working on Geronimo-6010
[https://issues.apache.org/jira/browse/GERONIMO-6010] and found that
this issue is caused by the change 755494 on FileKeyStoreManager.

Couple of codes are commented out in getKeystore() which makes it
always return null for new created keystore.

Could anyone please give any background about this change? Thanks.

I copy the changes between 755494 and 755493 at below:


Index: D:/Development/Project/geronimo/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
===================================================================
--- D:/Development/Project/geronimo/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
(revision
755493)
+++ D:/Development/Project/geronimo/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
(revision
755494)
@@ -55,9 +55,6 @@
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 import org.apache.geronimo.gbean.GBeanLifecycle;
 import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.config.ConfigurationUtil;
-import org.apache.geronimo.kernel.config.EditableConfigurationManager;
-import org.apache.geronimo.kernel.config.InvalidConfigException;
 import org.apache.geronimo.management.geronimo.KeyIsLocked;
 import org.apache.geronimo.management.geronimo.KeystoreException;
 import org.apache.geronimo.management.geronimo.KeystoreInstance;
@@ -172,21 +169,21 @@
             }
         }
         data.setAttribute("keystoreType", type);
-        EditableConfigurationManager mgr =
ConfigurationUtil.getEditableConfigurationManager(kernel);
-        if(mgr != null) {
-            try {
-                mgr.addGBeanToConfiguration(myName.getArtifact(), data, true);
-                return (KeystoreInstance)
kernel.getProxyManager().createProxy(aName, KeystoreInstance.class);
-            } catch (InvalidConfigException e) {
-                log.error("Should never happen", e);
-                throw new IllegalStateException("Unable to add
Keystore GBean ("+e.getMessage()+")", e);
-            } finally {
-                ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
-            }
-        } else {
+//        EditableConfigurationManager mgr =
ConfigurationUtil.getEditableConfigurationManager(kernel);
+//        if(mgr != null) {
+//            try {
+//                mgr.addGBeanToConfiguration(myName.getArtifact(),
data, true);
+//                return (KeystoreInstance)
kernel.getProxyManager().createProxy(aName, KeystoreInstance.class);
+//            } catch (InvalidConfigException e) {
+//                log.error("Should never happen", e);
+//                throw new IllegalStateException("Unable to add
Keystore GBean ("+e.getMessage()+")", e);
+//            } finally {
+//                ConfigurationUtil.releaseConfigurationManager(kernel, mgr);
+//            }
+//        } else {
             log.warn("The ConfigurationManager in the kernel does not
allow changes at runtime");
             return null;
-        }
+//        }
     }

     /**


-- 
Michael

Mime
View raw message