tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgallim...@apache.org
Subject svn commit: r1056314 - in /openejb/trunk/openejb3/assembly: itest-runner/src/test/groovy/commands/ openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/ openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/op...
Date Fri, 07 Jan 2011 13:49:32 GMT
Author: jgallimore
Date: Fri Jan  7 13:49:32 2011
New Revision: 1056314

URL: http://svn.apache.org/viewvc?rev=1056314&view=rev
Log:
OPENEJB-1403 all itests now passing in Tomcat 7.0.4 and  7.0.5

Modified:
    openejb/trunk/openejb3/assembly/itest-runner/src/test/groovy/commands/SetupCommand.groovy
    openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/GlobalListenerSupport.java
    openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/TomcatWsRegistry.java
    openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHelper.java

Modified: openejb/trunk/openejb3/assembly/itest-runner/src/test/groovy/commands/SetupCommand.groovy
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/itest-runner/src/test/groovy/commands/SetupCommand.groovy?rev=1056314&r1=1056313&r2=1056314&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/itest-runner/src/test/groovy/commands/SetupCommand.groovy
(original)
+++ openejb/trunk/openejb3/assembly/itest-runner/src/test/groovy/commands/SetupCommand.groovy
Fri Jan  7 13:49:32 2011
@@ -87,9 +87,8 @@ class SetupCommand
 	}
 	
 	def execute() {
-		//execute("6.0.29")
-		//execute("testonly")
-        execute("7.0.4")
+		execute("6.0.29")
+		execute("7.0.5")
 	}
 	
     def execute(tomcatVersion) {

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/GlobalListenerSupport.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/GlobalListenerSupport.java?rev=1056314&r1=1056313&r2=1056314&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/GlobalListenerSupport.java
(original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/GlobalListenerSupport.java
Fri Jan  7 13:49:32 2011
@@ -27,6 +27,7 @@ import org.apache.catalina.core.Standard
 import org.apache.catalina.core.StandardEngine;
 import org.apache.catalina.core.StandardHost;
 import org.apache.catalina.core.StandardServer;
+import org.apache.openejb.tomcat.loader.TomcatHelper;
 
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
@@ -71,7 +72,6 @@ public class GlobalListenerSupport imple
     public void lifecycleEvent(LifecycleEvent event) {
         Object source = event.getSource();
         if (source instanceof StandardContext) {
-        	String tomcatVersion = System.getProperty("tomcat.version");
             StandardContext standardContext = (StandardContext) source;
             String type = event.getType();
             
@@ -80,7 +80,7 @@ public class GlobalListenerSupport imple
             } else if (Lifecycle.BEFORE_START_EVENT.equals(type)) {
                 contextListener.beforeStart(standardContext);
             } else if (Lifecycle.START_EVENT.equals(type)) {
-            	if (tomcatVersion.startsWith("7.")) {
+            	if (TomcatHelper.isTomcat7()) {
             		standardContext.addParameter("openejb.start.late", "true");
             	}
             	
@@ -88,7 +88,7 @@ public class GlobalListenerSupport imple
             } else if (Lifecycle.AFTER_START_EVENT.equals(type)) {
                 contextListener.afterStart(standardContext);
                 
-                if (tomcatVersion.startsWith("7.")) {
+                if (TomcatHelper.isTomcat7()) {
             		standardContext.removeParameter("openejb.start.late");
             	}
             } else if (Lifecycle.BEFORE_STOP_EVENT.equals(type)) {

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/TomcatWsRegistry.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/TomcatWsRegistry.java?rev=1056314&r1=1056313&r2=1056314&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/TomcatWsRegistry.java
(original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-catalina/src/main/java/org/apache/openejb/tomcat/catalina/TomcatWsRegistry.java
Fri Jan  7 13:49:32 2011
@@ -148,8 +148,14 @@ public class TomcatWsRegistry implements
         // configured true, or it will treat it as a failed deployment
         context.addLifecycleListener(new LifecycleListener() {
             public void lifecycleEvent(LifecycleEvent event) {
-                if (event.getType().equals(Lifecycle.START_EVENT)) {
-                    Context context = (Context) event.getLifecycle();
+            	Context context = (Context) event.getLifecycle();
+            	
+            	if (event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
+            		context.getServletContext().setAttribute(IGNORE_CONTEXT, "true");	
+            	}
+            	
+            	
+            	if (event.getType().equals(Lifecycle.START_EVENT) || event.getType().equals(Lifecycle.BEFORE_START_EVENT)
|| event.getType().equals("configure_start")) {
                     context.setConfigured(true);
                 }
             }
@@ -205,22 +211,26 @@ public class TomcatWsRegistry implements
         }
 
         // Mark this as a dynamic context that should not be inspected by the TomcatWebAppBuilder
-        context.getServletContext().setAttribute(IGNORE_CONTEXT, "true");
 
         // build the servlet
         Wrapper wrapper = context.createWrapper();
         wrapper.setName("webservice");
         wrapper.setServletClass(WsServlet.class.getName());
-        setWsContainer(context, wrapper, httpListener);
-        wrapper.addMapping("/*");
-
 
         // add add servlet to context
         context.addChild(wrapper);
+        wrapper.addMapping("/*");
         context.addServletMapping("/*", "webservice");
 
+        String webServicecontainerID = wrapper.getName() + WsServlet.WEBSERVICE_CONTAINER
+ httpListener.hashCode();
+        wrapper.addInitParameter(WsServlet.WEBSERVICE_CONTAINER, webServicecontainerID);
+        
         // add context to host
         host.addChild(context);
+
+		context.getServletContext().setAttribute(IGNORE_CONTEXT, "true");
+		setWsContainer(context, wrapper, httpListener);
+		
         webserviceContexts.put(path, context);
 
         // register wsdl locations for service-ref resolution

Modified: openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHelper.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHelper.java?rev=1056314&r1=1056313&r2=1056314&view=diff
==============================================================================
--- openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHelper.java
(original)
+++ openejb/trunk/openejb3/assembly/openejb-tomcat/openejb-tomcat-loader/src/main/java/org/apache/openejb/tomcat/loader/TomcatHelper.java
Fri Jan  7 13:49:32 2011
@@ -117,7 +117,7 @@ public class TomcatHelper {
 		return false;
 	}
 
-	private static boolean isTomcat7() {
+	public static boolean isTomcat7() {
 		return System.getProperty("tomcat.version").startsWith("7.");
 	}
 }



Mime
View raw message