geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: rev 56903 - in geronimo/trunk/modules/axis/src: java/org/apache/geronimo/axis test/org/apache/geronimo/axis/preconditions
Date Mon, 08 Nov 2004 03:46:15 GMT
Author: dims
Date: Sun Nov  7 19:46:15 2004
New Revision: 56903

Modified:
   geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java
   geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java
Log:
Hasty patch for breakage caused by changes to j2ee-builder's EARConfigBuilder and OpenEJBBuilder
constructors.



Modified: geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java
==============================================================================
--- geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java	(original)
+++ geronimo/trunk/modules/axis/src/java/org/apache/geronimo/axis/WSConfigBuilder.java	Sun
Nov  7 19:46:15 2004
@@ -26,6 +26,7 @@
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
@@ -176,7 +177,7 @@
         }
     }
 
-    public File installWebService(File module, File unpackedDir, ClassLoader classLoader)
throws IOException, DeploymentException {
+    public File installWebService(File module, File unpackedDir, ClassLoader classLoader)
throws IOException, URISyntaxException, DeploymentException {
         ZipFile zipfile = new ZipFile(module);
         Enumeration entires = zipfile.entries();
         while (entires.hasMoreElements()) {
@@ -214,7 +215,7 @@
         return out;
     }
 
-    private File installEJBWebService(File module, File unpackedDir, ClassLoader cl) throws
IOException, DeploymentException {
+    private File installEJBWebService(File module, File unpackedDir, ClassLoader cl) throws
IOException, URISyntaxException, DeploymentException {
         /**
          * TODO following code deploy the EJB in the OpenEJB EJB continaer. 
          * The code is borrows from the geronimo openEJB module
@@ -223,9 +224,11 @@
          * But this can quickly fix looking at it.      
          */
 
-        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder();
+        URI defaultParentId = new URI("org/apache/geronimo/Server");
+        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(defaultParentId, null);
         ResourceReferenceBuilder resourceReferenceBuilder = null;
-        EARConfigBuilder earConfigBuilder = new EARConfigBuilder(j2eeServer,
+        EARConfigBuilder earConfigBuilder = new EARConfigBuilder(defaultParentId,
+                j2eeServer,
                 transactionContextManagerObjectName,
                 trackedConnectionAssocator,
                 transactionalTimerObjectName,
@@ -242,36 +245,7 @@
         JarFile jarFile = new JarFile(module);
         Object plan = earConfigBuilder.getDeploymentPlan(null, jarFile);
         earConfigBuilder.buildConfiguration(plan, jarFile, unpackedDir);
-        
-            
-            
-//        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder();
-//        
-//        Thread.currentThread().setContextClassLoader(cl);
-//            
-//        File carFile = File.createTempFile("OpenEJBTest", ".car");
-//        
-//            
-//        EARConfigBuilder earConfigBuilder
-//                = new EARConfigBuilder(j2eeServer,
-//                        transactionContextManagerObjectName,
-//                        trackedConnectionAssocator,
-//                        transactionalTimerObjectName,
-//                        nonTransactionalTimerObjectName,
-//                        null, moduleBuilder, moduleBuilder, null, null, null, null, null);
-//            
-//        
-//        try {
-//            Object plan = earConfigBuilder.getDeploymentPlan(null, new JarFile(module));
-//            earConfigBuilder.buildConfiguration(plan, new JarFile(module), unpackedDir);
-//        } finally {
-//            carFile.delete();
-//            JarFile jarmodule = new JarFile(module);
-//            ZipEntry deployentry = jarmodule.getEntry("deploy.wsdd");
-//            InputStream deplydd = jarmodule.getInputStream(deployentry);
-//            AxisGeronimoUtils.addEntryToAxisDD(deplydd);
         return unpackedDir;
-//        }
     }
 
     private GBeanMBean[] loadPOJOWebService(File module) throws Exception {
@@ -291,16 +265,6 @@
         gbean.setAttribute("classList", classList);
         gbean.setAttribute("ejbConfig", config.getTarget());
         return new GBeanMBean[]{gbean, config};
-        
-//        ClassLoader classLoader = (ClassLoader)config.getAttribute("classLoader");
-//        File[] list = installLocation.listFiles();
-//        for(int i = 0; i< list.length;i++){
-//            if(list[i].getName().endsWith(".jar")){
-//                AxisGeronimoUtils.registerClassLoader(new ZipFile(list[i]),classLoader);
-//                return new GBeanMBean[]{gbean,config};
-//            }
-//        }
-//        throw new DeploymentException("can not found the ews module in " + installLocation);
     }
 
     private GBeanMBean loadConfig(File unpackedCar, ClassLoader classLoader) throws Exception
{

Modified: geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java
==============================================================================
--- geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java
(original)
+++ geronimo/trunk/modules/axis/src/test/org/apache/geronimo/axis/preconditions/DynamicEJBDeploymentTest.java
Sun Nov  7 19:46:15 2004
@@ -26,6 +26,7 @@
 
 import javax.management.ObjectName;
 import java.io.File;
+import java.net.URI;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.jar.JarFile;
@@ -42,6 +43,7 @@
     private static final ObjectName connectionTrackerObjectName = JMXUtil.getObjectName(j2eeDomainName
+ ":type=ConnectionTracker");
     private Kernel kernel;
     private J2EEManager j2eeManager;
+    private URI defaultParentId;
 
     /**
      * @param testName
@@ -51,6 +53,7 @@
     }
 
     protected void setUp() throws Exception {
+        defaultParentId = new URI("org/apache/geronimo/Server");
         String str = System.getProperty(javax.naming.Context.URL_PKG_PREFIXES);
         if (str == null) {
             str = ":org.apache.geronimo.naming";
@@ -65,7 +68,7 @@
     }
 
     public void testEJBJarDeploy() throws Exception {
-        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder();
+        OpenEJBModuleBuilder moduleBuilder = new OpenEJBModuleBuilder(defaultParentId, null);
         File jarFile = new File(outDir + "echo-jar/echo-ewsimpl.jar");
         ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
         ClassLoader cl = new URLClassLoader(new URL[]{jarFile.toURL()}, oldCl);
@@ -73,7 +76,8 @@
         File carFile = File.createTempFile("OpenEJBTest", ".car");
         try {
             EARConfigBuilder earConfigBuilder =
-                    new EARConfigBuilder(new ObjectName(j2eeDomainName + ":j2eeType=J2EEServer,name="
+ j2eeServerName),
+                    new EARConfigBuilder(defaultParentId,
+                            new ObjectName(j2eeDomainName + ":j2eeType=J2EEServer,name="
+ j2eeServerName),
                             transactionManagerObjectName,
                             connectionTrackerObjectName,
                             null,

Mime
View raw message