geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sppa...@apache.org
Subject svn commit: r436816 - /geronimo/server/branches/sachin/modules/connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Date Fri, 25 Aug 2006 14:34:07 GMT
Author: sppatel
Date: Fri Aug 25 07:34:06 2006
New Revision: 436816

URL: http://svn.apache.org/viewvc?rev=436816&view=rev
Log:
more failed merges

Modified:
    geronimo/server/branches/sachin/modules/connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java

Modified: geronimo/server/branches/sachin/modules/connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/sachin/modules/connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=436816&r1=436815&r2=436816&view=diff
==============================================================================
--- geronimo/server/branches/sachin/modules/connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
(original)
+++ geronimo/server/branches/sachin/modules/connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Fri Aug 25 07:34:06 2006
@@ -61,10 +61,7 @@
 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.ModuleIDBuilder;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilderCollection;
-import org.apache.geronimo.deployment.NamespaceDrivenBuilder;
-import org.apache.geronimo.deployment.DeployableModule;
+import org.apache.geronimo.deployment.*;
 import org.apache.geronimo.deployment.service.EnvironmentBuilder;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
@@ -262,28 +259,30 @@
 
     public void installModule(DeployableModule earFile, EARContext earContext, Module module,
Collection configurationStores, ConfigurationStore targetConfigurationStore, Collection repository)
throws DeploymentException {
         try {
-            JarFile moduleFile = module.getModuleFile();
-
-            // add the manifest classpath entries declared in the connector to the class
loader
-            // we have to explicitly add these since we are unpacking the connector module
-            // and the url class loader will not pick up a manifiest from an unpacked dir
-            // N.B. If we ever introduce a separate configuration/module for a rar inside
an ear
-            // this will need to be modified to use "../" instead of module.getTargetPath().
-            // See AbstractWebModuleBuilder.
-            earContext.addManifestClassPath(moduleFile, URI.create(module.getTargetPath()));
-
-            URI targetURI = URI.create(module.getTargetPath() + "/");
-            Enumeration entries = moduleFile.entries();
-            while (entries.hasMoreElements()) {
-                ZipEntry entry = (ZipEntry) entries.nextElement();
-                URI target = targetURI.resolve(entry.getName());
-                if (entry.getName().endsWith(".jar")) {
-                    earContext.addInclude(target, moduleFile, entry);
-                } else {
-                    earContext.addFile(target, moduleFile, entry);
+            DeployableModule moduleFile = module.getModuleFile();
+            if (moduleFile instanceof DefaultDeployableModule) {
+                JarFile jar = ((DefaultDeployableModule) moduleFile).getJarFile();
+                // add the manifest classpath entries declared in the connector to the class
loader
+                // we have to explicitly add these since we are unpacking the connector module
+                // and the url class loader will not pick up a manifiest from an unpacked
dir
+                // N.B. If we ever introduce a separate configuration/module for a rar inside
an ear
+                // this will need to be modified to use "../" instead of module.getTargetPath().
+                // See AbstractWebModuleBuilder.
+                earContext.addManifestClassPath(jar, URI.create(module.getTargetPath()));
+                URI targetURI = URI.create(module.getTargetPath() + "/");
+                Enumeration entries = jar.entries();
+                while (entries.hasMoreElements()) {
+                    ZipEntry entry = (ZipEntry) entries.nextElement();
+                    URI target = targetURI.resolve(entry.getName());
+                    if (entry.getName().endsWith(".jar")) {
+                        earContext.addInclude(target, jar, entry);
+                    } else {
+                        earContext.addFile(target, jar, entry);
+                    }
                 }
+            } else {
+                //TODO GERONIMO-1526
             }
-
         } catch (IOException e) {
             throw new DeploymentException("Problem deploying connector", e);
         }



Mime
View raw message