Thanks for your comments. 2011/6/20 Ivan <[email protected]>: > There is a discussion for whether we still need > EditableConfigurationManager, refer to > this http://apache-geronimo.328035.n3.nabble.com/ConfigurationUtil-getEditableConfigurationManager-no-longer-needed-td408784.html > Currently, you could just recover the commented codes, and it should still > work. We might turn to other solutions as stated in the discussion. > > 2011/6/20 Shenghao Fang <[email protected]> >> >> 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 > > > > -- > Ivan >
-- Michael
