You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by da...@apache.org on 2008/03/03 21:39:21 UTC

svn commit: r633268 [4/4] - in /openejb/trunk/openejb3: assembly/openejb-tomcat/ assembly/openejb-tomcat/openejb-tomcat-catalina/ assembly/openejb-tomcat/openejb-tomcat-catalina/src/ assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/ assembly/op...

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/TomcatVersion.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/TomcatVersion.java?rev=633268&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/TomcatVersion.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/TomcatVersion.java Mon Mar  3 12:39:06 2008
@@ -0,0 +1,94 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.tomcat.common;
+
+import java.util.Properties;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public enum TomcatVersion {
+
+    v3, v40, v41, v50, v55, v6, UNKNOWN;
+
+    private String serverNumber;
+    private String serverBuilt;
+
+    private static TomcatVersion version;
+
+    public String getServerNumber() {
+        return serverNumber;
+    }
+
+    public String getServerBuilt() {
+        return serverBuilt;
+    }
+
+    public boolean isTheVersion() {
+        return get() == this;
+    }
+
+    public static boolean hasAnnotationProcessingSupport(){
+        switch (get()) {
+            case v40:
+            case v41:
+            case v50:
+            case v55:
+                return false;
+            default:
+                return true;
+        }
+    }
+    
+    public static TomcatVersion get(){
+        if (version != null) return version;
+
+        try {
+            // tomcat.version and tomcat.built properties should be added
+            // to System by TomcatHook
+            String serverNumber = System.getProperty("tomcat.version");
+            String serverBuilt = System.getProperty("tomcat.built");
+
+            // This fallback block will only work in Tomcat6 since the
+            // common class loader in previous versions can not see the
+            // catalina.jar which contains the ServerInfo.properties
+            if (serverNumber == null) {
+                Properties properties = new Properties();
+                ClassLoader classLoader = TomcatVersion.class.getClassLoader();
+                properties.load(classLoader.getResourceAsStream("org/apache/catalina/util/ServerInfo.properties"));
+
+                serverNumber = properties.getProperty("server.number");
+                serverBuilt = properties.getProperty("server.built");
+            }
+
+            if (serverNumber.startsWith("3")) version = v3;
+            else if (serverNumber.startsWith("4.0")) version = v40;
+            else if (serverNumber.startsWith("4.1")) version = v41;
+            else if (serverNumber.startsWith("5.0")) version = v50;
+            else if (serverNumber.startsWith("5.5")) version = v55;
+            else if (serverNumber.startsWith("6.")) version = v6;
+            else version = UNKNOWN;
+
+            version.serverNumber = serverNumber;
+            version.serverBuilt = serverBuilt;
+
+            return version;
+        } catch (Exception e) {
+            return UNKNOWN;
+        }
+    }
+}

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/UserTransactionFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/UserTransactionFactory.java?rev=633268&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/UserTransactionFactory.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/UserTransactionFactory.java Mon Mar  3 12:39:06 2008
@@ -0,0 +1,47 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.tomcat.common;
+
+import org.apache.openejb.core.CoreUserTransaction;
+import org.apache.openejb.loader.SystemInstance;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.spi.ObjectFactory;
+import javax.transaction.TransactionManager;
+import javax.transaction.UserTransaction;
+import java.util.Hashtable;
+
+public class UserTransactionFactory implements ObjectFactory {
+    public Object getObjectInstance(Object object, Name name, Context context, Hashtable environment) throws Exception {
+        // get the transaction manager
+        TransactionManager transactionManager = SystemInstance.get().getComponent(TransactionManager.class);
+        if (transactionManager == null) {
+            throw new NamingException("transaction manager not found");
+        }
+
+        // if transaction manager implements user transaction we are done
+        if (transactionManager instanceof UserTransaction) {
+            return transactionManager;
+        }
+
+        // wrap transaction manager with user transaction
+        return new CoreUserTransaction(transactionManager);
+    }
+}

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/WsFactory.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/WsFactory.java?rev=633268&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/WsFactory.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/common/WsFactory.java Mon Mar  3 12:39:06 2008
@@ -0,0 +1,126 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.tomcat.common;
+
+import org.apache.naming.ResourceRef;
+import org.apache.openejb.Injection;
+import org.apache.openejb.core.ivm.naming.JaxWsServiceReference;
+import org.apache.openejb.core.webservices.HandlerChainData;
+import org.apache.openejb.core.webservices.PortRefData;
+import static org.apache.openejb.tomcat.common.NamingUtil.JNDI_NAME;
+import static org.apache.openejb.tomcat.common.NamingUtil.WSDL_URL;
+import static org.apache.openejb.tomcat.common.NamingUtil.WS_CLASS;
+import static org.apache.openejb.tomcat.common.NamingUtil.WS_ID;
+import static org.apache.openejb.tomcat.common.NamingUtil.WS_PORT_QNAME;
+import static org.apache.openejb.tomcat.common.NamingUtil.WS_QNAME;
+import static org.apache.openejb.tomcat.common.NamingUtil.getProperty;
+import static org.apache.openejb.tomcat.common.NamingUtil.getStaticValue;
+import static org.apache.openejb.tomcat.common.NamingUtil.loadClass;
+
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.List;
+
+public class WsFactory extends AbstractObjectFactory {
+    public Object getObjectInstance(Object object, Name name, Context context, Hashtable environment) throws Exception {
+        // ignore non resource-refs
+        if (!(object instanceof ResourceRef)) {
+            return null;
+        }
+
+        Reference ref = (Reference) object;
+
+        Object value;
+        if (getProperty(ref, JNDI_NAME) != null) {
+            // lookup the value in JNDI
+            value = super.getObjectInstance(object, name, context, environment);
+        } else {
+            // load service class which is used to construct the port
+            String serviceClassName = getProperty(ref, WS_CLASS);
+            Class<? extends Service> serviceClass = Service.class;
+            if (serviceClassName != null) {
+                serviceClass = loadClass(serviceClassName).asSubclass(Service.class);
+                if (serviceClass == null) {
+                    throw new NamingException("Could not load service type class "+ serviceClassName);
+                }
+            }
+
+            // load the reference class which is the ultimate type of the port
+            Class<?> referenceClass = loadClass(ref.getClassName());
+
+            // if ref class is a subclass of Service, use it for the service class
+            if (referenceClass != null && Service.class.isAssignableFrom(referenceClass)) {
+                serviceClass = referenceClass.asSubclass(Service.class);
+            }
+
+            // PORT ID
+            String serviceId = getProperty(ref, WS_ID);
+
+            // Service QName
+            QName serviceQName = null;
+            if (getProperty(ref, WS_QNAME) != null) {
+                serviceQName = QName.valueOf(getProperty(ref, WS_QNAME));
+            }
+
+            // WSDL URL
+            URL wsdlUrl = null;
+            if (getProperty(ref, WSDL_URL) != null) {
+                wsdlUrl = new URL(getProperty(ref, WSDL_URL));
+            }
+
+            // Port QName
+            QName portQName = null;
+            if (getProperty(ref, WS_PORT_QNAME) != null) {
+                portQName = QName.valueOf(getProperty(ref, WS_PORT_QNAME));
+            }
+
+            // port refs
+            List<PortRefData> portRefs = getStaticValue(ref, "port-refs");
+            if (portRefs == null) portRefs = Collections.emptyList();
+
+            // HandlerChain
+            List<HandlerChainData> handlerChains = getStaticValue(ref, "handler-chains");
+            if (handlerChains == null) handlerChains = Collections.emptyList();
+            List<Injection> injections = getStaticValue(ref, "injections");
+            if (injections == null) injections = Collections.emptyList();
+
+            JaxWsServiceReference serviceReference = new JaxWsServiceReference(serviceId,
+                    serviceQName,
+                    serviceClass, portQName,
+                    referenceClass,
+                    wsdlUrl,
+                    portRefs,
+                    handlerChains,
+                    injections);
+            value = serviceReference.getObject();
+        }
+
+        return value;
+    }
+
+    protected String buildJndiName(Reference reference) throws NamingException {
+        throw new UnsupportedOperationException();
+    }
+}

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java?rev=633268&r1=632706&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Installer.java Mon Mar  3 12:39:06 2008
@@ -19,6 +19,7 @@
 
 import org.codehaus.swizzle.stream.DelimitedTokenReplacementInputStream;
 import org.codehaus.swizzle.stream.StringTokenHandler;
+import org.apache.openejb.loader.SystemInstance;
 
 import java.io.ByteArrayInputStream;
 import java.io.Closeable;
@@ -45,9 +46,7 @@
 
     static {
         // is the OpenEJB listener installed
-        Boolean listener = (Boolean) invokeStaticNoArgMethod("org.apache.openejb.loader.OpenEJBListener", "isListenerInstalled");
-        if (listener == null) listener = false;
-        listenerInstalled = listener;
+        listenerInstalled = "OpenEJBListener".equals(SystemInstance.get().getProperty("openejb.embedder.source"));
 
         // is the OpenEJB javaagent installed
         agentInstalled = invokeStaticNoArgMethod("org.apache.openejb.javaagent.Agent", "getInstrumentation") != null;
@@ -81,10 +80,6 @@
         return status;
     }
 
-    public void tryDynamicInstall() {
-        invokeStaticNoArgMethod("org.apache.openejb.loader.OpenEJBListener", "tryDynamicInstall");        
-    }
-
     public void installAll() {
         installListener();
 
@@ -106,9 +101,9 @@
         boolean copyOpenEJBLoader = true;
 
         // copy loader jar to lib
-        File destination = new File(paths.getCatalinaLibDir(), paths.getOpenEJBLoaderJar().getName());
+        File destination = new File(paths.getCatalinaLibDir(), paths.getOpenEJBTomcatLoaderJar().getName());
         if (destination.exists()) {
-            if (paths.getOpenEJBLoaderJar().length() != destination.length()) {
+            if (paths.getOpenEJBTomcatLoaderJar().length() != destination.length()) {
                 // md5 diff the files
             } else {
 //                addInfo("OpenEJB loader jar already installed in Tomcat lib directory.");
@@ -118,10 +113,10 @@
 
         if (copyOpenEJBLoader) {
             try {
-                copyFile(paths.getOpenEJBLoaderJar(), destination);
-                addInfo("Copy " + paths.getOpenEJBLoaderJar().getName() + " to lib");
+                copyFile(paths.getOpenEJBTomcatLoaderJar(), destination);
+                addInfo("Copy " + paths.getOpenEJBTomcatLoaderJar().getName() + " to lib");
             } catch (IOException e) {
-                addError("Unable to copy OpenEJB loader jar to Tomcat lib directory.  This will need to be performed manually.", e);
+                addError("Unable to copy OpenEJB Tomcat loader jar to Tomcat lib directory.  This will need to be performed manually.", e);
             }
         }
 
@@ -134,7 +129,7 @@
         }
 
         // does the server.xml contain our listener name... it is possible that they commented out our listener, but that would be a PITA to detect
-        if (serverXmlOriginal.contains("org.apache.openejb.loader.OpenEJBListener")) {
+        if (serverXmlOriginal.contains("org.apache.openejb.tomcat.loader.OpenEJBListener")) {
             addWarning("OpenEJB Listener already declared in Tomcat server.xml file.");
             return;
         }
@@ -153,7 +148,7 @@
                     ">",
                     ">\r\n" +
                             "  <!-- OpenEJB plugin for Tomcat -->\r\n" +
-                            "  <Listener className=\"org.apache.openejb.loader.OpenEJBListener\" />");
+                            "  <Listener className=\"org.apache.openejb.tomcat.loader.OpenEJBListener\" />");
         } catch (IOException e) {
             addError("Error while adding listener to server.xml file", e);
         }
@@ -437,17 +432,6 @@
         }
         return sb.toString();
     }
-
-//    private String getTomcatVersion() {
-//        String tomcatVersion = null;
-//        try {
-//            Properties properties = new Properties();
-//            properties.load(getClass().getClassLoader().getResourceAsStream("org/apache/catalina/util/ServerInfo.properties"));
-//            tomcatVersion = properties.getProperty("server.number");
-//        } catch (IOException e) {
-//        }
-//        return tomcatVersion;
-//    }
 
     private static Object invokeStaticNoArgMethod(String className, String propertyName) {
         try {

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/InstallerServlet.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/InstallerServlet.java?rev=633268&r1=632706&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/InstallerServlet.java (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/InstallerServlet.java Mon Mar  3 12:39:06 2008
@@ -22,10 +22,12 @@
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletException;
 import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.io.File;
 
 /**
  * Installs OpenEJB into Tomcat.
@@ -40,9 +42,16 @@
 
     public void init(ServletConfig servletConfig) throws ServletException {
         this.servletConfig = servletConfig;
-        paths = new Paths(servletConfig.getServletContext());
+
+        String path = servletConfig.getServletContext().getRealPath("/");
+
+        File openejbWarDir = null;
+        if (path != null) {
+            openejbWarDir = new File(path);
+        }
+
+        paths = new Paths(openejbWarDir);
         installer = new Installer(paths);
-        installer.tryDynamicInstall();
     }
 
     protected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {
@@ -81,5 +90,24 @@
             RequestDispatcher rd = servletConfig.getServletContext().getRequestDispatcher("/installer-view.jsp");
             rd.forward(req,res);
         }
+    }
+
+    public void dump(ServletOutputStream out) throws IOException {
+        printFile(out, "Catalina home: ", paths.getCatalinaHomeDir());
+        printFile(out, "Catalina base: ", paths.getCatalinaBaseDir());
+        printFile(out, "Catalina server.xml: ", paths.getServerXmlFile());
+        printFile(out, "Catalina conf: ", paths.getCatalinaConfDir());
+        printFile(out, "Catalina lib: ", paths.getCatalinaLibDir());
+        printFile(out, "Catalina bin: ", paths.getCatalinaBinDir());
+        printFile(out, "Catalina catalina.sh: ", paths.getCatalinaShFile());
+        printFile(out, "Catalina catalina.bat: ", paths.getCatalinaBatFile());
+        printFile(out, "OpenEJB lib: ", paths.getOpenEJBLibDir());
+        printFile(out, "OpenEJB loader jar: ", paths.getOpenEJBTomcatLoaderJar());
+        printFile(out, "OpenEJB javaagent jar: ", paths.getOpenEJBJavaagentJar());
+    }
+
+    private void printFile(ServletOutputStream out, String description, File file) throws IOException {
+        out.println(description + ":");
+        out.println("    " + file);
     }
 }

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Paths.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Paths.java?rev=633268&r1=632706&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Paths.java (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-common/src/main/java/org/apache/openejb/tomcat/installer/Paths.java Mon Mar  3 12:39:06 2008
@@ -17,13 +17,12 @@
  */
 package org.apache.openejb.tomcat.installer;
 
-import javax.servlet.ServletContext;
-import javax.servlet.ServletOutputStream;
 import java.io.File;
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.openejb.tomcat.common.TomcatVersion;
+
 public class Paths {
     private final File openejbWarDir;
     private final List<String> errors = new ArrayList<String>();
@@ -31,20 +30,6 @@
     private File catalinaBaseDir;
     private File serverXmlFile;
 
-    public Paths(ServletContext servletContext) {
-        String path = servletContext.getRealPath("/");
-        if (path == null) {
-            openejbWarDir = null;
-        } else {
-            openejbWarDir = new File(path);
-        }
-    }
-
-    public Paths(String openejbWarDir) {
-        if (openejbWarDir == null) throw new NullPointerException("openejbWarDir is null");
-        this.openejbWarDir = new File(openejbWarDir);
-    }
-
     public Paths(File openejbWarDir) {
         this.openejbWarDir = openejbWarDir;
     }
@@ -109,7 +94,11 @@
 
         if (catalinaHomeDir == null) return null;
 
-        return new File(catalinaHomeDir, "lib");
+        if (TomcatVersion.v6.equals(TomcatVersion.get())) {
+            return new File(catalinaHomeDir, "lib");
+        } else {
+            return new File(new File(catalinaHomeDir, "server"), "lib");
+        }
     }
 
     public File getCatalinaConfDir() {
@@ -150,8 +139,8 @@
         return new File(openejbWarDir, "lib");
     }
 
-    public File getOpenEJBLoaderJar() {
-        return findOpenEJBJar("openejb-loader");
+    public File getOpenEJBTomcatLoaderJar() {
+        return findOpenEJBJar("openejb-tomcat-loader");
     }
 
     public File getOpenEJBJavaagentJar() {
@@ -210,7 +199,7 @@
 
         verifyDirectory("OpenEJB lib", getOpenEJBLibDir());
 
-        File openejbLoaderJar = getOpenEJBLoaderJar();
+        File openejbLoaderJar = getOpenEJBTomcatLoaderJar();
         if (openejbLoaderJar == null) {
             addError("OpenEJB loader jar was not found in the OpenEJB lib dir");
         }
@@ -318,24 +307,5 @@
             return new File(catalinaHomeDir.trim());
         }
         return null;
-    }
-
-    public void dump(ServletOutputStream out) throws IOException {
-        printFile(out, "Catalina home: ", getCatalinaHomeDir());
-        printFile(out, "Catalina base: ", getCatalinaBaseDir());
-        printFile(out, "Catalina server.xml: ", getServerXmlFile());
-        printFile(out, "Catalina conf: ", getCatalinaConfDir());
-        printFile(out, "Catalina lib: ", getCatalinaLibDir());
-        printFile(out, "Catalina bin: ", getCatalinaBinDir());
-        printFile(out, "Catalina catalina.sh: ", getCatalinaShFile());
-        printFile(out, "Catalina catalina.bat: ", getCatalinaBatFile());
-        printFile(out, "OpenEJB lib: ", getOpenEJBLibDir());
-        printFile(out, "OpenEJB loader jar: ", getOpenEJBLoaderJar());
-        printFile(out, "OpenEJB javaagent jar: ", getOpenEJBJavaagentJar());
-    }
-
-    private void printFile(ServletOutputStream out, String description, File file) throws IOException {
-        out.println(description + ":");
-        out.println("    " + file);
     }
 }

Propchange: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Mar  3 12:39:06 2008
@@ -0,0 +1,10 @@
+*.iws
+*.ipr
+*.iml
+.classpath
+.project
+.settings
+*.log
+junit*.properties
+target
+bin

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/pom.xml?rev=633268&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/pom.xml (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/pom.xml Mon Mar  3 12:39:06 2008
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 600338 $ $Date: 2007-12-02 09:08:04 -0800 (Sun, 02 Dec 2007) $ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <artifactId>openejb-tomcat</artifactId>
+    <groupId>org.apache.openejb</groupId>
+    <version>3.0-SNAPSHOT</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>openejb-tomcat-loader</artifactId>
+  <packaging>jar</packaging>
+  <name>OpenEJB :: Assembly :: Tomcat :: Loader</name>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-loader</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>catalina</artifactId>
+      <version>6.0.13</version>
+      <optional>true</optional>
+    </dependency>
+  </dependencies>
+</project>

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/LoaderServlet.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/LoaderServlet.java?rev=633268&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/LoaderServlet.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/LoaderServlet.java Mon Mar  3 12:39:06 2008
@@ -0,0 +1,73 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.openejb.tomcat.loader;
+
+import java.util.Properties;
+import java.util.Enumeration;
+import java.io.File;
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServlet;
+
+/**
+ * @author <a href="mailto:david.blevins@visi.com">David Blevins </a>
+ */
+public class LoaderServlet extends HttpServlet {
+    private static boolean embedded = false;
+
+    public void init(ServletConfig config) throws ServletException {
+        // only install once
+        if (embedded) return;
+        embedded = true;
+
+        Properties properties = initParamsToProperties(config);
+        File webappDir = new File(getWebappPath(config));
+        properties.setProperty("openejb.war", webappDir.getAbsolutePath());
+
+        properties.setProperty("openejb.embedder.source", getClass().getSimpleName());
+
+        TomcatEmbedder.embed(properties, config.getClass().getClassLoader());
+    }
+
+    private Properties initParamsToProperties(ServletConfig config) {
+        Properties properties = new Properties();
+
+        // Set some defaults
+        properties.setProperty("openejb.loader", "tomcat");
+
+        // Load in each init-param as a property
+        Enumeration enumeration = config.getInitParameterNames();
+        System.out.println("OpenEJB init-params:");
+        while (enumeration.hasMoreElements()) {
+            String name = (String) enumeration.nextElement();
+            String value = config.getInitParameter(name);
+            properties.put(name, value);
+            System.out.println("\tparam-name: " + name + ", param-value: " + value);
+        }
+
+        return properties;
+    }
+
+    private String getWebappPath(ServletConfig config) {
+        ServletContext ctx = config.getServletContext();
+        File webInf = new File(ctx.getRealPath("WEB-INF"));
+        File webapp = webInf.getParentFile();
+        String webappPath = webapp.getAbsolutePath();
+        return webappPath;
+    }
+}

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/OpenEJBListener.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/OpenEJBListener.java?rev=633268&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/OpenEJBListener.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/OpenEJBListener.java Mon Mar  3 12:39:06 2008
@@ -0,0 +1,116 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.tomcat.loader;
+
+import java.io.File;
+import java.util.Properties;
+
+import org.apache.catalina.Container;
+import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.LifecycleListener;
+import org.apache.catalina.ServerFactory;
+import org.apache.catalina.Service;
+import org.apache.catalina.core.StandardEngine;
+import org.apache.catalina.core.StandardHost;
+import org.apache.catalina.core.StandardServer;
+
+public class OpenEJBListener implements LifecycleListener {
+    static private boolean listenerInstalled;
+
+    public static boolean isListenerInstalled() {
+        return listenerInstalled;
+    }
+
+    public void lifecycleEvent(LifecycleEvent event) {
+        // only install once
+        if (listenerInstalled) return;
+        listenerInstalled = true;
+
+        Properties properties = new Properties();
+        File webappDir = findOpenEjbWar();
+        properties.setProperty("openejb.war", webappDir.getAbsolutePath());
+
+        properties.setProperty("openejb.embedder.source", getClass().getSimpleName());
+
+        TomcatEmbedder.embed(properties, StandardServer.class.getClassLoader());
+    }
+
+    private static File findOpenEjbWar() {
+        // in Tomcat 5.5 the OpenEjb war is in the server/webapps director
+        String catalinaBase = System.getProperty("catalina.base");
+        File serverWebapps = new File(catalinaBase, "server/webapps");
+        File openEjbWar = findOpenEjbWar(serverWebapps);
+        if (openEjbWar != null) {
+            return openEjbWar;
+        }
+
+        // in Tomcat 6 the OpenEjb war is normally in webapps, but we just scan all hosts directories
+        for (Service service : ServerFactory.getServer().findServices()) {
+            Container container = service.getContainer();
+            if (container instanceof StandardEngine) {
+                StandardEngine engine = (StandardEngine) container;
+                for (Container child : engine.findChildren()) {
+                    if (child instanceof StandardHost) {
+                        StandardHost host = (StandardHost) child;
+                        String appBase = host.getAppBase();
+
+                        // determine the host dir (normally webapps)
+                        File hostDir = new File(appBase);
+                        if (!hostDir.isAbsolute()) {
+                            hostDir = new File(catalinaBase, appBase);
+                        }
+
+                        openEjbWar = findOpenEjbWar(hostDir);
+                        if (openEjbWar != null) {
+                            return openEjbWar;
+                        }
+                    }
+                }
+            }
+        }
+
+
+        return null;
+    }
+
+    private static File findOpenEjbWar(File hostDir) {
+        if (!hostDir.isDirectory()) {
+            return null;
+        }
+
+        // iterate over the contexts
+        for (File contextDir : hostDir.listFiles()) {
+            // does this war have a web-inf lib dir
+            File webInfLib = new File(new File(contextDir, "WEB-INF"), "lib");
+            if (!webInfLib.isDirectory()) {
+                continue;
+            }
+            // iterate over the libs looking for the openejb-loader-*.jar
+            for (File file : webInfLib.listFiles()) {
+                if (file.getName().startsWith("openejb-tomcat-loader-") && file.getName().endsWith(".jar")) {
+                    // this should be the openejb war...
+                    // make sure it has a lib directory
+                    if (new File(contextDir, "lib").isDirectory()) {
+                        return contextDir;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+}

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatEmbedder.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatEmbedder.java?rev=633268&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatEmbedder.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatEmbedder.java Mon Mar  3 12:39:06 2008
@@ -0,0 +1,110 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.tomcat.loader;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URI;
+import java.util.Properties;
+
+public class TomcatEmbedder {
+    public static void embed(Properties properties, ClassLoader catalinaCl) {
+        if (catalinaCl == null) throw new NullPointerException("catalinaCl is null");
+        if (properties == null) throw new NullPointerException("properties is null");
+
+        if (!properties.containsKey("openejb.war")) {
+            throw new IllegalArgumentException("properties must contain the openejb.war property");
+        }
+        File openejbWar = new File(properties.getProperty("openejb.war"));
+        if (!openejbWar.isDirectory()) {
+            throw new IllegalArgumentException("openejb.war is not a directory: " + openejbWar);
+        }
+
+        ClassLoader oldCl = Thread.currentThread().getContextClassLoader();
+        Thread.currentThread().setContextClassLoader(catalinaCl);
+        try {
+            // WebappClassLoader childCl = new WebappClassLoader(catalinaCl)
+            Class<?> webappClClass = catalinaCl.loadClass("org.apache.catalina.loader.WebappClassLoader");
+            ClassLoader childCl = (ClassLoader) webappClClass.getConstructor(ClassLoader.class).newInstance(catalinaCl);
+
+            // childCl.addRepository(openejb-tomcat-loader.jar)
+            File thisJar = getThisJar();
+            webappClClass.getMethod("addRepository", String.class).invoke(childCl, thisJar.toURI().toString());
+
+            // childCl.addRepository(openejb-loader.jar)
+            File jarFile = findOpenEJBJar(openejbWar, "openejb-loader");
+            webappClClass.getMethod("addRepository", String.class).invoke(childCl, jarFile.toURI().toString());
+
+            // childCl.start()
+            webappClClass.getMethod("start").invoke(childCl);
+
+            // TomcatHook.hook()
+            Class<?> tomcatUtilClass = childCl.loadClass("org.apache.openejb.tomcat.loader.TomcatHook");
+            Method hookMethod = tomcatUtilClass.getDeclaredMethod("hook", Properties.class);
+            hookMethod.setAccessible(true);
+            hookMethod.invoke(null, properties);
+        } catch (Throwable e) {
+            e.printStackTrace();
+        } finally {
+            Thread.currentThread().setContextClassLoader(oldCl);
+        }
+    }
+
+    private static File getThisJar() {
+        return jarLocation(TomcatEmbedder.class);
+    }
+
+    private static File jarLocation(Class clazz) {
+        try {
+            String classFileName = clazz.getName().replace(".", "/") + ".class";
+
+            URL classURL = clazz.getClassLoader().getResource(classFileName);
+
+            URI uri = classURL.toURI();
+            if (uri.getPath() == null){
+                uri = new URI(uri.getSchemeSpecificPart());
+            }
+
+            String path = uri.getPath();
+            if (path.contains("!")){
+                path = path.substring(0, path.indexOf('!'));
+            } else {
+                path = path.substring(0, path.length() - classFileName.length());
+            }
+
+            return new File(path);
+        } catch (Exception e) {
+            throw new IllegalStateException(e);
+        }
+    }
+
+    private static File findOpenEJBJar(File openejbWar, String namePrefix) {
+        File openEJBLibDir = new File(openejbWar, "lib");
+        if (openEJBLibDir == null) return null;
+
+        File openejbLoaderJar = null;
+        for (File file : openEJBLibDir.listFiles()) {
+            if (file.getName().startsWith(namePrefix + "-") && file.getName().endsWith(".jar")) {
+                return file;
+            }
+        }
+
+        return openejbLoaderJar;
+    }
+}

Added: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHook.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHook.java?rev=633268&view=auto
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHook.java (added)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHook.java Mon Mar  3 12:39:06 2008
@@ -0,0 +1,85 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.openejb.tomcat.loader;
+
+import java.io.File;
+import java.util.Properties;
+
+import org.apache.openejb.loader.Embedder;
+import org.apache.openejb.loader.SystemInstance;
+
+/**
+ * This class should only be loadded and used via reflection from TomcatEmbedder. 
+ */
+class TomcatHook {
+    @SuppressWarnings({"UnusedDeclaration"})
+    private static void hook(Properties properties) {
+        // verify properties
+        if (properties == null) throw new NullPointerException("properties is null");
+                if (!properties.containsKey("openejb.war")) {
+            throw new IllegalArgumentException("properties must contain the openejb.war property");
+        }
+        File openejbWar = new File(properties.getProperty("openejb.war"));
+        if (!openejbWar.isDirectory()) {
+            throw new IllegalArgumentException("openejb.war is not a directory: " + openejbWar);
+        }
+
+        if (SystemInstance.isInitialized()) {
+            return;
+        }
+
+        properties.setProperty("openejb.loader", "tomcat-system");
+
+        String catalinaHome = System.getProperty("catalina.home");
+        properties.setProperty("openejb.home", catalinaHome);
+        System.setProperty("openejb.home", catalinaHome);
+
+        String catalinaBase = System.getProperty("catalina.base");
+        properties.setProperty("openejb.base", catalinaBase);
+        System.setProperty("openejb.base", catalinaBase);
+
+        System.setProperty("openejb.war", openejbWar.getAbsolutePath());
+        File libDir = new File(openejbWar, "lib");
+        String libPath = libDir.getAbsolutePath();
+        properties.setProperty("openejb.libs", libPath);
+
+        // System.setProperty("tomcat.version", "x.y.z.w");
+        // System.setProperty("tomcat.built", "mmm dd yyyy hh:mm:ss");
+        try {
+            Properties tomcatServerInfo = new Properties();
+            ClassLoader classLoader = TomcatHook.class.getClassLoader();
+            properties.load(classLoader.getResourceAsStream("org/apache/catalina/util/ServerInfo.properties"));
+
+            String serverNumber = properties.getProperty("server.number");
+            System.setProperty("tomcat.version", serverNumber);
+
+            String serverBuilt = properties.getProperty("server.built");
+            System.setProperty("tomcat.built", serverBuilt);
+        } catch (Throwable e) {
+        }
+
+        try {
+            // create the loader
+            SystemInstance.init(properties);
+            Embedder embedder = new Embedder("org.apache.openejb.tomcat.catalina.TomcatLoader");
+            embedder.init(properties);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}
\ No newline at end of file

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/maven.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/maven.xml?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/maven.xml (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/maven.xml Mon Mar  3 12:39:06 2008
@@ -28,10 +28,10 @@
 
     <goal name="tomcat55">
       <j:set var="tomcat.branch" value="5"/>
-      <j:set var="tomcat.version" value="5.5.23"/>
+      <j:set var="tomcat.version" value="5.5.26"/>
       <j:set var="tomcat.prefix" value="apache"/>
       <j:set var="tomcat.server.lib" value="server/lib"/>
-      <j:set var="tomcat.server.webapps" value="server/webapps"/>
+      <j:set var="tomcat.server.webapps" value="webapps"/>
       <attainGoal name="tomcat.env"/>
     </goal>
 
@@ -49,7 +49,7 @@
       <j:set var="tomcat.version" value="5.0.30"/>
       <j:set var="tomcat.prefix" value="jakarta"/>
       <j:set var="tomcat.server.lib" value="server/lib"/>
-      <j:set var="tomcat.server.webapps" value="server/webapps"/>
+      <j:set var="tomcat.server.webapps" value="webapps"/>
       <attainGoal name="tomcat.env"/>
     </goal>
 
@@ -96,14 +96,9 @@
       </j:if>
 
       <!-- Copy conf files -->
-      <copy todir="${tomcat.home}/conf">
-        <fileset dir="${basedir}/src/test/conf"/>
-      </copy>
-
-      <!-- Add OpenEJBListener -->
-      <!--<replace file="${tomcat.home}/conf/server.xml" token='shutdown="SHUTDOWN">' value='shutdown="SHUTDOWN"  > &lt;Listener className="org.apache.openejb.loader.OpenEJBListener" />'/>-->
-      <!-- Add openejb loader jar -->
-      <!--<copy file="${user.home}/.m2/repository/org/apache/openejb/openejb-loader/${openejb.version}/openejb-loader-${openejb.version}.jar" todir="${tomcat.lib}" />-->
+      <!--<copy todir="${tomcat.home}/conf">-->
+        <!--<fileset dir="${basedir}/src/test/conf"/>-->
+      <!--</copy>-->
     </goal>
 
     <goal name="setup:tomcat-src">
@@ -134,6 +129,7 @@
       <j:choose>
         <j:when test="${systemScope['os.name'].startsWith('Windows')}">
           <exec executable="${tomcat.home}/bin/startup.bat" os="Windows NT,Windows 2000,Windows XP">
+            <env key="JAVA_HOME" value="${java.home}"/>
             <!--<env key="JAVA_OPTS" value="-javaagent:${tomcat.webapps}\openejb\lib\openejb-javaagent-${openejb.version}.jar -Dcom.sun.management.jmxremote"/>-->
             <env key="JAVA_OPTS" value="-Dcom.sun.management.jmxremote"/>
             <env key="CATALINA_HOME" value="${tomcat.home}"/>
@@ -141,6 +137,7 @@
         </j:when>
         <j:otherwise>
           <exec executable="${tomcat.home}/bin/startup.sh">
+            <env key="JAVA_HOME" value="${java.home}"/>
             <!--<env key="JAVA_OPTS" value="-javaagent:${tomcat.webapps}/openejb/lib/openejb-javaagent-${openejb.version}.jar -Dcom.sun.management.jmxremote"/>-->
             <env key="JAVA_OPTS" value="-Dcom.sun.management.jmxremote"/>
           </exec>
@@ -152,6 +149,7 @@
       <j:choose>
         <j:when test="${systemScope['os.name'].startsWith('Windows')}">
           <exec executable="${tomcat.home}/bin/startup.bat" os="Windows NT,Windows 2000,Windows XP">
+            <env key="JAVA_HOME" value="${java.home}"/>
             <!--<env key="JAVA_OPTS" value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 -javaagent:${tomcat.webapps}\openejb\lib\openejb-javaagent-${openejb.version}.jar -Dcom.sun.management.jmxremote"/>-->
             <env key="JAVA_OPTS" value="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 -Dcom.sun.management.jmxremote"/>
             <env key="CATALINA_HOME" value="${tomcat.home}"/>

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/pom.xml?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/pom.xml (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/pom.xml Mon Mar  3 12:39:06 2008
@@ -97,14 +97,26 @@
       <version>5.0-1</version>
     </dependency>
     <dependency>
+      <groupId>org.codehaus.swizzle</groupId>
+      <artifactId>swizzle-stream</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-tomcat-loader</artifactId>
+      <version>${version}</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.openejb</groupId>
-      <artifactId>openejb-loader</artifactId>
+      <artifactId>openejb-tomcat-catalina</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-core</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
       <exclusions>
         <exclusion>
           <groupId>org.apache.geronimo.modules</groupId>
@@ -130,47 +142,62 @@
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-webservices</artifactId>
+      <version>${version}</version>
+      <scope>runtime</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-cxf</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.geronimo.javamail</groupId>
       <artifactId>geronimo-javamail_1.4_mail</artifactId>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-client</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
-      <artifactId>openejb-tomcat-naming</artifactId>
+      <artifactId>openejb-tomcat-common</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-server</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-ejbd</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-hsql</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-http</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>org.apache.openejb</groupId>
       <artifactId>openejb-telnet</artifactId>
       <version>${version}</version>
+      <scope>runtime</scope>
     </dependency>
     <dependency>
       <groupId>junit</groupId>

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/assembly/war.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/assembly/war.xml?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/assembly/war.xml (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/assembly/war.xml Mon Mar  3 12:39:06 2008
@@ -52,9 +52,6 @@
     <fileSet>
       <directory>target/classes</directory>
       <outputDirectory>WEB-INF/classes</outputDirectory>
-      <includes>
-          <include>org/apache/openejb/tomcat/installer/**</include>
-      </includes>
     </fileSet>
     <fileSet>
       <directory>target</directory>
@@ -84,7 +81,7 @@
       <outputDirectory>WEB-INF/lib</outputDirectory>
       <scope>runtime</scope>
       <includes>
-          <include>org.apache.openejb:openejb-loader</include>
+          <include>org.apache.openejb:openejb-tomcat-loader</include>
           <include>org.codehaus.swizzle:swizzle-stream</include>
       </includes>
     </dependencySet>

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/META-INF/org.apache.openejb.tomcat/service-jar.xml Mon Mar  3 12:39:06 2008
@@ -220,7 +220,7 @@
           id="Tomcat Security Service"
           service="SecurityService"
           types="SecurityService"
-          class-name="org.apache.openejb.tomcat.TomcatSecurityService"/>
+          class-name="org.apache.openejb.tomcat.catalina.TomcatSecurityService"/>
 
   <ServiceProvider
           id="PseudoSecurityService"

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/WEB-INF/web.xml?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/WEB-INF/web.xml (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/WEB-INF/web.xml Mon Mar  3 12:39:06 2008
@@ -25,14 +25,14 @@
   <display-name>OpenEJB Loader Application</display-name>
 
   <servlet>
-    <servlet-name>ServerServlet</servlet-name>
-    <servlet-class>org.apache.openejb.tomcat.ServerServlet</servlet-class>
+    <servlet-name>LoaderServlet</servlet-name>
+    <servlet-class>org.apache.openejb.tomcat.loader.LoaderServlet</servlet-class>
+    <load-on-startup>0</load-on-startup>
   </servlet>
 
   <servlet>
-    <servlet-name>LoaderServlet</servlet-name>
-    <servlet-class>org.apache.openejb.loader.LoaderServlet</servlet-class>
-    <load-on-startup>0</load-on-startup>
+    <servlet-name>ServerServlet</servlet-name>
+    <servlet-class>org.apache.openejb.tomcat.common.ServerServlet</servlet-class>
   </servlet>
 
   <servlet>

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/index.jsp
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/index.jsp?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/index.jsp (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/index.jsp Mon Mar  3 12:39:06 2008
@@ -1,24 +1,24 @@
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-
-<!-- $Rev: 597221 $ $Date: 2007-11-21 22:51:05 +0100 (Wed, 21 Nov 2007) $ -->
-
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<!-- $Rev: 597221 $ $Date: 2007-11-21 22:51:05 +0100 (Wed, 21 Nov 2007) $ -->
+
 <%@ page import="org.apache.openejb.tomcat.installer.Installer" %>
 <html>
 <head>

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/installer-view.jsp
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/installer-view.jsp?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/installer-view.jsp (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/installer-view.jsp Mon Mar  3 12:39:06 2008
@@ -1,24 +1,24 @@
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-
-<!-- $Rev: 597221 $ $Date: 2007-11-21 22:51:05 +0100 (Wed, 21 Nov 2007) $ -->
-
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+
+<!-- $Rev: 597221 $ $Date: 2007-11-21 22:51:05 +0100 (Wed, 21 Nov 2007) $ -->
+
 <%@ page import="org.apache.openejb.tomcat.installer.Installer" %>
 <%@ page import="java.io.File" %>
 <%@ page import="org.apache.openejb.tomcat.installer.Paths" %>

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/testhome.jsp
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/testhome.jsp?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/testhome.jsp (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-webapp/src/main/resources/testhome.jsp Mon Mar  3 12:39:06 2008
@@ -24,7 +24,7 @@
 javax.servlet.jsp.JspWriter,
 java.io.File
 "%>
-<%@ page import="org.apache.openejb.tomcat.TomcatVersion"%>
+<%@ page import="org.apache.openejb.tomcat.common.TomcatVersion"%>
 <html>
 <head>
     <META http-equiv="Content-Type" content="text/html; charset=UTF-8">

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml (original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/pom.xml Mon Mar  3 12:39:06 2008
@@ -30,7 +30,9 @@
   <name>OpenEJB :: Assembly :: Tomcat</name>
 
   <modules>
-    <module>openejb-tomcat-naming</module>
+    <module>openejb-tomcat-loader</module>
+    <module>openejb-tomcat-catalina</module>
+    <module>openejb-tomcat-common</module>
     <module>openejb-tomcat-webapp</module>
   </modules>
 </project>

Modified: openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/iTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/iTest.java?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/iTest.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/iTest.java Mon Mar  3 12:39:06 2008
@@ -23,6 +23,7 @@
 import org.apache.openejb.test.entity.bmp.BmpLocalTestSuite;
 import org.apache.openejb.test.entity.cmp.CmpLocalTestSuite;
 import org.apache.openejb.test.entity.cmp2.Cmp2TestSuite;
+import org.apache.openejb.test.entity.cmr.CmrTestSuite;
 import org.apache.openejb.test.mdb.MdbTestSuite;
 import org.apache.openejb.test.stateful.StatefulLocalTestSuite;
 import org.apache.openejb.test.stateless.StatelessLocalTestSuite;
@@ -76,6 +77,7 @@
         suite.addTest(BmpLocalTestSuite.suite());
         suite.addTest(CmpLocalTestSuite.suite());
         suite.addTest(Cmp2TestSuite.suite());
+        suite.addTest(new CmrTestSuite());
         suite.addTest(MdbTestSuite.suite());
         return suite;
     }

Modified: openejb/trunk/openejb3/container/openejb-loader/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-loader/pom.xml?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-loader/pom.xml (original)
+++ openejb/trunk/openejb3/container/openejb-loader/pom.xml Mon Mar  3 12:39:06 2008
@@ -42,18 +42,6 @@
       <version>5.0-1</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>catalina</artifactId>
-      <version>6.0.13</version>
-      <optional>true</optional>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.tomcat</groupId>
-          <artifactId>servlet-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

Modified: openejb/trunk/openejb3/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java (original)
+++ openejb/trunk/openejb3/container/openejb-loader/src/main/java/org/apache/openejb/loader/Loader.java Mon Mar  3 12:39:06 2008
@@ -16,17 +16,15 @@
  */
 package org.apache.openejb.loader;
 
-import javax.servlet.ServletConfig;
+import java.io.IOException;
+import java.util.Properties;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.util.Properties;
 
 public interface Loader {
 
     public void init(Properties properties) throws Exception;
 
-    void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;
 }
 

Modified: openejb/trunk/openejb3/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java (original)
+++ openejb/trunk/openejb3/container/openejb-loader/src/main/java/org/apache/openejb/loader/TomcatClassPath.java Mon Mar  3 12:39:06 2008
@@ -54,7 +54,7 @@
             try {
                 addURLMethod = getAddURLMethod();
             } catch (Exception tomcat5Exception) {
-                throw new RuntimeException("Failed accessing classloader for Tomcat 4 or 5", tomcat5Exception);
+                throw new RuntimeException("Failed accessing classloader for Tomcat 5 or 6", tomcat5Exception);
             }
         }
 
@@ -110,8 +110,8 @@
             return;
         }
 
-        for (int j = 0; j < jarNames.length; j++) {
-            this.addJarToPath(new File(dir, jarNames[j]).toURL());
+        for (String jarName : jarNames) {
+            this.addJarToPath(new File(dir, jarName).toURL());
         }
         rebuild();
     }
@@ -130,9 +130,9 @@
 
         if (addRepositoryMethod != null) {
             String path = jar.toExternalForm();
-            addRepositoryMethod.invoke(classLoader, new Object[]{path});
+            addRepositoryMethod.invoke(classLoader, path);
         } else {
-            addURLMethod.invoke(classLoader, new Object[]{jar});
+            addURLMethod.invoke(classLoader, jar);
         }
     }
 
@@ -171,13 +171,13 @@
 
     }
 
-    private java.lang.reflect.Method getAddURLMethod() throws Exception {
-        return (java.lang.reflect.Method) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
-                java.lang.reflect.Method method = null;
+    private Method getAddURLMethod() throws Exception {
+        return AccessController.doPrivileged(new PrivilegedAction<Method>() {
+            public Method run() {
+                Method method = null;
                 try {
                     Class clazz = URLClassLoader.class;
-                    method = clazz.getDeclaredMethod("addURL", new Class[]{URL.class});
+                    method = clazz.getDeclaredMethod("addURL", URL.class);
                     method.setAccessible(true);
                     return method;
                 } catch (Exception e2) {
@@ -189,12 +189,12 @@
     }
 
     private Method getAddRepositoryMethod() throws Exception {
-        return (Method) AccessController.doPrivileged(new PrivilegedAction() {
-            public Object run() {
-                Method method = null;
+        return AccessController.doPrivileged(new PrivilegedAction<Method>() {
+            public Method run() {
+                Method method;
                 try {
                     Class clazz = getClassLoader().getClass();
-                    method = clazz.getDeclaredMethod("addRepository", new Class[]{String.class});
+                    method = clazz.getDeclaredMethod("addRepository", String.class);
                     method.setAccessible(true);
                     return method;
                 } catch (Exception e2) {
@@ -225,7 +225,7 @@
             }
 
 
-            JarFile jarFile = null;
+            JarFile jarFile;
             try {
                 String protocol = currentUrl.getProtocol();
                 if (protocol.equals("jar")) {

Modified: openejb/trunk/openejb3/examples/webapps/moviefun/moviefun-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/examples/webapps/moviefun/moviefun-webapp/src/main/webapp/WEB-INF/web.xml?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/examples/webapps/moviefun/moviefun-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ openejb/trunk/openejb3/examples/webapps/moviefun/moviefun-webapp/src/main/webapp/WEB-INF/web.xml Mon Mar  3 12:39:06 2008
@@ -26,7 +26,7 @@
 
     <servlet>
         <servlet-name>loader</servlet-name>
-        <servlet-class>org.apache.openejb.loader.LoaderServlet</servlet-class>
+        <servlet-class>org.apache.openejb.tomcat.loader.LoaderServlet</servlet-class>
 
         <init-param>
             <param-name>openejb.home</param-name>

Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/ClientTestSuite.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/ClientTestSuite.java?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/ClientTestSuite.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/ClientTestSuite.java Mon Mar  3 12:39:06 2008
@@ -20,6 +20,7 @@
 
 import org.apache.openejb.test.entity.bmp.BmpTestSuite;
 import org.apache.openejb.test.entity.cmp.CmpTestSuite;
+import org.apache.openejb.test.entity.cmp2.Cmp2TestSuite;
 import org.apache.openejb.test.stateful.StatefulTestSuite;
 import org.apache.openejb.test.stateless.StatelessTestSuite;
 import org.apache.openejb.test.mdb.MdbTestSuite;
@@ -41,6 +42,7 @@
         suite.addTest( StatefulTestSuite.suite() );
         suite.addTest( BmpTestSuite.suite() );
         suite.addTest( CmpTestSuite.suite() );
+        suite.addTest( Cmp2TestSuite.suite() );
         suite.addTest( MdbTestSuite.suite() );
         return suite;
     }

Modified: openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java?rev=633268&r1=633267&r2=633268&view=diff
==============================================================================
--- openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java (original)
+++ openejb/trunk/openejb3/itests/openejb-itests-client/src/main/java/org/apache/openejb/test/entity/cmp2/Cmp2TestSuite.java Mon Mar  3 12:39:06 2008
@@ -40,7 +40,6 @@
         this.addTest(new Cmp2AllowedOperationsTests());
         this.addTest(new Cmp2JndiEncTests());
         this.addTest(new Cmp2RmiIiopTests());
-        this.addTest(new CmrTestSuite());
 
         this.addTest(new Complex2HomeIntfcTests());
         this.addTest(new Complex2EjbHomeTests());