Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 66188 invoked from network); 10 Mar 2010 00:45:48 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Mar 2010 00:45:48 -0000 Received: (qmail 89639 invoked by uid 500); 10 Mar 2010 00:45:19 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 89581 invoked by uid 500); 10 Mar 2010 00:45:19 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 89573 invoked by uid 99); 10 Mar 2010 00:45:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Mar 2010 00:45:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Mar 2010 00:45:16 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1359023888CC; Wed, 10 Mar 2010 00:44:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r921198 - in /geronimo/server/trunk/framework/modules: geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/ geronimo-main/src/main/java/org/apache/geronimo/mai... Date: Wed, 10 Mar 2010 00:44:54 -0000 To: scm@geronimo.apache.org From: djencks@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100310004455.1359023888CC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: djencks Date: Wed Mar 10 00:44:54 2010 New Revision: 921198 URL: http://svn.apache.org/viewvc?rev=921198&view=rev Log: add some toString methods and some logging to help figure out what happens during deployment Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Utils.java geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java?rev=921198&r1=921197&r2=921198&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/config/ConfigurationData.java Wed Mar 10 00:44:54 2010 @@ -314,4 +314,16 @@ public class ConfigurationData implement this.useEnvironment = useEnvironment; } + + @Override + public String toString() { + StringBuilder buf = new StringBuilder("ConfigurationData ["); + buf.append("\n Environment: ").append(environment); + buf.append("\n ConfigurationDir: ").append(getConfigurationDir()); + buf.append("\n autoStart: ").append(isAutoStart()); + for (Map.Entry entry: getChildConfigurations().entrySet()) { + buf.append("\n Child at: ").append(entry.getKey()).append(entry.getValue()); + } + return buf.toString(); + } } Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java?rev=921198&r1=921197&r2=921198&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java Wed Mar 10 00:44:54 2010 @@ -206,4 +206,12 @@ public class Environment implements Seri return manifest; } + + @Override + public String toString() { + StringBuilder buf = new StringBuilder("Environment ["); + buf.append("\n Id: ").append(getConfigId()); + buf.append("]\n"); + return buf.toString(); + } } Modified: geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Utils.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Utils.java?rev=921198&r1=921197&r2=921198&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Utils.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/Utils.java Wed Mar 10 00:44:54 2010 @@ -125,7 +125,7 @@ public class Utils { throw new IllegalArgumentException(errPrefix + " '" + path + "' : " + e.getMessage()); } if (!rc.exists()) { - throw new IllegalArgumentException(errPrefix + " '" + path + "' : does not exist"); + throw new IllegalArgumentException(errPrefix + " '" + rc + "' " + " derived from: '" + path + "' : does not exist"); } if (!rc.isDirectory()) { throw new IllegalArgumentException(errPrefix + " '" + path + "' : is not a directory"); Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java?rev=921198&r1=921197&r2=921198&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/ExecutableConfigurationUtil.java Wed Mar 10 00:44:54 2010 @@ -46,11 +46,15 @@ import org.apache.geronimo.gbean.GBeanDa import org.apache.geronimo.gbean.GBeanInfo; import org.apache.geronimo.gbean.GAttributeInfo; import org.apache.geronimo.gbean.GReferenceInfo; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @version $Rev$ $Date$ */ public final class ExecutableConfigurationUtil { + private static final Logger log = LoggerFactory.getLogger(ExecutableConfigurationUtil.class); + private static final String META_INF = "META-INF"; private static final String CONFIG_SER = "config.ser"; private static final String CONFIG_INFO = "config.info"; @@ -68,6 +72,7 @@ public final class ExecutableConfigurati } public static void createExecutableConfiguration(ConfigurationData configurationData, Manifest manifest, File destinationFile) throws IOException { + log.debug("createExecutableConfiguration: id: {} destination: {}", configurationData.getId(), destinationFile.getAbsolutePath()); File configurationDir = configurationData.getConfigurationDir(); // ensure parent directories have been created @@ -166,6 +171,7 @@ public final class ExecutableConfigurati } public static void writeConfiguration(ConfigurationData configurationData, File source) throws IOException { + log.debug("writeConfiguration: id: {} source: {}", configurationData.getId(), source.getAbsolutePath()); // save the persisted form in the source directory File metaInf = new File(source, META_INF); metaInf.mkdirs(); Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java?rev=921198&r1=921197&r2=921198&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/configuration/RepositoryConfigurationStore.java Wed Mar 10 00:44:54 2010 @@ -319,6 +319,7 @@ public class RepositoryConfigurationStor public void install(ConfigurationData configurationData) throws IOException, InvalidConfigException { // determine the source file/dir + log.debug("Writing config: " + configurationData); File source = configurationData.getConfigurationDir(); if (!source.exists()) { throw new InvalidConfigException("Source does not exist " + source); @@ -334,10 +335,14 @@ public class RepositoryConfigurationStor File destination = repository.getLocation(configId); if (!source.equals(destination)) { if (source.isFile()) { + log.debug("copying packed bundle from " + source + " to destination " + destination); repository.copyToRepository(source, configId, null); } else { + log.debug("Packing bundle from " + source + " to destination " + destination); JarUtils.jarDirectory(source, destination); } + } else { + log.debug("Plugin is already in location " + source); } // if directory in the correct place -- noop /* Modified: geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java?rev=921198&r1=921197&r2=921198&view=diff ============================================================================== --- geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java (original) +++ geronimo/server/trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/main/CommandLine.java Wed Mar 10 00:44:54 2010 @@ -22,6 +22,7 @@ import java.io.InputStream; import java.net.URL; import java.util.Collection; import java.util.Enumeration; +import java.util.HashMap; import java.util.List; import java.util.Set; @@ -94,7 +95,13 @@ public class CommandLine { protected void doInvokeMainGBean(AbstractNameQuery mainGBeanQuery, String mainMethod, String[] args) throws Exception { Set matches = kernel.listGBeans(mainGBeanQuery); if (matches.isEmpty()) { - throw new Exception("No match for AbstractNameQuery: " + mainGBeanQuery); + matches = kernel.listGBeans((AbstractNameQuery)null); + StringBuilder b = new StringBuilder("No match for AbstractNameQuery: ").append(mainGBeanQuery); + b.append("\n artifactId: ").append(mainGBeanQuery.getArtifact()); + for (Object o: matches) { + b.append("\n ").append(o); + } + throw new Exception(b.toString()); } if (matches.size() > 1) { throw new Exception("Ambiguous AbstractNameQuery: " + mainGBeanQuery + " matches: " + matches);