geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashishj...@apache.org
Subject svn commit: r938356 - in /geronimo/server/branches/2.2/framework/modules: geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/ geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/ geronimo-security/src/main/java/...
Date Tue, 27 Apr 2010 08:26:18 GMT
Author: ashishjain
Date: Tue Apr 27 08:26:18 2010
New Revision: 938356

URL: http://svn.apache.org/viewvc?rev=938356&view=rev
Log:
GEROGERONIMO-5180 This patch creates a dummy method to add the keystores created through java
provided keytool.exe as gbeans in geronimo.


Modified:
    geronimo/server/branches/2.2/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandUnlockKeystore.java
    geronimo/server/branches/2.2/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/KeystoreManager.java
    geronimo/server/branches/2.2/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java

Modified: geronimo/server/branches/2.2/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandUnlockKeystore.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandUnlockKeystore.java?rev=938356&r1=938355&r2=938356&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandUnlockKeystore.java
(original)
+++ geronimo/server/branches/2.2/framework/modules/geronimo-deploy-tool/src/main/java/org/apache/geronimo/deployment/cli/CommandUnlockKeystore.java
Tue Apr 27 08:26:18 2010
@@ -22,6 +22,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.util.Iterator;
 import java.util.Properties;
+import java.util.Set;
 
 import javax.enterprise.deploy.spi.DeploymentManager;
 
@@ -34,6 +35,7 @@ import org.apache.geronimo.deployment.pl
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.NoSuchOperationException;
 
@@ -59,6 +61,20 @@ public class CommandUnlockKeystore exten
         if (dm instanceof RemoteDeploymentManager) {
             kernel = ((RemoteDeploymentManager) dm).getKernel();
         }
+        AbstractNameQuery anq= new AbstractNameQuery("org.apache.geronimo.management.geronimo.KeystoreManager");
+        Set<AbstractName> it=kernel.listGBeans(anq);
+        AbstractName an = (AbstractName) it.iterator().next();
+        try {
+            kernel.invoke(an, "initializeKeystores");
+        } catch (GBeanNotFoundException e1) {
+            throw new DeploymentException("Unable to find the gbean associated with initializeKeystores");
+        } catch (NoSuchOperationException e1) {
+            throw new DeploymentException("Operation initializeKeystores does not exist");
+        } catch (InternalKernelException e1) {
+            throw new DeploymentException();
+        } catch (Exception e1) {
+            throw new DeploymentException();
+        }
         //This implies key store as well as private key or keys has to be unlocked
         if (args.length >= 1) {
             try {

Modified: geronimo/server/branches/2.2/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/KeystoreManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/KeystoreManager.java?rev=938356&r1=938355&r2=938356&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/KeystoreManager.java
(original)
+++ geronimo/server/branches/2.2/framework/modules/geronimo-management/src/main/java/org/apache/geronimo/management/geronimo/KeystoreManager.java
Tue Apr 27 08:26:18 2010
@@ -30,6 +30,12 @@ import javax.net.ssl.SSLContext;
  */
 public interface KeystoreManager {
     /**
+     * Dummy method to add the keystore created through Java provided
+     * Keytool.exe as gbeans in geronimo.
+     */
+    public void initializeKeystores();
+    
+    /**
      * Gets the names of the keystores available in the server.
      */
     public KeystoreInstance[] getKeystores();

Modified: geronimo/server/branches/2.2/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java?rev=938356&r1=938355&r2=938356&view=diff
==============================================================================
--- geronimo/server/branches/2.2/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
(original)
+++ geronimo/server/branches/2.2/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
Tue Apr 27 08:26:18 2010
@@ -112,7 +112,9 @@ public class FileKeystoreManager impleme
 
     public void doFail() {
     }
-
+    public void initializeKeystores() {
+        getKeystores();
+    }
     public String[] listKeystoreFiles() {
         File[] files = directory.listFiles();
         List list = new ArrayList();



Mime
View raw message