geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r380190 [1/3] - in /geronimo/branches/configid: applications/console-core/src/java/org/apache/geronimo/console/util/ applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/ applications/console-standard/sr...
Date Thu, 23 Feb 2006 18:30:21 GMT
Author: djencks
Date: Thu Feb 23 10:30:08 2006
New Revision: 380190

URL: http://svn.apache.org/viewcvs?rev=380190&view=rev
Log:
Intermediate checkin to allow Dain to sync his work.

Removed:
    geronimo/branches/configid/configs/executable-deployer/
Modified:
    geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java
    geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/ManagementHelper.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DriverDownloader.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/activemqCF/ActiveMQConnectorHelper.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/CreateDestinationHandler.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
    geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java
    geronimo/branches/configid/configs/j2ee-deployer/project.xml
    geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml
    geronimo/branches/configid/configs/jmxdebug-jetty/project.xml
    geronimo/branches/configid/configs/jmxdebug-jetty/src/plan/plan.xml
    geronimo/branches/configid/configs/jmxdebug-tomcat/src/plan/plan.xml
    geronimo/branches/configid/configs/jsp-examples-jetty/project.xml
    geronimo/branches/configid/configs/ldap-demo-tomcat/src/plan/plan.xml
    geronimo/branches/configid/configs/ldap-realm/src/plan/plan.xml
    geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
    geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
    geronimo/branches/configid/modules/connector-builder/src/test/org/apache/geronimo/connector/deployment/ConnectorModuleBuilderTest.java
    geronimo/branches/configid/modules/deploy-tool/src/java/org/apache/geronimo/deployment/PluginBootstrap.java
    geronimo/branches/configid/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
    geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/EARConfigBuilder.java
    geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ModuleBuilder.java
    geronimo/branches/configid/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/SwitchingModuleBuilder.java
    geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
    geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockConnectorConfigBuilder.java
    geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockEJBConfigBuilder.java
    geronimo/branches/configid/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/MockWARConfigBuilder.java
    geronimo/branches/configid/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
    geronimo/branches/configid/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/PlanParsingTest.java
    geronimo/branches/configid/modules/jetty/src/java/org/apache/geronimo/jetty/JettyWebAppContext.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/Configuration.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationManagerImpl.java
    geronimo/branches/configid/modules/kernel/src/java/org/apache/geronimo/kernel/config/ConfigurationStore.java
    geronimo/branches/configid/modules/kernel/src/test/org/apache/geronimo/kernel/ConfigTest.java
    geronimo/branches/configid/modules/kernel/src/test/org/apache/geronimo/kernel/repository/ArtifactResolverTest.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/ConfigurationDump.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/FileConfigurationList.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/LocalAttributeManager.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/configuration/LocalConfigStore.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/main/CommandLine.java
    geronimo/branches/configid/modules/system/src/java/org/apache/geronimo/system/main/Daemon.java
    geronimo/branches/configid/modules/system/src/test/org/apache/geronimo/system/configuration/LocalConfigStoreTest.java
    geronimo/branches/configid/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
    geronimo/branches/configid/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
    geronimo/branches/configid/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatWebAppContext.java
    geronimo/branches/configid/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/BaseConfigInstaller.java
    geronimo/branches/configid/plugins/geronimo-assembly-plugin/src/java/org/apache/geronimo/plugin/assembly/LocalConfigInstaller.java
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/plugin.jelly
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/MavenConfigStore.java
    geronimo/branches/configid/plugins/geronimo-packaging-plugin/src/java/org/apache/geronimo/plugin/packaging/PackageBuilder.java

Modified: geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java (original)
+++ geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/KernelManagementHelper.java Thu Feb 23 10:30:08 2006
@@ -16,26 +16,6 @@
  */
 package org.apache.geronimo.console.util;
 
-import java.io.IOException;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.HashSet;
-import java.util.Arrays;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.security.auth.Subject;
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.gbean.GBeanQuery;
@@ -45,6 +25,7 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.proxy.ProxyManager;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.management.AppClientModule;
 import org.apache.geronimo.management.EJB;
@@ -84,6 +65,26 @@
 import org.apache.geronimo.system.logging.SystemLog;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.security.auth.Subject;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.NameCallback;
+import javax.security.auth.callback.PasswordCallback;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.spi.LoginModule;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 /**
  * An implementation of the ManagementHelper interface that uses a Geronimo
  * kernel. That may be an in-VM kernel or a remote kernel, we don't really
@@ -1006,7 +1007,7 @@
         }
     }
 
-    public URI getConfigurationNameFor(String objectName) {
+    public Artifact getConfigurationNameFor(String objectName) {
         try {
             Set parents = kernel.getDependencyManager().getParents(ObjectName.getInstance(objectName));
             if(parents.size() == 0) {

Modified: geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/ManagementHelper.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/ManagementHelper.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/ManagementHelper.java (original)
+++ geronimo/branches/configid/applications/console-core/src/java/org/apache/geronimo/console/util/ManagementHelper.java Thu Feb 23 10:30:08 2006
@@ -16,11 +16,7 @@
  */
 package org.apache.geronimo.console.util;
 
-import java.net.URI;
-import java.util.Map;
-import javax.security.auth.Subject;
-import javax.security.auth.login.LoginException;
-import javax.security.auth.spi.LoginModule;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.management.AppClientModule;
 import org.apache.geronimo.management.EJB;
@@ -59,6 +55,11 @@
 import org.apache.geronimo.system.logging.SystemLog;
 import org.apache.geronimo.system.serverinfo.ServerInfo;
 
+import javax.security.auth.Subject;
+import javax.security.auth.login.LoginException;
+import javax.security.auth.spi.LoginModule;
+import java.util.Map;
+
 /**
  * A helper interface to navigate between management objects.  This is not
  * complete; it will be expanded as necessary.
@@ -155,7 +156,7 @@
 
     // Generic utility methods
     Object getObject(String objectName);
-    URI getConfigurationNameFor(String objectName);
+    Artifact getConfigurationNameFor(String objectName);
     String getGBeanDescription(String objectName);
 
     // Misc

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DatabasePoolPortlet.java Thu Feb 23 10:30:08 2006
@@ -16,92 +16,90 @@
  */
 package org.apache.geronimo.console.databasemanager.wizard;
 
-import java.io.IOException;
-import java.io.Serializable;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.File;
-import java.io.BufferedOutputStream;
-import java.io.FileOutputStream;
-import java.io.StringReader;
-import java.io.ByteArrayOutputStream;
-import java.io.FileReader;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Properties;
-import java.net.URISyntaxException;
-import java.net.URI;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.net.MalformedURLException;
-import java.sql.Driver;
-import java.sql.SQLException;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletException;
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.WindowState;
-import javax.portlet.PortletRequest;
-import javax.portlet.PortletSession;
-import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
-import javax.enterprise.deploy.spi.DeploymentManager;
-import javax.enterprise.deploy.spi.DeploymentConfiguration;
-import javax.enterprise.deploy.spi.Target;
-import javax.enterprise.deploy.spi.TargetModuleID;
-import javax.enterprise.deploy.spi.status.ProgressObject;
-import javax.enterprise.deploy.model.DDBeanRoot;
-import javax.enterprise.deploy.model.DDBean;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.DocumentBuilder;
-import org.apache.geronimo.console.BasePortlet;
-import org.apache.geronimo.console.util.PortletManager;
-import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
-import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.kernel.repository.ListableRepository;
-import org.apache.geronimo.kernel.repository.Repository;
-import org.apache.geronimo.kernel.repository.WriteableRepository;
-import org.apache.geronimo.kernel.repository.FileWriteMonitor;
-import org.apache.geronimo.kernel.management.State;
-import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
-import org.apache.geronimo.deployment.tools.loader.ConnectorDeployable;
-import org.apache.geronimo.deployment.xbeans.EnvironmentType;
-import org.apache.geronimo.deployment.xbeans.ArtifactType;
-import org.apache.geronimo.connector.deployment.jsr88.Connector15DCBRoot;
-import org.apache.geronimo.connector.deployment.jsr88.ConnectorDCB;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.portlet.PortletFileUpload;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.connector.deployment.jsr88.Artifact;
-import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapter;
+import org.apache.geronimo.connector.deployment.jsr88.ConfigPropertySetting;
 import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinition;
 import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinitionInstance;
-import org.apache.geronimo.connector.deployment.jsr88.ConfigPropertySetting;
 import org.apache.geronimo.connector.deployment.jsr88.ConnectionManager;
+import org.apache.geronimo.connector.deployment.jsr88.Connector15DCBRoot;
+import org.apache.geronimo.connector.deployment.jsr88.ConnectorDCB;
+import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapter;
 import org.apache.geronimo.connector.deployment.jsr88.SinglePool;
 import org.apache.geronimo.connector.outbound.PoolingAttributes;
+import org.apache.geronimo.console.BasePortlet;
+import org.apache.geronimo.console.util.PortletManager;
 import org.apache.geronimo.converter.DatabaseConversionStatus;
 import org.apache.geronimo.converter.JDBCPool;
 import org.apache.geronimo.converter.bea.WebLogic81DatabaseConverter;
 import org.apache.geronimo.converter.jboss.JBoss4DatabaseConverter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.fileupload.portlet.PortletFileUpload;
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
-import org.apache.commons.fileupload.FileItem;
+import org.apache.geronimo.deployment.tools.loader.ConnectorDeployable;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
+import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
+import org.apache.geronimo.kernel.repository.FileWriteMonitor;
+import org.apache.geronimo.kernel.repository.ListableRepository;
+import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.repository.WriteableRepository;
+import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
+import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
 import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 import org.xml.sax.InputSource;
 
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.model.DDBeanRoot;
+import javax.enterprise.deploy.spi.DeploymentConfiguration;
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.Target;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.sql.Connection;
+import java.sql.DatabaseMetaData;
+import java.sql.Driver;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.SortedSet;
+
 /**
  * A portlet that lets you configure and deploy JDBC connection pools.
  *
@@ -464,7 +462,7 @@
     private ResourceAdapterParams loadConfigPropertiesByPath(PortletRequest request, String rarPath) {
         DeploymentManager mgr = PortletManager.getDeploymentManager(request);
         try {
-            URL url = getRAR(request, rarPath);
+            URL url = getRAR(request, rarPath).toURL();
             ConnectorDeployable deployable = new ConnectorDeployable(url);
             final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
             String adapterName = null, adapterDesc = null;
@@ -746,7 +744,7 @@
         for (int i = 0; i < repos.length; i++) {
             ListableRepository repo = repos[i];
 
-            List artifacts = repo.list();
+            SortedSet artifacts = repo.list();
             outer:
             for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
                 Artifact artifact = (Artifact) iterator.next();
@@ -824,7 +822,7 @@
             data.name = data.name.replaceAll("\\s", "");
             DeploymentManager mgr = PortletManager.getDeploymentManager(request);
             try {
-                URL url = getRAR(request, data.getRarPath());
+                URL url = getRAR(request, data.getRarPath()).toURL();
                 String str = url.toString();
                 if(str.indexOf(' ') > -1) {
                     url = new URL(str.replaceAll(" ", "%20")); // try to avoid problems with spaces in path on Windows
@@ -834,31 +832,32 @@
                 final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                 Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                 ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);
-                connector.setConfigID("console-db-pool-"+data.getName());
+//TODO configid FIXME!!
+//                connector.setConfigID("console-db-pool-"+data.getName());
                 // Use a parentId of null to pick up the default
-                if(data.jar1 != null && !data.jar1.equals("")) {
-                    Artifact dep = new Artifact();
-                    connector.setDependency(new Artifact[]{dep});
-                    dep.setURI(data.jar1);
-                }
-                if(data.jar2 != null && !data.jar2.equals("")) {
-                    Artifact dep = new Artifact();
-                    Artifact[] old = connector.getDependency();
-                    Artifact[] longer = new Artifact[old.length+1];
-                    System.arraycopy(old, 0, longer, 0, old.length);
-                    longer[old.length] = dep;
-                    connector.setDependency(longer);
-                    dep.setURI(data.jar2);
-                }
-                if(data.jar3 != null && !data.jar3.equals("")) {
-                    Artifact dep = new Artifact();
-                    Artifact[] old = connector.getDependency();
-                    Artifact[] longer = new Artifact[old.length+1];
-                    System.arraycopy(old, 0, longer, 0, old.length);
-                    longer[old.length] = dep;
-                    connector.setDependency(longer);
-                    dep.setURI(data.jar3);
-                }
+//                if(data.jar1 != null && !data.jar1.equals("")) {
+//                    Artifact dep = new Artifact();
+//                    connector.setDependency(new Artifact[]{dep});
+//                    dep.setURI(data.jar1);
+//                }
+//                if(data.jar2 != null && !data.jar2.equals("")) {
+//                    Artifact dep = new Artifact();
+//                    Artifact[] old = connector.getDependency();
+//                    Artifact[] longer = new Artifact[old.length+1];
+//                    System.arraycopy(old, 0, longer, 0, old.length);
+//                    longer[old.length] = dep;
+//                    connector.setDependency(longer);
+//                    dep.setURI(data.jar2);
+//                }
+//                if(data.jar3 != null && !data.jar3.equals("")) {
+//                    Artifact dep = new Artifact();
+//                    Artifact[] old = connector.getDependency();
+//                    Artifact[] longer = new Artifact[old.length+1];
+//                    System.arraycopy(old, 0, longer, 0, old.length);
+//                    longer[old.length] = dep;
+//                    connector.setDependency(longer);
+//                    dep.setURI(data.jar3);
+//                }
                 ResourceAdapter adapter = connector.getResourceAdapter()[0];
                 ConnectionDefinition definition = new ConnectionDefinition();
                 adapter.setConnectionDefinition(new ConnectionDefinition[]{definition});
@@ -988,24 +987,17 @@
         return (ImportStatus) request.getPortletSession(true).getAttribute("ImportStatus");
     }
 
-    private static URL getRAR(PortletRequest request, String rarPath) {
-        try {
-            URI uri = new URI(rarPath);
-            Repository[] repos = PortletManager.getRepositories(request);
-            for (int i = 0; i < repos.length; i++) {
-                Repository repo = repos[i];
-                URL url = repo.getURL(uri);
-                if(url != null && url.getProtocol().equals("file")) {
-                    File file = new File(url.getPath());
-                    if(file.exists() && file.canRead() && !file.isDirectory()) {
-                        return url;
-                    }
+    private static File getRAR(PortletRequest request, String rarPath) {
+        org.apache.geronimo.kernel.repository.Artifact uri = org.apache.geronimo.kernel.repository.Artifact.create(rarPath);
+        Repository[] repos = PortletManager.getRepositories(request);
+        for (int i = 0; i < repos.length; i++) {
+            Repository repo = repos[i];
+            File url = repo.getLocation(uri);
+            if (url != null) {
+                if (url.exists() && url.canRead() && !url.isDirectory()) {
+                    return url;
                 }
             }
-        } catch (URISyntaxException e) {
-            e.printStackTrace();
-        } catch (MalformedURLException e) {
-            e.printStackTrace();
         }
         return null;
     }
@@ -1017,31 +1009,31 @@
     private static Class attemptDriverLoad(PortletRequest request, PoolData data) {
         List list = new ArrayList();
         try {
-            URI one = data.getJar1() == null ? null : new URI(data.getJar1());
-            URI two = data.getJar2() == null ? null : new URI(data.getJar2());
-            URI three = data.getJar3() == null ? null : new URI(data.getJar3());
+            org.apache.geronimo.kernel.repository.Artifact one = data.getJar1() == null ? null : org.apache.geronimo.kernel.repository.Artifact.create(data.getJar1());
+            org.apache.geronimo.kernel.repository.Artifact two = data.getJar2() == null ? null : org.apache.geronimo.kernel.repository.Artifact.create(data.getJar2());
+            org.apache.geronimo.kernel.repository.Artifact three = data.getJar3() == null ? null : org.apache.geronimo.kernel.repository.Artifact.create(data.getJar3());
 
             ListableRepository[] repos = PortletManager.getListableRepositories(request);
             for (int i = 0; i < repos.length; i++) {
                 ListableRepository repo = repos[i];
                 if(one != null) {
-                    URL url = repo.getURL(one);
+                    File url = repo.getLocation(one);
                     if(url != null) {
-                        list.add(url);
+                        list.add(url.toURL());
                         one = null;
                     }
                 }
                 if(two != null) {
-                    URL url = repo.getURL(two);
+                    File url = repo.getLocation(two);
                     if(url != null) {
-                        list.add(url);
+                        list.add(url.toURL());
                         two = null;
                     }
                 }
                 if(three != null) {
-                    URL url = repo.getURL(three);
+                    File url = repo.getLocation(three);
                     if(url != null) {
-                        list.add(url);
+                        list.add(url.toURL());
                         three = null;
                     }
                 }

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DriverDownloader.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DriverDownloader.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DriverDownloader.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/databasemanager/wizard/DriverDownloader.java Thu Feb 23 10:30:08 2006
@@ -16,6 +16,12 @@
  */
 package org.apache.geronimo.console.databasemanager.wizard;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.FileWriteMonitor;
+import org.apache.geronimo.kernel.repository.WriteableRepository;
+
 import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
@@ -23,8 +29,6 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -36,10 +40,6 @@
 import java.util.Set;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.geronimo.kernel.repository.FileWriteMonitor;
-import org.apache.geronimo.kernel.repository.WriteableRepository;
 
 /**
  * A utility that handles listing and downloading available JDBC driver JARs.
@@ -117,67 +117,69 @@
      * Downloads a driver and loads it into the local repository.
      */
     public void loadDriver(WriteableRepository repo, DriverInfo driver, FileWriteMonitor monitor) throws IOException {
-        try {
-            int urlIndex = 0;
-            if(driver.urls.length > 1) {
-                if(random == null) {
-                    random = new Random();
-                }
-                urlIndex = random.nextInt(driver.urls.length);
-            }
-            URL url = driver.urls[urlIndex];
-            InputStream in;
-            String uri = driver.getRepositoryURI();
-            if(driver.unzipPath != null) {
-                byte[] buf = new byte[1024];
-                int size;
-                int total = 0;
-                int threshold = 10240;
-                InputStream net = url.openStream();
-                JarFile jar = null;
-                File download = null;
+        int urlIndex = 0;
+        if (driver.urls.length > 1) {
+            if (random == null) {
+                random = new Random();
+            }
+            urlIndex = random.nextInt(driver.urls.length);
+        }
+        URL url = driver.urls[urlIndex];
+        InputStream in;
+        String uri = driver.getRepositoryURI();
+        if (driver.unzipPath != null) {
+            byte[] buf = new byte[1024];
+            int size;
+            int total = 0;
+            int threshold = 10240;
+            InputStream net = url.openStream();
+            JarFile jar = null;
+            File download = null;
+            try {
+                download = File.createTempFile("geronimo-driver-download", ".zip");
+                OutputStream out = new BufferedOutputStream(new FileOutputStream(download));
+                if (monitor != null) {
+                    monitor.writeStarted("Download driver archive to " + download);
+                }
                 try {
-                    download = File.createTempFile("geronimo-driver-download", ".zip");
-                    OutputStream out = new BufferedOutputStream(new FileOutputStream(download));
-                    if(monitor != null) {
-                        monitor.writeStarted("Download driver archive to "+download);
-                    }
-                    try {
-                        while((size = net.read(buf)) > -1) {
-                            out.write(buf, 0, size);
-                            if(monitor != null) {
-                                total += size;
-                                if(total > threshold) {
-                                    monitor.writeProgress(total);
-                                    threshold += 10240;
-                                }
+                    while ((size = net.read(buf)) > -1) {
+                        out.write(buf, 0, size);
+                        if (monitor != null) {
+                            total += size;
+                            if (total > threshold) {
+                                monitor.writeProgress(total);
+                                threshold += 10240;
                             }
                         }
-                        out.flush();
-                        out.close();
-                    } finally {
-                        if(monitor != null) {
-                            monitor.writeComplete(total);
-                        }
-                    }
-                    jar = new JarFile(download);
-                    JarEntry entry = jar.getJarEntry(driver.unzipPath);
-                    if(entry == null) {
-                        log.error("Cannot extract driver JAR "+driver.unzipPath+" from download file "+url);
-                    } else {
-                        in = jar.getInputStream(entry);
-                        repo.copyToRepository(in, new URI(uri), monitor);
                     }
+                    out.flush();
+                    out.close();
                 } finally {
-                    if(jar != null) try{jar.close();}catch(IOException e) {log.error("Unable to close JAR file", e);}
-                    if(download != null) {download.delete();}
+                    if (monitor != null) {
+                        monitor.writeComplete(total);
+                    }
+                }
+                jar = new JarFile(download);
+                JarEntry entry = jar.getJarEntry(driver.unzipPath);
+                if (entry == null) {
+                    log.error("Cannot extract driver JAR " + driver.unzipPath + " from download file " + url);
+                } else {
+                    in = jar.getInputStream(entry);
+                    repo.copyToRepository(in, Artifact.create(uri), monitor);
+                }
+            } finally {
+                if (jar != null) try {
+                    jar.close();
+                } catch (IOException e) {
+                    log.error("Unable to close JAR file", e);
+                }
+                if (download != null) {
+                    download.delete();
                 }
-            } else {
-                in = url.openStream();
-                repo.copyToRepository(in, new URI(uri), monitor);
             }
-        } catch (URISyntaxException e) {
-            throw new IOException("Unable to save to repository URI: "+e.getMessage());
+        } else {
+            in = url.openStream();
+            repo.copyToRepository(in, Artifact.create(uri), monitor);
         }
     }
 

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/activemqCF/ActiveMQConnectorHelper.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/activemqCF/ActiveMQConnectorHelper.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/activemqCF/ActiveMQConnectorHelper.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/activemqCF/ActiveMQConnectorHelper.java Thu Feb 23 10:30:08 2006
@@ -17,19 +17,6 @@
 
 package org.apache.geronimo.console.jmsmanager.activemqCF;
 
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.net.URISyntaxException;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import javax.portlet.PortletRequest;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.common.DeploymentException;
@@ -42,6 +29,20 @@
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ListableRepository;
 
+import javax.portlet.PortletRequest;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.net.URISyntaxException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedSet;
+
 public class ActiveMQConnectorHelper {
     //todo: this class is horrible and needs to be burned!
     private final static Log log = LogFactory.getLog(ActiveMQConnectorHelper.class);
@@ -184,7 +185,7 @@
         List dependencies = new ArrayList();
         for (int i = 0; i < repo.length; i++) {
             ListableRepository repository = repo[i];
-            List artifacts = repository.list();
+            SortedSet artifacts = repository.list();
             for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
                 Artifact artifact = (Artifact) iterator.next();
                 dependencies.add(artifact.toString());

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/CreateDestinationHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/CreateDestinationHandler.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/CreateDestinationHandler.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/handlers/CreateDestinationHandler.java Thu Feb 23 10:30:08 2006
@@ -21,9 +21,9 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.connector.AdminObjectWrapper;
 import org.apache.geronimo.connector.AdminObjectWrapperGBean;
+import org.apache.geronimo.console.GeronimoVersion;
 import org.apache.geronimo.console.core.jms.TopicBrowserGBean;
 import org.apache.geronimo.console.jmsmanager.AbstractJMSManager;
-import org.apache.geronimo.console.GeronimoVersion;
 import org.apache.geronimo.gbean.DynamicGAttributeInfo;
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
@@ -45,11 +45,11 @@
 import java.io.File;
 import java.io.IOException;
 import java.net.URI;
+import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.List;
 import java.util.Collections;
-import java.util.ArrayList;
 import java.util.LinkedHashSet;
+import java.util.List;
 
 public class CreateDestinationHandler extends AbstractJMSManager implements PortletResponseHandler {
     protected static Log log = LogFactory
@@ -141,6 +141,8 @@
 
                 gbeans.add(tBrowserBeanData);
             }
+            //TODO configid FIXME set configurationDir correctly
+            File configurationDir = null;
             ConfigurationData configData = new ConfigurationData(ConfigurationModuleType.SERVICE,
                     new LinkedHashSet(),
                     gbeans,

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/AbstractHandler.java Thu Feb 23 10:30:08 2006
@@ -16,39 +16,47 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
-import javax.portlet.*;
-import javax.enterprise.deploy.spi.DeploymentManager;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.connector.deployment.jsr88.AdminObjectDCB;
+import org.apache.geronimo.connector.deployment.jsr88.AdminObjectInstance;
+import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinition;
+import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinitionInstance;
+import org.apache.geronimo.connector.deployment.jsr88.Connector15DCBRoot;
+import org.apache.geronimo.connector.deployment.jsr88.ConnectorDCB;
+import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapter;
+import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapterInstance;
+import org.apache.geronimo.connector.deployment.jsr88.SinglePool;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.deployment.tools.loader.ConnectorDeployable;
+import org.apache.geronimo.naming.deployment.jsr88.GBeanLocator;
+
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.model.DDBeanRoot;
 import javax.enterprise.deploy.spi.DeploymentConfiguration;
+import javax.enterprise.deploy.spi.DeploymentManager;
 import javax.enterprise.deploy.spi.Target;
 import javax.enterprise.deploy.spi.TargetModuleID;
 import javax.enterprise.deploy.spi.status.ProgressObject;
-import javax.enterprise.deploy.model.DDBeanRoot;
-import javax.enterprise.deploy.model.DDBean;
-import java.io.IOException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.BufferedOutputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.File;
-import java.io.BufferedOutputStream;
 import java.io.FileOutputStream;
-import java.util.Properties;
-import java.util.List;
+import java.io.IOException;
+import java.net.URL;
 import java.util.ArrayList;
-import java.util.Map;
 import java.util.Iterator;
-import java.net.URL;
-import org.apache.geronimo.console.util.PortletManager;
-import org.apache.geronimo.deployment.tools.loader.ConnectorDeployable;
-import org.apache.geronimo.connector.deployment.jsr88.Connector15DCBRoot;
-import org.apache.geronimo.connector.deployment.jsr88.ConnectorDCB;
-import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapter;
-import org.apache.geronimo.connector.deployment.jsr88.ResourceAdapterInstance;
-import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinition;
-import org.apache.geronimo.connector.deployment.jsr88.ConnectionDefinitionInstance;
-import org.apache.geronimo.connector.deployment.jsr88.SinglePool;
-import org.apache.geronimo.connector.deployment.jsr88.AdminObjectDCB;
-import org.apache.geronimo.connector.deployment.jsr88.AdminObjectInstance;
-import org.apache.geronimo.naming.deployment.jsr88.GBeanLocator;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
 
 /**
  * Base class for portlet helpers
@@ -523,10 +531,11 @@
                 final DDBeanRoot ddBeanRoot = deployable.getDDBeanRoot();
                 Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                 ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);
-                connector.setConfigID("console-jms-"+data.instanceName);
-                if(!isEmpty(data.dependency)) {
-                    connector.setParentID(data.dependency);
-                }
+//TODO FIXME configid
+//                connector.setConfigID("console-jms-"+data.instanceName);
+//                if(!isEmpty(data.dependency)) {
+//                    connector.setParentID(data.dependency);
+//                }
 
                 // Basic settings on RA plan and RA instance
                 ResourceAdapter ra;

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/jmsmanager/wizard/SelectProviderHandler.java Thu Feb 23 10:30:08 2006
@@ -16,19 +16,20 @@
  */
 package org.apache.geronimo.console.jmsmanager.wizard;
 
-import java.io.IOException;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.net.URI;
-import java.net.URISyntaxException;
+import org.apache.geronimo.console.util.PortletManager;
+import org.apache.geronimo.kernel.repository.ListableRepository;
+
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletException;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;
-import org.apache.geronimo.kernel.repository.ListableRepository;
-import org.apache.geronimo.console.util.PortletManager;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.SortedSet;
 
 /**
  * Handler for the screen where you select a JMS provider (because
@@ -53,11 +54,11 @@
 
     public String actionAfterView(ActionRequest request, ActionResponse response, JMSResourceData data) throws PortletException, IOException {
         String rar = request.getParameter(RAR_FILE_PARAMETER);
-        if(isEmpty(rar)) {
-            return SELECT_PROVIDER_MODE+BEFORE_ACTION;
+        if (isEmpty(rar)) {
+            return SELECT_PROVIDER_MODE + BEFORE_ACTION;
         }
         data.setRarURI(rar);
-        return CONFIGURE_RA_MODE+BEFORE_ACTION;
+        return CONFIGURE_RA_MODE + BEFORE_ACTION;
     }
 
     private void loadRARList(RenderRequest renderRequest) {
@@ -66,27 +67,20 @@
         ListableRepository[] repos = PortletManager.getListableRepositories(renderRequest);
         for (int i = 0; i < repos.length; i++) {
             ListableRepository repo = repos[i];
-            try {
-                final URI[] uris = repo.listURIs();
-                outer:
-                for (int j = 0; j < uris.length; j++) {
-                    if(uris[j] == null) {
-                        continue; // probably a JAR lacks a version number in the name, etc.
-                    }
-                    String test = uris[j].toString();
-                    if(!test.endsWith("/rar")) { //todo: may need to change this logic if configId format changes
-                        continue;
-                    }
-                    for (int k = 0; k < SKIP_RARS_CONTAINING.length; k++) {
-                        String skip = SKIP_RARS_CONTAINING[k];
-                        if(test.indexOf(skip) > -1) {
-                            continue outer;
-                        }
+            final SortedSet artifacts = repo.list();
+            outer:
+            for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
+                String test = iterator.next().toString();
+                if (!test.endsWith("/rar")) { //todo: may need to change this logic if configId format changes
+                    continue;
+                }
+                for (int k = 0; k < SKIP_RARS_CONTAINING.length; k++) {
+                    String skip = SKIP_RARS_CONTAINING[k];
+                    if (test.indexOf(skip) > -1) {
+                        continue outer;
                     }
-                    list.add(test);
                 }
-            } catch (URISyntaxException e) {
-                e.printStackTrace();
+                list.add(test);
             }
         }
         Collections.sort(list);

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/repository/RepositoryViewPortlet.java Thu Feb 23 10:30:08 2006
@@ -27,6 +27,7 @@
 import org.apache.geronimo.console.util.PortletManager;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.FileWriteMonitor;
 import org.apache.geronimo.kernel.repository.ListableRepository;
 import org.apache.geronimo.kernel.repository.WriteableRepository;
@@ -42,13 +43,12 @@
 import javax.portlet.WindowState;
 import java.io.File;
 import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.SortedSet;
 
 public class RepositoryViewPortlet extends BasePortlet {
 
@@ -73,11 +73,10 @@
     }
 
     public void processAction(ActionRequest actionRequest,
-            ActionResponse actionResponse) throws PortletException, IOException {
+                              ActionResponse actionResponse) throws PortletException, IOException {
         try {
 
 
-
             List list = new ArrayList();
             WriteableRepository repo = PortletManager.getWritableRepositories(actionRequest)[0];
 
@@ -109,20 +108,19 @@
                             String fileChar = "\\";
                             int fileNameIndex = name.lastIndexOf(fileChar);
                             if (fileNameIndex == -1) {
-                               fileChar = "/";
-                               fileNameIndex = name.lastIndexOf(fileChar);
+                                fileChar = "/";
+                                fileNameIndex = name.lastIndexOf(fileChar);
                             }
                             if (fileNameIndex != -1) {
-                               basename = name.substring(fileNameIndex + 1);
-                            }
-                            else {
-                               basename = name;
+                                basename = name.substring(fileNameIndex + 1);
+                            } else {
+                                basename = name;
                             }
 
                             // Create the temporary file to be used for import to the server
                             file = File.createTempFile("geronimo-import", "");
                             file.deleteOnExit();
-                            log.debug("Writing repository import file to "+file.getAbsolutePath());
+                            log.debug("Writing repository import file to " + file.getAbsolutePath());
                         }
 
                         if ("local".equals(fieldName)) {
@@ -136,7 +134,7 @@
                                 throw new PortletException(e);
                             }
                         }
-                    // This is not the file itself, but one of the form fields for the URI
+                        // This is not the file itself, but one of the form fields for the URI
                     } else {
                         String fieldName = item.getFieldName().trim();
                         if ("group".equals(fieldName)) {
@@ -151,11 +149,10 @@
                     }
                 }
 
-                String uri = group + "/" + artifact + "/" + version + "/" + fileType;
 
-                repo.copyToRepository(file, new URI(uri), new FileWriteMonitor() {
+                repo.copyToRepository(file, new Artifact(group, artifact, version, fileType), new FileWriteMonitor() {
                     public void writeStarted(String fileDescription) {
-                        System.out.print("Copying into repository "+fileDescription+"...");
+                        System.out.print("Copying into repository " + fileDescription + "...");
                         System.out.flush();
                     }
 
@@ -168,8 +165,6 @@
                 });
             } catch (FileUploadException e) {
                 throw new PortletException(e);
-            } catch (URISyntaxException e) {
-                throw new IOException("Unable to save to repository URI: "+e.getMessage());
             }
         } catch (PortletException e) {
             throw e;
@@ -188,17 +183,10 @@
             ListableRepository[] repos = PortletManager.getListableRepositories(request);
             for (int i = 0; i < repos.length; i++) {
                 ListableRepository repo = repos[i];
-                try {
-                    final URI[] uris = repo.listURIs();
-                    for (int j = 0; j < uris.length; j++) {
-                        if(uris[j] == null) {
-                            continue; // probably a JAR lacks a version number in the name, etc.
-                        }
-                        String fileName = uris[j].toString();
-                        list.add(fileName);
-                    }
-                } catch (URISyntaxException e) {
-                    e.printStackTrace();
+                final SortedSet artifacts = repo.list();
+                for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
+                    String fileName = iterator.next().toString();
+                    list.add(fileName);
                 }
             }
             Collections.sort(list);

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/securitymanager/realm/SecurityRealmPortlet.java Thu Feb 23 10:30:08 2006
@@ -16,56 +16,15 @@
  */
 package org.apache.geronimo.console.securitymanager.realm;
 
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.Serializable;
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import javax.enterprise.deploy.spi.DeploymentManager;
-import javax.enterprise.deploy.spi.Target;
-import javax.enterprise.deploy.spi.TargetModuleID;
-import javax.enterprise.deploy.spi.status.ProgressObject;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequest;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.PortletSession;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.WindowState;
-import javax.security.auth.Subject;
-import javax.security.auth.spi.LoginModule;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.console.BasePortlet;
 import org.apache.geronimo.console.util.PortletManager;
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.AttributeType;
-import org.apache.geronimo.deployment.xbeans.ClassloaderType;
 import org.apache.geronimo.deployment.xbeans.ConfigurationDocument;
 import org.apache.geronimo.deployment.xbeans.ConfigurationType;
+import org.apache.geronimo.deployment.xbeans.DependenciesType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.deployment.xbeans.ReferenceType;
@@ -91,6 +50,48 @@
 import org.apache.xmlbeans.XmlObject;
 import org.apache.xmlbeans.XmlOptions;
 
+import javax.enterprise.deploy.spi.DeploymentManager;
+import javax.enterprise.deploy.spi.Target;
+import javax.enterprise.deploy.spi.TargetModuleID;
+import javax.enterprise.deploy.spi.status.ProgressObject;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.portlet.PortletRequestDispatcher;
+import javax.portlet.PortletSession;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.WindowState;
+import javax.security.auth.Subject;
+import javax.security.auth.spi.LoginModule;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Serializable;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.SortedSet;
+
 /**
  * A portlet that lists, creates, and edits security realms.
  *
@@ -325,8 +326,8 @@
         // Use a parentId of null to pick up the default
         // Dependencies
         if(data.getJar() != null) {
-            ClassloaderType classloaderType = environment.addNewClassloader();
-            ArtifactType artifactType = classloaderType.addNewDependency();
+            DependenciesType dependenciesType = environment.addNewDependencies();
+            ArtifactType artifactType = dependenciesType.addNewDependency();
             Artifact artifact = Artifact.create(data.getJar());
             artifactType.setGroupId(artifact.getGroupId());
             artifactType.setArtifactId(artifact.getArtifactId());
@@ -388,14 +389,14 @@
                             if(testName.equals(poolName) && testApp.equals(appName)) {
                                 String moduleName = objectName.getKeyProperty(NameFactory.JCA_RESOURCE);
 
-                                ClassloaderType classloader;
-                                if (environment.isSetClassloader()) {
-                                    classloader = environment.getClassloader();
+                                DependenciesType dependenciesType;
+                                if (environment.isSetDependencies()) {
+                                    dependenciesType = environment.getDependencies();
                                 } else {
-                                    classloader = environment.addNewClassloader();
+                                    dependenciesType = environment.addNewDependencies();
                                 }
 
-                                ArtifactType artifactType = classloader.addNewImport();
+                                ArtifactType artifactType = dependenciesType.addNewDependency();
                                 Artifact artifact = Artifact.create(moduleName);
                                 artifactType.setGroupId(artifact.getGroupId());
                                 artifactType.setArtifactId(artifact.getArtifactId());
@@ -625,7 +626,7 @@
         for (int i = 0; i < repos.length; i++) {
             ListableRepository repo = repos[i];
 
-            List artifacts = repo.list();
+            SortedSet artifacts = repo.list();
             outer:
             for (Iterator iterator = artifacts.iterator(); iterator.hasNext();) {
                 Artifact artifact = (Artifact) iterator.next();

Modified: geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java (original)
+++ geronimo/branches/configid/applications/console-standard/src/java/org/apache/geronimo/console/util/PortletManager.java Thu Feb 23 10:30:08 2006
@@ -22,13 +22,26 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.KernelRegistry;
 import org.apache.geronimo.kernel.proxy.GeronimoManagedBean;
+import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.ListableRepository;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.kernel.repository.WriteableRepository;
-import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.management.J2EEDomain;
 import org.apache.geronimo.management.ResourceAdapter;
-import org.apache.geronimo.management.geronimo.*;
+import org.apache.geronimo.management.geronimo.EJBManager;
+import org.apache.geronimo.management.geronimo.J2EEServer;
+import org.apache.geronimo.management.geronimo.JCAAdminObject;
+import org.apache.geronimo.management.geronimo.JCAManagedConnectionFactory;
+import org.apache.geronimo.management.geronimo.JCAResource;
+import org.apache.geronimo.management.geronimo.JMSBroker;
+import org.apache.geronimo.management.geronimo.JMSConnector;
+import org.apache.geronimo.management.geronimo.JMSManager;
+import org.apache.geronimo.management.geronimo.JVM;
+import org.apache.geronimo.management.geronimo.ResourceAdapterModule;
+import org.apache.geronimo.management.geronimo.WebAccessLog;
+import org.apache.geronimo.management.geronimo.WebConnector;
+import org.apache.geronimo.management.geronimo.WebContainer;
+import org.apache.geronimo.management.geronimo.WebManager;
 import org.apache.geronimo.pool.GeronimoExecutor;
 import org.apache.geronimo.security.realm.SecurityRealm;
 import org.apache.geronimo.system.logging.SystemLog;
@@ -44,16 +57,12 @@
 import javax.security.auth.Subject;
 import javax.security.auth.login.LoginException;
 import javax.security.auth.spi.LoginModule;
-import javax.servlet.http.HttpSession;
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.net.URI;
-import java.net.URL;
-import java.net.URISyntaxException;
-import java.net.MalformedURLException;
-import java.io.File;
 
 /**
  * @version $Rev$ $Date$
@@ -414,7 +423,7 @@
         return (GeronimoManagedBean) helper.getObject(name);
     }
 
-    public static URI getConfigurationFor(PortletRequest request, String objectName) {
+    public static Artifact getConfigurationFor(PortletRequest request, String objectName) {
         ManagementHelper helper = getManagementHelper(request);
         return helper.getConfigurationNameFor(objectName);
     }

Modified: geronimo/branches/configid/configs/j2ee-deployer/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/j2ee-deployer/project.xml?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/configs/j2ee-deployer/project.xml (original)
+++ geronimo/branches/configid/configs/j2ee-deployer/project.xml Thu Feb 23 10:30:08 2006
@@ -51,6 +51,15 @@
                  <geronimo.import>true</geronimo.import>
              </properties>
     </dependency>
+    <dependency>
+        <groupId>geronimo</groupId>
+        <type>car</type>
+        <artifactId>client</artifactId>
+        <version>${pom.currentVersion}</version>
+            <properties>
+                 <geronimo.import>true</geronimo.import>
+             </properties>
+    </dependency>
 
         <!-- dependencies from gbean-deployer needed as maven adds service builder to the maven.root classloader -->
         <dependency>

Modified: geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/jetty-deployer/src/plan/plan.xml Thu Feb 23 10:30:08 2006
@@ -39,9 +39,6 @@
             <module>${pom.groupId}/j2ee-deployer/${pom.currentVersion}/car</module>
             <name>WebServiceBuilder</name>
         </reference>
-        <reference name="Repository">
-            <gbean-name>*:name=Repository,*</gbean-name>
-        </reference>
         <xml-attribute name="defaultEnvironment">
             <environment xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
                 <dependencies>

Modified: geronimo/branches/configid/configs/jmxdebug-jetty/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/jmxdebug-jetty/project.xml?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/configs/jmxdebug-jetty/project.xml (original)
+++ geronimo/branches/configid/configs/jmxdebug-jetty/project.xml Thu Feb 23 10:30:08 2006
@@ -60,6 +60,15 @@
         </dependency>
 
         <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>${commons_collections_version}</version>
+            <properties>
+                <geronimo.dependency>true</geronimo.dependency>
+            </properties>
+        </dependency>
+        
+        <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-system</artifactId>
             <version>${geronimo_version}</version>

Modified: geronimo/branches/configid/configs/jmxdebug-jetty/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/jmxdebug-jetty/src/plan/plan.xml?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/configs/jmxdebug-jetty/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/jmxdebug-jetty/src/plan/plan.xml Thu Feb 23 10:30:08 2006
@@ -1,12 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<web-app
-    xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1"
-
-    >
-
-    <dependency>
-        <uri>commons-collections/commons-collections/${commons_collections_version}/jar</uri>
-    </dependency>
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.1">
 
     <context-root>/debug-tool</context-root>
     <context-priority-classloader>false</context-priority-classloader>

Modified: geronimo/branches/configid/configs/jmxdebug-tomcat/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/jmxdebug-tomcat/src/plan/plan.xml?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/configs/jmxdebug-tomcat/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/jmxdebug-tomcat/src/plan/plan.xml Thu Feb 23 10:30:08 2006
@@ -1,12 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<web-app
-    xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"
-
-    >
-
-    <dependency>
-        <uri>commons-collections/commons-collections/${commons_collections_version}/jar</uri>
-    </dependency>
+<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1">
 
     <context-root>/debug-tool</context-root>
     <context-priority-classloader>false</context-priority-classloader>

Modified: geronimo/branches/configid/configs/jsp-examples-jetty/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/jsp-examples-jetty/project.xml?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/configs/jsp-examples-jetty/project.xml (original)
+++ geronimo/branches/configid/configs/jsp-examples-jetty/project.xml Thu Feb 23 10:30:08 2006
@@ -60,6 +60,15 @@
         </dependency>
 
         <dependency>
+            <groupId>commons-collections</groupId>
+            <artifactId>commons-collections</artifactId>
+            <version>${commons_collections_version}</version>
+            <properties>
+                <geronimo.dependency>true</geronimo.dependency>
+            </properties>
+        </dependency>
+
+        <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-system</artifactId>
             <version>${geronimo_version}</version>

Modified: geronimo/branches/configid/configs/ldap-demo-tomcat/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/ldap-demo-tomcat/src/plan/plan.xml?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/configs/ldap-demo-tomcat/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/ldap-demo-tomcat/src/plan/plan.xml Thu Feb 23 10:30:08 2006
@@ -1,8 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.1"
-    xmlns:sec="http://geronimo.apache.org/xml/ns/security"
-
-    parentId="geronimo/ldap-realm/${pom.currentVersion}/car">
+    xmlns:sec="http://geronimo.apache.org/xml/ns/security">
+    
     <context-root>/ldap-demo</context-root>
     <context-priority-classloader>false</context-priority-classloader>
     <security-realm-name>ldap-realm</security-realm-name>

Modified: geronimo/branches/configid/configs/ldap-realm/src/plan/plan.xml
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/configs/ldap-realm/src/plan/plan.xml?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/configs/ldap-realm/src/plan/plan.xml (original)
+++ geronimo/branches/configid/configs/ldap-realm/src/plan/plan.xml Thu Feb 23 10:30:08 2006
@@ -1,9 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<configuration
-    xmlns="http://geronimo.apache.org/xml/ns/deployment"
-
-    >
+<configuration xmlns="http://geronimo.apache.org/xml/ns/deployment-1.1">
 
    <gbean name="ldap-login"
         class="org.apache.geronimo.security.jaas.LoginModuleGBean">

Modified: geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java Thu Feb 23 10:30:08 2006
@@ -16,29 +16,10 @@
  */
 package org.apache.geronimo.client.builder;
 
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.StringTokenizer;
-import java.util.jar.Attributes;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-import java.util.zip.ZipEntry;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
 import org.apache.geronimo.client.AppClientContainer;
 import org.apache.geronimo.client.StaticJndiContextPlugin;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
@@ -66,6 +47,7 @@
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.repository.Artifact;
+import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.schema.SchemaConversionUtils;
@@ -82,6 +64,24 @@
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
 
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.StringTokenizer;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+import java.util.zip.ZipEntry;
+
 
 /**
  * @version $Rev$ $Date$
@@ -256,6 +256,11 @@
         appClientModule.setEarFile(earFile);
         //create the ear context for the app client.
         Environment clientEnvironment = appClientModule.getClientEnvironment();
+        if (clientEnvironment.getConfigId() == null) {
+            Artifact earConfigId = earContext.getConfigID();
+            Artifact configId = new Artifact(earConfigId.getGroupId(), earConfigId.getArtifactId() + "_" + module.getTargetPath(), earConfigId.getVersion(), "car");
+            clientEnvironment.setConfigId(configId);
+        }
         File appClientDir = configurationStore.createNewConfigurationDir(clientEnvironment.getConfigId());
 
         // construct the app client deployment context... this is the same class used by the ear context
@@ -283,7 +288,7 @@
     public void initContext(EARContext earContext, Module clientModule, ClassLoader cl) {
     }
 
-    public void addGBeans(EARContext earContext, Module module, ClassLoader earClassLoader) throws DeploymentException {
+    public void addGBeans(EARContext earContext, Module module, ClassLoader earClassLoader, Repository repository) throws DeploymentException {
         J2eeContext earJ2eeContext = earContext.getJ2eeContext();
 
         AppClientModule appClientModule = (AppClientModule) module;
@@ -359,7 +364,7 @@
                 addManifestClassPath(appClientDeploymentContext, appClientModule.getEarFile(), moduleFile, moduleBase);
 
                 // get the classloader
-                ClassLoader appClientClassLoader = appClientDeploymentContext.getClassLoader(repository);
+                ClassLoader appClientClassLoader = appClientDeploymentContext.getClassLoader(this.repository);
 
                 // pop in all the gbeans declared in the geronimo app client file
                 if (geronimoAppClient != null) {
@@ -376,10 +381,10 @@
                             if (resource.isSetExternalRar()) {
                                 path = resource.getExternalRar().trim();
                                 Artifact artifact = Artifact.create(path);
-                                if (!repository.contains(artifact)) {
+                                if (!this.repository.contains(artifact)) {
                                     throw new DeploymentException("Missing rar in repository: " + path);
                                 }
-                                File file = repository.getLocation(artifact);
+                                File file = this.repository.getLocation(artifact);
                                 try {
                                     connectorFile = new JarFile(file);
                                 } catch (IOException e) {
@@ -400,7 +405,7 @@
                             connectorModuleBuilder.installModule(connectorFile, appClientDeploymentContext, connectorModule, null);
                         }
                         //the install step could have added more dependencies... we need a new cl.
-                        appClientClassLoader = appClientDeploymentContext.getClassLoader(repository);
+                        appClientClassLoader = appClientDeploymentContext.getClassLoader(this.repository);
                         for (Iterator iterator = resourceModules.iterator(); iterator.hasNext();) {
                             Module connectorModule = (Module) iterator.next();
                             connectorModuleBuilder.initContext(appClientDeploymentContext, connectorModule, appClientClassLoader);
@@ -408,7 +413,7 @@
 
                         for (Iterator iterator = resourceModules.iterator(); iterator.hasNext();) {
                             Module connectorModule = (Module) iterator.next();
-                            connectorModuleBuilder.addGBeans(appClientDeploymentContext, connectorModule, appClientClassLoader);
+                            connectorModuleBuilder.addGBeans(appClientDeploymentContext, connectorModule, appClientClassLoader, repository);
                         }
                     } finally {
                         for (Iterator iterator = resourceModules.iterator(); iterator.hasNext();) {

Modified: geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=380190&r1=380189&r2=380190&view=diff
==============================================================================
--- geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java (original)
+++ geronimo/branches/configid/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java Thu Feb 23 10:30:08 2006
@@ -16,28 +16,6 @@
  */
 package org.apache.geronimo.connector.deployment;
 
-import java.beans.Introspector;
-import java.beans.PropertyEditor;
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.URI;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.jar.JarFile;
-import java.util.zip.ZipEntry;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.naming.Reference;
-import javax.xml.namespace.QName;
-
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.propertyeditor.PropertyEditors;
 import org.apache.geronimo.connector.ActivationSpecWrapperGBean;
@@ -59,13 +37,12 @@
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionLog;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.TransactionSupport;
 import org.apache.geronimo.connector.outbound.connectionmanagerconfig.XATransactions;
-import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
+import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
-import org.apache.geronimo.deployment.xbeans.GbeanType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
-import org.apache.geronimo.kernel.repository.Environment;
+import org.apache.geronimo.deployment.xbeans.GbeanType;
+import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
 import org.apache.geronimo.gbean.DynamicGAttributeInfo;
 import org.apache.geronimo.gbean.GAttributeInfo;
 import org.apache.geronimo.gbean.GBeanData;
@@ -83,6 +60,7 @@
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
+import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.kernel.repository.Repository;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.reference.ResourceReference;
@@ -106,9 +84,31 @@
 import org.apache.geronimo.xbeans.j2ee.ConnectorType;
 import org.apache.geronimo.xbeans.j2ee.MessagelistenerType;
 import org.apache.geronimo.xbeans.j2ee.ResourceadapterType;
+import org.apache.xmlbeans.XmlCursor;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlCursor;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.naming.Reference;
+import javax.xml.namespace.QName;
+import java.beans.Introspector;
+import java.beans.PropertyEditor;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.jar.JarFile;
+import java.util.zip.ZipEntry;
 
 /**
  * @version $Rev$ $Date$
@@ -369,7 +369,7 @@
 
     }
 
-    public void addGBeans(EARContext earContext, Module module, ClassLoader cl) throws DeploymentException {
+    public void addGBeans(EARContext earContext, Module module, ClassLoader cl, Repository repository) throws DeploymentException {
         J2eeContext earJ2eeContext = earContext.getJ2eeContext();
         J2eeContext moduleJ2eeContext = J2eeContextImpl.newModuleContextFromApplication(earJ2eeContext, NameFactory.RESOURCE_ADAPTER_MODULE, module.getName());
         J2eeContext resourceJ2eeContext = J2eeContextImpl.newModuleContextFromApplication(earJ2eeContext, NameFactory.JCA_RESOURCE, module.getName());



Mime
View raw message