Author: struberg
Date: Tue Apr 11 22:30:55 2017
New Revision: 1791049
URL: http://svn.apache.org/viewvc?rev=1791049&view=rev
Log:
OWB-1175 make ServletContextBean registration configurable
This requires to add a init-param to the OWB Filter with startOwb=false
Added:
openwebbeans/trunk/webbeans-web/src/it/forward/
openwebbeans/trunk/webbeans-web/src/it/forward/a/
openwebbeans/trunk/webbeans-web/src/it/forward/a/pom.xml (with props)
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/WEB-INF/
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/WEB-INF/web.xml
(with props)
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/forward.jsp
(with props)
openwebbeans/trunk/webbeans-web/src/it/forward/b/
openwebbeans/trunk/webbeans-web/src/it/forward/b/pom.xml (with props)
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/it/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/it/beans/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/it/beans/RequestScopedBean.java
(with props)
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/WEB-INF/
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/WEB-INF/web.xml
(with props)
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/forward.jsp
(with props)
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/target.jsp
(with props)
openwebbeans/trunk/webbeans-web/src/it/forward/pom.xml
- copied, changed from r1790748,
openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml
openwebbeans/trunk/webbeans-web/src/it/forward/test/
openwebbeans/trunk/webbeans-web/src/it/forward/test/pom.xml (with props)
openwebbeans/trunk/webbeans-web/src/it/forward/test/src/
openwebbeans/trunk/webbeans-web/src/it/forward/test/src/main/
openwebbeans/trunk/webbeans-web/src/it/forward/test/src/main/tomcat/
openwebbeans/trunk/webbeans-web/src/it/forward/test/src/main/tomcat/context.xml
(with props)
Modified:
openwebbeans/trunk/pom.xml
openwebbeans/trunk/webbeans-ee/pom.xml
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java
openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml
openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml
openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationFilter.java
Modified: openwebbeans/trunk/pom.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/pom.xml?rev=1791049&r1=1791048&r2=1791049&view=diff
==============================================================================
--- openwebbeans/trunk/pom.xml (original)
+++ openwebbeans/trunk/pom.xml Tue Apr 11 22:30:55 2017
@@ -614,6 +614,7 @@
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<version>${geronimo_jta.version}</version>
+ <scope>provided</scope>
</dependency>
<dependency>
Modified: openwebbeans/trunk/webbeans-ee/pom.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-ee/pom.xml?rev=1791049&r1=1791048&r2=1791049&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-ee/pom.xml (original)
+++ openwebbeans/trunk/webbeans-ee/pom.xml Tue Apr 11 22:30:55 2017
@@ -48,7 +48,6 @@
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
- <scope>provided</scope>
</dependency>
<dependency>
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java?rev=1791049&r1=1791048&r2=1791049&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/context/AbstractContextsService.java
Tue Apr 11 22:30:55 2017
@@ -60,7 +60,6 @@ public abstract class AbstractContextsSe
@Override
public Context getCurrentContext(Class<? extends Annotation> scopeType)
{
-
return null;
}
Modified: openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml?rev=1791049&r1=1791048&r2=1791049&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml
(original)
+++ openwebbeans/trunk/webbeans-tomcat7/src/it/servletinjection/pom.xml Tue Apr
11 22:30:55 2017
@@ -87,7 +87,7 @@
<!-- needed for the tomcat7 integration tests -->
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
- <version>2.0</version>
+ <version>2.2</version>
<dependencies>
<dependency>
<groupId>jstl</groupId>
@@ -276,7 +276,7 @@
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
- <version>2.0</version>
+ <version>2.2</version>
<configuration>
<path>/${project.build.finalName}</path>
<addContextWarDependencies>true</addContextWarDependencies>
Added: openwebbeans/trunk/webbeans-web/src/it/forward/a/pom.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/a/pom.xml?rev=1791049&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/it/forward/a/pom.xml (added)
+++ openwebbeans/trunk/webbeans-web/src/it/forward/a/pom.xml Tue Apr 11
22:30:55 2017
@@ -0,0 +1,32 @@
+<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">
+ <!--
+ 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.
+ -->
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.openwebbeans.it</groupId>
+ <artifactId>openwebbeans-web-it-forward</artifactId>
+ <version>@project.version@</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.apache.openwebbeans.it</groupId>
+ <artifactId>openwebbeans-web-it-forward-a</artifactId>
+ <packaging>war</packaging>
+
+</project>
Propchange: openwebbeans/trunk/webbeans-web/src/it/forward/a/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/WEB-INF/web.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/WEB-INF/web.xml?rev=1791049&view=auto
==============================================================================
---
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/WEB-INF/web.xml
(added)
+++
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/WEB-INF/web.xml
Tue Apr 11 22:30:55 2017
@@ -0,0 +1,29 @@
+<?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.
+-->
+<web-app id="owb-web-it" version="3.0"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <listener>
+
<listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+ </listener>
+
+</web-app>
Propchange:
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/forward.jsp
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/forward.jsp?rev=1791049&view=auto
==============================================================================
---
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/forward.jsp
(added)
+++
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/forward.jsp
Tue Apr 11 22:30:55 2017
@@ -0,0 +1,25 @@
+<!--
+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.
+-->
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%
+ ServletContext bContext = request.getServletContext().getContext("/b");
+ RequestDispatcher dispatcher =
bContext.getRequestDispatcher("/target.jsp");
+ dispatcher.forward(request,response);
+ System.out.println("leaving forward.jsp page");
+%>
Propchange:
openwebbeans/trunk/webbeans-web/src/it/forward/a/src/main/webapp/forward.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added: openwebbeans/trunk/webbeans-web/src/it/forward/b/pom.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/b/pom.xml?rev=1791049&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/it/forward/b/pom.xml (added)
+++ openwebbeans/trunk/webbeans-web/src/it/forward/b/pom.xml Tue Apr 11
22:30:55 2017
@@ -0,0 +1,61 @@
+<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">
+ <!--
+ 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.
+ -->
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.openwebbeans.it</groupId>
+ <artifactId>openwebbeans-web-it-forward</artifactId>
+ <version>@project.version@</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.apache.openwebbeans.it</groupId>
+ <artifactId>openwebbeans-web-it-forward-b</artifactId>
+ <packaging>war</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jcdi_1.1_spec</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-atinject_1.0_spec</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-interceptor_1.2_spec</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-servlet_3.0_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.openwebbeans</groupId>
+ <artifactId>openwebbeans-web</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+</project>
Propchange: openwebbeans/trunk/webbeans-web/src/it/forward/b/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/it/beans/RequestScopedBean.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/it/beans/RequestScopedBean.java?rev=1791049&view=auto
==============================================================================
---
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/it/beans/RequestScopedBean.java
(added)
+++
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/it/beans/RequestScopedBean.java
Tue Apr 11 22:30:55 2017
@@ -0,0 +1,32 @@
+/*
+ * 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.openwebbeans.web.it.beans;
+
+import javax.enterprise.context.RequestScoped;
+
+@RequestScoped
+public class RequestScopedBean
+{
+
+ public String ping()
+ {
+ return "me";
+ }
+
+}
Propchange:
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/java/org/apache/openwebbeans/web/it/beans/RequestScopedBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/WEB-INF/web.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/WEB-INF/web.xml?rev=1791049&view=auto
==============================================================================
---
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/WEB-INF/web.xml
(added)
+++
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/WEB-INF/web.xml
Tue Apr 11 22:30:55 2017
@@ -0,0 +1,43 @@
+<?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.
+-->
+<web-app id="owb-web-it" version="3.0"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
+
+ <listener>
+
<listener-class>org.apache.webbeans.servlet.WebBeansConfigurationListener</listener-class>
+ </listener>
+ <filter>
+ <filter-name>owbfilter</filter-name>
+
<filter-class>org.apache.webbeans.servlet.WebBeansConfigurationFilter</filter-class>
+ <init-param>
+ <param-name>startOwb</param-name>
+ <param-value>false</param-value>
+ </init-param>
+ </filter>
+ <filter-mapping>
+ <filter-name>owbfilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+
+</web-app>
Propchange:
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/forward.jsp
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/forward.jsp?rev=1791049&view=auto
==============================================================================
---
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/forward.jsp
(added)
+++
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/forward.jsp
Tue Apr 11 22:30:55 2017
@@ -0,0 +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.
+-->
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%
+ RequestDispatcher dispatcher = request.getRequestDispatcher("/target.jsp");
+ dispatcher.forward(request,response);
+ System.out.println("leaving forward.jsp page");
+%>
Propchange:
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/forward.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/target.jsp
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/target.jsp?rev=1791049&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/target.jsp
(added)
+++ openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/target.jsp
Tue Apr 11 22:30:55 2017
@@ -0,0 +1,37 @@
+<!--
+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.
+-->
+<%@ page import="java.util.Date" %>
+<%@ page import="javax.enterprise.inject.spi.CDI" %>
+<%@ page import="org.apache.openwebbeans.web.it.beans.RequestScopedBean" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%
+ System.out.println("entering target.jsp page");
+ CDI.current().select(RequestScopedBean.class).get().ping();
+%>
+<html>
+<head>
+ <title>target page</title>
+</head>
+<body>
+All fine!
+</body>
+</html>
+<%
+ System.out.println("leaving target.jsp page");
+%>
Propchange:
openwebbeans/trunk/webbeans-web/src/it/forward/b/src/main/webapp/target.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Copied: openwebbeans/trunk/webbeans-web/src/it/forward/pom.xml (from r1790748,
openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml)
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/pom.xml?p2=openwebbeans/trunk/webbeans-web/src/it/forward/pom.xml&p1=openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml&r1=1790748&r2=1791049&rev=1791049&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml (original)
+++ openwebbeans/trunk/webbeans-web/src/it/forward/pom.xml Tue Apr 11 22:30:55
2017
@@ -25,239 +25,14 @@
</parent>
<groupId>org.apache.openwebbeans.it</groupId>
- <artifactId>openwebbeans-web-it-webcdiapp</artifactId>
- <packaging>war</packaging>
+ <artifactId>openwebbeans-web-it-forward</artifactId>
+ <packaging>pom</packaging>
- <name>Webbeans Web IT</name>
+ <modules>
+ <module>a</module>
+ <module>b</module>
+ <module>test</module>
+ </modules>
- <!--
- For locally debugging this integration test you need to first build
the module.
- Afterwards cd into target/it/webcdiapp and start tomcat with
- $ mvn clean package tomcat7:run -Dtomcat.fork=false
- -->
-
- <properties>
- <tomcat.fork>true</tomcat.fork>
- <tomcat.port.it>8089</tomcat.port.it>
- </properties>
-
-
- <dependencies>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-jcdi_1.1_spec</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-atinject_1.0_spec</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-interceptor_1.2_spec</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.geronimo.specs</groupId>
- <artifactId>geronimo-servlet_3.0_spec</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.openwebbeans</groupId>
- <artifactId>openwebbeans-web</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- <dependency>
- <groupId>jstl</groupId>
- <artifactId>jstl</artifactId>
- <version>1.2</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpclient</artifactId>
- <version>${httpclient.version}</version>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-
-
- <build>
- <finalName>webbeanswebCdiApp</finalName>
-
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.tomcat.maven</groupId>
- <artifactId>tomcat7-maven-plugin</artifactId>
- <version>2.2</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-core</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-util</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-coyote</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-api</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jdbc</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-dbcp</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-servlet-api</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jsp-api</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jasper</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-jasper-el</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-el-api</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-catalina</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-tribes</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-catalina-ha</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-annotations-api</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat</groupId>
- <artifactId>tomcat-juli</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-logging-juli</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.tomcat.embed</groupId>
- <artifactId>tomcat-embed-logging-log4j</artifactId>
- <version>${tomcat7.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </pluginManagement>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <version>2.11</version>
- <executions>
- <execution>
- <id>integration-test</id>
- <goals>
- <goal>integration-test</goal>
- </goals>
- </execution>
- <execution>
- <id>verify</id>
- <goals>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.tomcat.maven</groupId>
- <artifactId>tomcat7-maven-plugin</artifactId>
- <version>2.0</version>
- <configuration>
- <path>/${project.build.finalName}</path>
- <port>${tomcat.port.it}</port>
- <fork>${tomcat.fork}</fork> <!-- true is needed for IT,
but if we want to debug it we do not want to fork -->
- </configuration>
- <executions>
- <execution>
- <id>start-tomcat</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-tomcat</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>shutdown</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
</project>
Added: openwebbeans/trunk/webbeans-web/src/it/forward/test/pom.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/test/pom.xml?rev=1791049&view=auto
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/it/forward/test/pom.xml (added)
+++ openwebbeans/trunk/webbeans-web/src/it/forward/test/pom.xml Tue Apr 11
22:30:55 2017
@@ -0,0 +1,262 @@
+<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">
+ <!--
+ 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.
+ -->
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.openwebbeans.it</groupId>
+ <artifactId>openwebbeans-web-it-forward</artifactId>
+ <version>@project.version@</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.apache.openwebbeans.it</groupId>
+ <artifactId>openwebbeans-web-it-forward-test</artifactId>
+ <packaging>jar</packaging>
+
+ <!--
+ For locally debugging this integration test you need to first build
the module.
+ Afterwards cd into target/it/webcdiapp and start tomcat with
+ $ mvn clean package tomcat7:run -Dtomcat.fork=false
+ -->
+
+ <properties>
+ <tomcat.fork>true</tomcat.fork>
+ <tomcat.port.it>8089</tomcat.port.it>
+ </properties>
+
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.openwebbeans.it</groupId>
+ <artifactId>openwebbeans-web-it-forward-a</artifactId>
+ <version>@project.version@</version>
+ <type>war</type>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openwebbeans.it</groupId>
+ <artifactId>openwebbeans-web-it-forward-b</artifactId>
+ <version>@project.version@</version>
+ <type>war</type>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>${httpclient.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-maven-plugin</artifactId>
+ <version>2.2</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-core</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-util</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-coyote</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-api</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jdbc</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-dbcp</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-servlet-api</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jsp-api</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jasper</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-jasper-el</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-el-api</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-catalina</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-tribes</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-catalina-ha</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-annotations-api</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>tomcat-juli</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-juli</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.tomcat.embed</groupId>
+ <artifactId>tomcat-embed-logging-log4j</artifactId>
+ <version>${tomcat7.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.11</version>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.tomcat.maven</groupId>
+ <artifactId>tomcat7-maven-plugin</artifactId>
+ <version>2.2</version>
+ <configuration>
+ <path>/${project.build.finalName}</path>
+ <port>${tomcat.port.it}</port>
+ <fork>${tomcat.fork}</fork> <!-- true is needed for IT,
but if we want to debug it we do not want to fork -->
+ <webapps>
+ <webapp>
+ <groupId>org.apache.openwebbeans.it</groupId>
+
<artifactId>openwebbeans-web-it-forward-a</artifactId>
+ <version>@project.version@</version>
+ <type>war</type>
+ <asWebapp>true</asWebapp>
+ <contextPath>/a</contextPath>
+ </webapp>
+ <webapp>
+ <groupId>org.apache.openwebbeans.it</groupId>
+
<artifactId>openwebbeans-web-it-forward-b</artifactId>
+ <version>@project.version@</version>
+ <type>war</type>
+ <asWebapp>true</asWebapp>
+ <contextPath>/b</contextPath>
+ </webapp>
+ </webapps>
+ <contextFile>src/main/tomcat/context.xml</contextFile>
+ </configuration>
+ <executions>
+ <execution>
+ <id>start-tomcat</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop-tomcat</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>shutdown</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: openwebbeans/trunk/webbeans-web/src/it/forward/test/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added:
openwebbeans/trunk/webbeans-web/src/it/forward/test/src/main/tomcat/context.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/forward/test/src/main/tomcat/context.xml?rev=1791049&view=auto
==============================================================================
---
openwebbeans/trunk/webbeans-web/src/it/forward/test/src/main/tomcat/context.xml
(added)
+++
openwebbeans/trunk/webbeans-web/src/it/forward/test/src/main/tomcat/context.xml
Tue Apr 11 22:30:55 2017
@@ -0,0 +1,35 @@
+<?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.
+-->
+<!-- The contents of this file will be loaded for each web application -->
+<Context crossContext="true">
+
+ <!-- Default set of monitored resources -->
+ <WatchedResource>WEB-INF/web.xml</WatchedResource>
+
+ <!-- Uncomment this to disable session persistence across Tomcat restarts
-->
+ <!--
+ <Manager pathname="" />
+ -->
+
+ <!-- Uncomment this to enable Comet connection tacking (provides events
+ on session expiration as well as webapp lifecycle) -->
+ <!--
+ <Valve className="org.apache.catalina.valves.CometConnectionManagerValve"
/>
+ -->
+
+</Context>
\ No newline at end of file
Propchange:
openwebbeans/trunk/webbeans-web/src/it/forward/test/src/main/tomcat/context.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml?rev=1791049&r1=1791048&r2=1791049&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml (original)
+++ openwebbeans/trunk/webbeans-web/src/it/webcdiapp/pom.xml Tue Apr 11
22:30:55 2017
@@ -234,7 +234,7 @@
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
- <version>2.0</version>
+ <version>2.2</version>
<configuration>
<path>/${project.build.finalName}</path>
<port>${tomcat.port.it}</port>
Modified:
openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationFilter.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationFilter.java?rev=1791049&r1=1791048&r2=1791049&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationFilter.java
(original)
+++
openwebbeans/trunk/webbeans-web/src/main/java/org/apache/webbeans/servlet/WebBeansConfigurationFilter.java
Tue Apr 11 22:30:55 2017
@@ -66,6 +66,7 @@ public class WebBeansConfigurationFilter
private WebBeansContext webBeansContext;
private ServletContext servletContext;
private WebContextsService webContextsService;
+ private boolean startOwb;
/**
* Default constructor
@@ -83,18 +84,24 @@ public class WebBeansConfigurationFilter
public void init(FilterConfig filterConfig) throws ServletException
{
this.lifeCycle = webBeansContext.getService(ContainerLifecycle.class);
+ this.servletContext = filterConfig.getServletContext();
- try
+ String startOwbCfg = filterConfig.getInitParameter("startOwb");
+ startOwb = startOwbCfg == null || "true".equalsIgnoreCase(startOwbCfg);
+ if (startOwb)
{
- this.servletContext = filterConfig.getServletContext();
- this.lifeCycle.startApplication(new
ServletContextEvent(this.servletContext));
- }
- catch (Exception e)
- {
- logger.log(Level.SEVERE,
-
WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0018,
ServletCompatibilityUtil.getServletInfo(servletContext)));
- WebBeansUtil.throwRuntimeExceptions(e);
+ try
+ {
+ this.lifeCycle.startApplication(new
ServletContextEvent(this.servletContext));
+
+ }
+ catch (Exception e)
+ {
+ logger.log(Level.SEVERE,
+
WebBeansLoggerFacade.constructMessage(OWBLogConst.ERROR_0018,
ServletCompatibilityUtil.getServletInfo(servletContext)));
+ WebBeansUtil.throwRuntimeExceptions(e);
+ }
}
}
@@ -193,12 +200,15 @@ public class WebBeansConfigurationFilter
@Override
public void destroy()
{
- this.lifeCycle.stopApplication(new
ServletContextEvent(this.servletContext));
- this.lifeCycle = null;
- this.servletContext = null;
+ if (startOwb)
+ {
+ this.lifeCycle.stopApplication(new
ServletContextEvent(this.servletContext));
+ this.lifeCycle = null;
+ this.servletContext = null;
- // just to be sure that we didn't lazily create anything...
- cleanupRequestThreadLocals();
+ // just to be sure that we didn't lazily create anything...
+ cleanupRequestThreadLocals();
+ }
}
/**