String args[] = commandArgs.getArgs();
if (args.length == 0) {
throw new DeploymentException("Specify the key store name to be unlocked");
}
DeploymentManager dm = connection.getDeploymentManager();
Kernel kernel = null;
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) {