Author: mwringe
Date: 2009-07-06 16:47:04 -0400 (Mon, 06 Jul 2009)
New Revision: 13525
Added:
jbossexo/modules/web/trunk/.settings/org.eclipse.jdt.core.prefs
jbossexo/modules/web/trunk/.settings/org.maven.ide.eclipse.prefs
jbossexo/modules/web/trunk/build/target/
jbossexo/modules/web/trunk/exo/
jbossexo/modules/web/trunk/exo/pom.xml
jbossexo/modules/web/trunk/exo/src/
jbossexo/modules/web/trunk/exo/src/main/
jbossexo/modules/web/trunk/exo/src/main/java/
jbossexo/modules/web/trunk/exo/src/main/java/org/
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/PortletApplicationListener.java
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/ServletWrapper.java
jbossexo/modules/web/trunk/exo/src/main/resources/
jbossexo/modules/web/trunk/exo/src/main/resources/conf/
jbossexo/modules/web/trunk/exo/src/main/resources/conf/portal/
jbossexo/modules/web/trunk/exo/src/test/
jbossexo/modules/web/trunk/exo/src/test/java/
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/DefaultServletContainerWrapper.java
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericServletListener.java
jbossexo/modules/web/trunk/web/src/main/resources/
jbossexo/modules/web/trunk/web/src/main/resources/conf/
jbossexo/modules/web/trunk/web/src/main/resources/conf/configuration.xml
Modified:
jbossexo/modules/web/trunk/
jbossexo/modules/web/trunk/.classpath
jbossexo/modules/web/trunk/.project
jbossexo/modules/web/trunk/build/pom.xml
jbossexo/modules/web/trunk/pom.xml
jbossexo/modules/web/trunk/web/pom.xml
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/DefaultServletContainer.java
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericBootstrapServlet.java
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericServletContainerContext.java
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/PortletContainerBootstrapServlet.java
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/spi/ServletContainerContext.java
jbossexo/modules/web/trunk/web/src/test/build.xml
jbossexo/modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/container/ServletContainerTestCase.java
jbossexo/modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/spi/SPITestCase.java
jbossexo/modules/web/trunk/web/src/test/resources/portal-test-endpoint-jar/org/jboss/portal/test/web/server-beans.xml
jbossexo/modules/web/trunk/web/src/test/resources/portal-test-spi-jar/org/jboss/portal/test/web/server-beans.xml
Log:
Update web module to use eXo kernel.
Provide compatibility with eXo portal.
Property changes on: jbossexo/modules/web/trunk
___________________________________________________________________
Name: svn:ignore
- thirdparty
+ thirdparty
target
Modified: jbossexo/modules/web/trunk/.classpath
===================================================================
--- jbossexo/modules/web/trunk/.classpath 2009-07-06 19:31:34 UTC (rev 13524)
+++ jbossexo/modules/web/trunk/.classpath 2009-07-06 20:47:04 UTC (rev 13525)
@@ -1,8 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="web/src/main/java"/>
- <classpathentry kind="src" path="web/src/test/java"/>
+ <classpathentry kind="src" output="web/target/classes"
path="web/src/main/java"/>
+ <classpathentry excluding="**" kind="src"
output="web/target/classes" path="web/src/main/resources"/>
+ <classpathentry kind="src" output="web/target/test-classes"
path="web/src/test/java"/>
+ <classpathentry excluding="**" kind="src"
output="web/target/test-classes" path="web/src/test/resources"/>
+ <classpathentry kind="src" output="exo/target/classes"
path="exo/src/main/java"/>
+ <classpathentry excluding="**" kind="src"
output="exo/target/classes" path="exo/src/main/resources"/>
+ <classpathentry kind="src" output="exo/target/test-classes"
path="exo/src/test/java"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER/modules"/>
- <classpathentry kind="output" path="bin"/>
+ <classpathentry kind="con"
path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
</classpath>
Modified: jbossexo/modules/web/trunk/.project
===================================================================
--- jbossexo/modules/web/trunk/.project 2009-07-06 19:31:34 UTC (rev 13524)
+++ jbossexo/modules/web/trunk/.project 2009-07-06 20:47:04 UTC (rev 13525)
@@ -6,12 +6,12 @@
</projects>
<buildSpec>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
Added: jbossexo/modules/web/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- jbossexo/modules/web/trunk/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++ jbossexo/modules/web/trunk/.settings/org.eclipse.jdt.core.prefs 2009-07-06 20:47:04
UTC (rev 13525)
@@ -0,0 +1,5 @@
+#Mon Jul 06 16:36:21 EDT 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.3
Added: jbossexo/modules/web/trunk/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- jbossexo/modules/web/trunk/.settings/org.maven.ide.eclipse.prefs
(rev 0)
+++ jbossexo/modules/web/trunk/.settings/org.maven.ide.eclipse.prefs 2009-07-06 20:47:04
UTC (rev 13525)
@@ -0,0 +1,9 @@
+#Mon Jul 06 16:36:11 EDT 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=true
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
Modified: jbossexo/modules/web/trunk/build/pom.xml
===================================================================
--- jbossexo/modules/web/trunk/build/pom.xml 2009-07-06 19:31:34 UTC (rev 13524)
+++ jbossexo/modules/web/trunk/build/pom.xml 2009-07-06 20:47:04 UTC (rev 13525)
@@ -26,7 +26,7 @@
<properties>
<version.concurrent>1.3.4</version.concurrent>
- <version.sun.servlet>2.4</version.sun.servlet>
+ <version.servlet.api>2.5</version.servlet.api>
<version.apache.tomcat>6.0.16</version.apache.tomcat>
<version.jetty>6.1.7</version.jetty>
<version.jboss-logging>2.0.4.GA</version.jboss-logging>
@@ -42,6 +42,7 @@
<version.cargo>1.0-alpha-6</version.cargo>
<version.junit>3.8.1</version.junit>
<version.ant>1.7.0</version.ant>
+ <version.exo.kernel>2.1.1</version.exo.kernel>
</properties>
<repositories>
@@ -66,6 +67,17 @@
<enabled>false</enabled>
</releases>
</repository>
+ <repository>
+ <id>openqa-releases</id>
+ <name>OpenQA Selenium Repository</name>
+ <
url>http://archiva.openqa.org/repository/releases/</url>
+ </repository>
+ <repository>
+ <id>exo-int</id>
+ <
name>exoplatform.org internal repository</name>
+ <
url>http://maven2.exoplatform.org/rest/maven2</url>
+ <layout>default</layout>
+ </repository>
</repositories>
<build>
@@ -114,9 +126,9 @@
<version>${version.jboss.portal.common}</version>
</dependency>
<dependency>
- <groupId>sun-servlet</groupId>
+ <groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
- <version>${version.sun.servlet}</version>
+ <version>${version.servlet.api}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
@@ -246,6 +258,14 @@
<artifactId>cargo-core-uberjar</artifactId>
<version>${version.cargo}</version>
</dependency>
+
+ <!-- Dependencies for EXO integration -->
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${version.exo.kernel}</version>
+ </dependency>
+
</dependencies>
</dependencyManagement>
Property changes on: jbossexo/modules/web/trunk/exo
___________________________________________________________________
Name: svn:ignore
+ target
Added: jbossexo/modules/web/trunk/exo/pom.xml
===================================================================
--- jbossexo/modules/web/trunk/exo/pom.xml (rev 0)
+++ jbossexo/modules/web/trunk/exo/pom.xml 2009-07-06 20:47:04 UTC (rev 13525)
@@ -0,0 +1,27 @@
+<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>
+ <groupId>org.jboss.portal.web</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>web-exo-integration</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss Unit</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.portal.web</groupId>
+ <artifactId>web-web</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added:
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/PortletApplicationListener.java
===================================================================
---
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/PortletApplicationListener.java
(rev 0)
+++
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/PortletApplicationListener.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -0,0 +1,39 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.exoplatform.services.portletcontainer.impl.servlet;
+
+import org.jboss.portal.web.impl.generic.GenericServletListener;
+
+/**
+ * This class is just an empty Wrapper around the GenericServletListener
+ * class. This class exists to provide backwards compatiblity for portlets
+ * that have been setup to be deployable on versions of eXo portal.
+ *
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class PortletApplicationListener extends GenericServletListener
+{
+ //intentionally left empty
+}
+
Added:
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/ServletWrapper.java
===================================================================
---
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/ServletWrapper.java
(rev 0)
+++
jbossexo/modules/web/trunk/exo/src/main/java/org/exoplatform/services/portletcontainer/impl/servlet/ServletWrapper.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -0,0 +1,52 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.exoplatform.services.portletcontainer.impl.servlet;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+
+import org.jboss.portal.web.command.CommandServlet;
+
+/**
+ * This class is just an empty wrapper around the command servlet
+ * wrapper. This class exists to provide backwards compatiblity with
+ * portlets that were deployable with the eXo portal.
+ *
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class ServletWrapper extends CommandServlet
+{
+
+ public void init(ServletConfig servletConfig) throws ServletException
+ {
+ super.init(servletConfig);
+ }
+
+ public void destroy()
+ {
+ super.destroy();
+ }
+
+}
+
Modified: jbossexo/modules/web/trunk/pom.xml
===================================================================
--- jbossexo/modules/web/trunk/pom.xml 2009-07-06 19:31:34 UTC (rev 13524)
+++ jbossexo/modules/web/trunk/pom.xml 2009-07-06 20:47:04 UTC (rev 13525)
@@ -28,6 +28,7 @@
<modules>
<module>build</module>
<module>web</module>
+ <module>exo</module>
</modules>
<reporting>
Modified: jbossexo/modules/web/trunk/web/pom.xml
===================================================================
--- jbossexo/modules/web/trunk/web/pom.xml 2009-07-06 19:31:34 UTC (rev 13524)
+++ jbossexo/modules/web/trunk/web/pom.xml 2009-07-06 20:47:04 UTC (rev 13525)
@@ -29,12 +29,18 @@
</exclusions>
</dependency>
<dependency>
- <groupId>sun-servlet</groupId>
+ <groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>catalina</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.tomcat</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
@@ -44,6 +50,11 @@
<groupId>apache-log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
<!-- SCOPE TEST -->
<dependency>
@@ -161,6 +172,12 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-api</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
@@ -249,6 +266,15 @@
<!-- Cargo Jetty deployer -->
<property name="dependency.cargo.jetty-deployer"
value="${maven.dependency.org.codehaus.cargo.cargo-jetty-deployer.war.path}"/>
+ <!-- EXO -->
+ <property name="dependency.exo.kernel.container"
value="${maven.dependency.org.exoplatform.kernel.exo.kernel.container.jar.path}"/>
+ <property name="dependency.exo.kernel.commons"
value="${maven.dependency.org.exoplatform.kernel.exo.kernel.commons.jar.path}"/>
+ <property name="dependency.picocontainer"
value="${maven.dependency.picocontainer.picocontainer.jar.path}"/>
+ <property name="dependency.commons.logging"
value="${maven.dependency.commons-logging.commons-logging-api.jar.path}"/>
+ <property name="dependency.jibx"
value="${maven.dependency.org.jibx.jibx-run.jar.path}"/>
+ <property name="dependency.javax.xml.stream"
value="${maven.dependency.javax.xml.stream.stax-api.jar.path}"/>
+ <property name="dependency.xpp3"
value="${maven.dependency.xpp3.xpp3.jar.path}"/>
+
<ant antfile="${basedir}/src/test/build.xml">
<target name="tests"/>
</ant>
Modified:
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/DefaultServletContainer.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/DefaultServletContainer.java 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/DefaultServletContainer.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.web.impl;
+import org.jboss.portal.web.command.CommandDispatcher;
import org.jboss.portal.web.spi.ServletContainerContext;
import org.jboss.portal.web.spi.WebAppContext;
import org.jboss.portal.web.WebAppListener;
@@ -42,6 +43,7 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
/**
@@ -65,6 +67,8 @@
/** The callback. */
private RegistrationImpl registration;
+
+ CommandDispatcher commandDispatcher = new CommandDispatcher();
public void register(ServletContainerContext context)
{
@@ -80,10 +84,15 @@
{
registration = new RegistrationImpl(this, context);
+ }
+ else
+ {
+ registration.addContext(context);
+ }
- // Installs the call back
- context.setCallback(registration);
- }
+ // Installs the call back
+ context.setCallback(registration);
+
}
}
@@ -187,7 +196,7 @@
}
//
- return registration.context.include(targetServletContext, request, response,
callback, handback);
+ return commandDispatcher.include(targetServletContext, request, response, callback,
handback);
}
private static class RegistrationImpl implements ServletContainerContext.Registration
@@ -200,15 +209,22 @@
private DefaultServletContainer container;
/** . */
- private ServletContainerContext context;
+ private List<ServletContainerContext> contexts;
public RegistrationImpl(DefaultServletContainer container, ServletContainerContext
context)
{
this.disposed = false;
this.container = container;
- this.context = context;
+
+ this.contexts = new ArrayList<ServletContainerContext>();
+ contexts.add(context);
}
+ public void addContext(ServletContainerContext context)
+ {
+ this.contexts.add(context);
+ }
+
public boolean registerWebApp(WebAppContext webAppContext)
{
if (disposed)
@@ -303,7 +319,10 @@
// Uninstall the call back
try
{
+ for (ServletContainerContext context: contexts)
+ {
context.unsetCallback(this);
+ }
}
catch (Exception e)
{
@@ -311,7 +330,7 @@
}
// Update state
- context = null;
+ contexts = null;
disposed = true;
container.registration = null;
}
@@ -345,9 +364,10 @@
return context.getContextPath();
}
- public boolean importFile(String parentDirRelativePath, String name, InputStream
source, boolean overwrite) throws IOException
+ public boolean importFile(String parentDirRelativePath, String name, InputStream
source, boolean overwrite)
+ throws IOException
{
return context.importFile(parentDirRelativePath, name, source, overwrite);
}
}
-}
\ No newline at end of file
+}
Added:
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/DefaultServletContainerWrapper.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/DefaultServletContainerWrapper.java
(rev 0)
+++
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/DefaultServletContainerWrapper.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.web.impl.generic;
+
+import org.exoplatform.container.component.ComponentPlugin;
+import org.jboss.portal.web.WebAppListener;
+import org.jboss.portal.web.impl.DefaultServletContainer;
+import org.jboss.portal.web.spi.ServletContainerContext;
+import org.picocontainer.Startable;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class DefaultServletContainerWrapper extends DefaultServletContainer implements
Startable
+{
+ public DefaultServletContainerWrapper()
+ {
+ }
+
+ public DefaultServletContainerWrapper(ServletContainerContext
servletContainerContext)
+ {
+ this.register(servletContainerContext);
+ }
+
+ public void addWebAppListener(ComponentPlugin plugin)
+ {
+ if (plugin instanceof WebAppListener)
+ {
+ addWebAppListener((WebAppListener)plugin);
+ }
+ }
+
+ public void start()
+ {
+ //do nothing, this method is required for the class to start when the configuration
file is read
+ }
+
+ public void stop()
+ {
+ //do nothing, this method is required for the class to start when the configuration
file is read
+ }
+
+}
+
Modified:
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericBootstrapServlet.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericBootstrapServlet.java 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericBootstrapServlet.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -22,12 +22,16 @@
******************************************************************************/
package org.jboss.portal.web.impl.generic;
-import org.jboss.portal.web.command.CommandServlet;
+import java.lang.reflect.Method;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
-import javax.servlet.ServletContext;
-import java.lang.reflect.Method;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.PortalContainer;
+import org.jboss.portal.web.command.CommandServlet;
+
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
@@ -51,7 +55,10 @@
GenericWebAppContext webAppContext = new GenericWebAppContext(servletContext,
contextPath, classLoader);
//
- GenericServletContainerContext.instance.register(webAppContext);
+ ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ GenericServletContainerContext servletContainerContext =
(GenericServletContainerContext)
exoContainer.getComponentInstanceOfType(GenericServletContainerContext.class);
+
+ servletContainerContext.register(webAppContext);
this.contextPath = contextPath;
}
catch (Exception e)
@@ -64,7 +71,10 @@
{
if (contextPath != null)
{
- GenericServletContainerContext.instance.unregister(contextPath);
+ ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ GenericServletContainerContext servletContainerContext =
(GenericServletContainerContext)exoContainer.getComponentInstanceOfType(GenericServletContainerContext.class);
+
+ servletContainerContext.unregister(contextPath);
}
}
}
Modified:
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericServletContainerContext.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericServletContainerContext.java 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericServletContainerContext.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -39,17 +39,9 @@
*/
public class GenericServletContainerContext implements ServletContainerContext
{
-
/** . */
- static final GenericServletContainerContext instance = new
GenericServletContainerContext();
-
- /** . */
private Registration registration;
- static
- {
- DefaultServletContainerFactory.registerContext(instance);
- }
void register(GenericWebAppContext webAppContext)
{
@@ -70,16 +62,6 @@
/** . */
private final CommandDispatcher dispatcher = new CommandDispatcher();
- public Object include(
- ServletContext targetServletContext,
- HttpServletRequest request,
- HttpServletResponse response,
- RequestDispatchCallback callback,
- Object handback) throws ServletException, IOException
- {
- return dispatcher.include(targetServletContext, request, response, callback,
handback);
- }
-
public void setCallback(Registration registration)
{
this.registration = registration;
Added:
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericServletListener.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericServletListener.java
(rev 0)
+++
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/GenericServletListener.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -0,0 +1,78 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.web.impl.generic;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.PortalContainer;
+
+/**
+ * A servlet context listener to deploy a web application to the
+ * GenericWebAppContext.
+ * Note that this class does not setup the command servlet wrapper
+ * and this will have to be done separately.
+ *
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class GenericServletListener implements ServletContextListener
+{
+
+ public void contextInitialized(ServletContextEvent servletContextEvent)
+ {
+ try
+ {
+ ServletContext servletContext = servletContextEvent.getServletContext();
+ String contextPath = servletContext.getContextPath();
+ ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+
+ GenericWebAppContext webAppContext = new GenericWebAppContext(servletContext,
contextPath, classLoader);
+
+ ExoContainer exoContainer =
ExoContainerContext.getCurrentContainer();//PortalContainer.getInstance();
+ GenericServletContainerContext servletContainerContext =
(GenericServletContainerContext)
exoContainer.getComponentInstanceOfType(GenericServletContainerContext.class);
+ servletContainerContext.register(webAppContext);
+
+ }
+ catch (Exception e)
+ {
+ //TODO: add proper logging to this class.
+ e.printStackTrace();
+ }
+ }
+
+ public void contextDestroyed(ServletContextEvent servletContextEvent)
+ {
+ ServletContext servletContext = servletContextEvent.getServletContext();
+ String contextPath = servletContext.getContextPath();
+
+ ExoContainer exoContainer = PortalContainer.getInstance();
+ GenericServletContainerContext servletContainerContext =
(GenericServletContainerContext)
exoContainer.getComponentInstanceOfType(GenericServletContainerContext.class);
+ servletContainerContext.unregister(contextPath);
+ }
+
+}
+
Modified:
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/PortletContainerBootstrapServlet.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/PortletContainerBootstrapServlet.java 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/generic/PortletContainerBootstrapServlet.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -1,70 +1,70 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.web.impl.generic;
-
-import org.jboss.portal.web.command.CommandServlet;
-
-import javax.servlet.ServletException;
-import javax.servlet.ServletContext;
-import java.lang.reflect.Method;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class PortletContainerBootstrapServlet extends CommandServlet
-{
-
- /** . */
- private String contextPath;
-
- public void init() throws ServletException
- {
- try
- {
- Method m = ServletContext.class.getMethod("getContextPath", new
Class[0]);
- ServletContext servletContext = getServletContext();
-
- //
- String contextPath = (String)m.invoke(servletContext, new Object[0]);
- ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
- GenericWebAppContext webAppContext = new GenericWebAppContext(servletContext,
contextPath, classLoader);
-
- //
- GenericServletContainerContext.instance.register(webAppContext);
- this.contextPath = contextPath;
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void destroy()
- {
- if (contextPath != null)
- {
- GenericServletContainerContext.instance.unregister(contextPath);
- }
- }
-}
+///******************************************************************************
+// * JBoss, a division of Red Hat *
+// * Copyright 2006, Red Hat Middleware, LLC, and individual *
+// * contributors as indicated by the @authors tag. See the *
+// * copyright.txt in the distribution for a full listing of *
+// * individual contributors. *
+// * *
+// * This is free software; you can redistribute it and/or modify it *
+// * under the terms of the GNU Lesser General Public License as *
+// * published by the Free Software Foundation; either version 2.1 of *
+// * the License, or (at your option) any later version. *
+// * *
+// * This software is distributed in the hope that it will be useful, *
+// * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+// * Lesser General Public License for more details. *
+// * *
+// * You should have received a copy of the GNU Lesser General Public *
+// * License along with this software; if not, write to the Free *
+// * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+// * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+// ******************************************************************************/
+//package org.jboss.portal.web.impl.generic;
+//
+//import org.jboss.portal.web.command.CommandServlet;
+//
+//import javax.servlet.ServletException;
+//import javax.servlet.ServletContext;
+//import java.lang.reflect.Method;
+//
+///**
+// * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+// * @version $Revision: 1.1 $
+// */
+//public class PortletContainerBootstrapServlet extends CommandServlet
+//{
+//
+// /** . */
+// private String contextPath;
+//
+// public void init() throws ServletException
+// {
+// try
+// {
+// Method m = ServletContext.class.getMethod("getContextPath", new
Class[0]);
+// ServletContext servletContext = getServletContext();
+//
+// //
+// String contextPath = (String)m.invoke(servletContext, new Object[0]);
+// ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+// GenericWebAppContext webAppContext = new GenericWebAppContext(servletContext,
contextPath, classLoader);
+//
+// //
+// GenericServletContainerContext.instance.register(webAppContext);
+// this.contextPath = contextPath;
+// }
+// catch (Exception e)
+// {
+// e.printStackTrace();
+// }
+// }
+//
+// public void destroy()
+// {
+// if (contextPath != null)
+// {
+// GenericServletContainerContext.instance.unregister(contextPath);
+// }
+// }
+//}
Modified:
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/impl/tomcat/TC6ServletContainerContext.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -32,11 +32,14 @@
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.jboss.portal.web.RequestDispatchCallback;
+import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.command.CommandDispatcher;
import org.jboss.portal.web.impl.DefaultServletContainerFactory;
import org.jboss.portal.web.spi.ServletContainerContext;
import org.apache.catalina.core.StandardContext;
import org.apache.log4j.Logger;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
@@ -148,8 +151,10 @@
void start()
{
- DefaultServletContainerFactory.registerContext(this);
-
+ ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ ServletContainer servletContainer =
(ServletContainer)exoContainer.getComponentInstance(ServletContainer.class);
+ servletContainer.register(this);
+
//
Container[] childrenContainers = engine.findChildren();
for (Container childContainer : childrenContainers)
Modified:
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/spi/ServletContainerContext.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/spi/ServletContainerContext.java 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/main/java/org/jboss/portal/web/spi/ServletContainerContext.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -42,24 +42,6 @@
public interface ServletContainerContext
{
/**
- * Generic detyped request dispatch to a servlet context using the include mechanism.
- *
- * @param targetServletContext the target servlet context to dispatch to
- * @param request the request valid in the current servlet context
- * @param response the response valid in the current servlet context
- * @param callback the callback to perform after the dispatch operation
- * @param handback the handback object that will be provided to the callback
- * @return the object returned by the callback
- * @throws ServletException any servlet exception
- * @throws IOException any io exception
- */
- Object include(
- ServletContext targetServletContext, HttpServletRequest request,
- HttpServletResponse response,
- RequestDispatchCallback callback,
- Object handback) throws ServletException, IOException;
-
- /**
* Install the call back object.
*
* @param registration the call back
Added: jbossexo/modules/web/trunk/web/src/main/resources/conf/configuration.xml
===================================================================
--- jbossexo/modules/web/trunk/web/src/main/resources/conf/configuration.xml
(rev 0)
+++ jbossexo/modules/web/trunk/web/src/main/resources/conf/configuration.xml 2009-07-06
20:47:04 UTC (rev 13525)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.jboss.portal.web.ServletContainer</key>
+
<type>org.jboss.portal.web.impl.generic.DefaultServletContainerWrapper</type>
+<!-- <component-plugins>
+ <component-plugin>
+ <name>PortletListener</name>
+ <set-method>addWebAppListener</set-method>
+ <type>org.jboss.portal.torii.temp.PortletDeployer</type>
+ <description>ListenerForPortlet</description>
+ </component-plugin>
+ </component-plugins> -->
+ </component>
+
+ <component>
+ <key>org.jboss.portal.web.spi.ServletContainerContext</key>
+
<type>org.jboss.portal.web.impl.generic.GenericServletContainerContext</type>
+ </component>
+
+<!-- <component>
+ <key>org.jboss.portal.web.spi.ServletContainerContext</key>
+
<type>org.jboss.portal.web.impl.tomcat.TC6ServletContainerContext</type>
+ </componenet> -->
+
+</configuration>
Modified: jbossexo/modules/web/trunk/web/src/test/build.xml
===================================================================
--- jbossexo/modules/web/trunk/web/src/test/build.xml 2009-07-06 19:31:34 UTC (rev 13524)
+++ jbossexo/modules/web/trunk/web/src/test/build.xml 2009-07-06 20:47:04 UTC (rev 13525)
@@ -116,14 +116,14 @@
</not>
</and>
</condition>
- <condition property="JETTY_6_1_HOME"
value="${env.JETTY_6_1_HOME}">
+<!-- <condition property="JETTY_6_1_HOME"
value="${env.JETTY_6_1_HOME}">
<and>
<isset property="env.JETTY_6_1_HOME"/>
<not>
<isset property="JETTY_6_1_HOME"/>
</not>
</and>
- </condition>
+ </condition> -->
<fail message="Please set the environment variable JBOSS_4_2_0_HOME or
JBOSS_4_2_1_HOME or JBOSS_4_2_2_HOME or JBOSS_4_2_3_HOME or use
-Dtest.specified.containers to only run tests for containers specified with a HOME
variable">
<condition>
@@ -228,6 +228,16 @@
<pathelement path="${dependency.jboss-remoting.jar}"/>
</path>
+ <path id="exo">
+ <pathelement path="${dependency.exo.kernel.container}"/>
+ <pathelement path="${dependency.exo.kernel.commons}"/>
+ <pathelement path="${dependency.picocontainer}"/>
+ <pathelement path="${dependency.commons.logging}"/>
+ <pathelement path="${dependency.jibx}"/>
+ <pathelement path="${dependency.javax.xml.stream}"/>
+ <pathelement path="${dependency.xpp3}"/>
+ </path>
+
<path id="jboss-4.2">
<path refid="portal-common"/>
<path refid="jboss-unit"/>
@@ -270,11 +280,11 @@
<path location="${target}/web-web-${project.version}.jar"/>
</path>
- <path id="jetty-6.1">
+<!-- <path id="jetty-6.1">
<path refid="portal-common"/>
<path refid="jboss-unit"/>
<path refid="jboss-microcontainer"/>
- </path>
+ </path> -->
<!-- SPI Test case-->
@@ -343,7 +353,7 @@
<!-- Jetty 6.1 handler -->
<!-- **************************** -->
- <copy todir="${test.support}/jetty-6.1-handler/server-war/WEB-INF/lib"
flatten="true">
+<!-- <copy
todir="${test.support}/jetty-6.1-handler/server-war/WEB-INF/lib"
flatten="true">
<path refid="jetty-6.1"/>
</copy>
<mkdir dir="${test.temp.lib}/jetty-6.1-handler"/>
@@ -353,14 +363,14 @@
</war>
<jar
jarfile="${test.temp.lib}/jetty-6.1-handler/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/app-war"/>
- </jar>
+ </jar> -->
<!-- ****************** -->
<!-- Jetty 6.1 generic -->
<!-- ****************** -->
<!-- -->
- <mkdir
dir="${test.support}/jetty-6.1-generic/server-war/WEB-INF/lib"/>
+<!-- <mkdir
dir="${test.support}/jetty-6.1-generic/server-war/WEB-INF/lib"/>
<copy todir="${test.support}/jetty-6.1-generic/server-war/WEB-INF/lib"
flatten="true">
<path refid="jetty-6.1"/>
</copy>
@@ -371,7 +381,7 @@
</war>
<jar
jarfile="${test.temp.lib}/jetty-6.1-generic/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/generic/app-war"/>
- </jar>
+ </jar> -->
<!-- *************************** -->
<!-- JBoss 4.2 container servlet -->
@@ -424,7 +434,7 @@
<!-- *************************** -->
<!-- -->
- <copy
todir="${test.support}/jboss-5.0-container-servlet/server-war/WEB-INF/lib"
flatten="true">
+<!-- <copy
todir="${test.support}/jboss-5.0-container-servlet/server-war/WEB-INF/lib"
flatten="true">
<path refid="jboss-5.0"/>
</copy>
<mkdir dir="${test.temp.lib}/jboss-5.0-container-servlet"/>
@@ -436,13 +446,13 @@
</war>
<jar
jarfile="${test.temp.lib}/jboss-5.0-container-servlet/test-spi-app.war">
<fileset dir="${target}/test-classes/spi/app-war"/>
- </jar>
+ </jar> -->
<!-- ***************** -->
<!-- JBoss 5.0 generic -->
<!-- ***************** -->
- <copy todir="${test.support}/jboss-5.0-generic/server-war/WEB-INF/lib"
flatten="true">
+<!-- <copy
todir="${test.support}/jboss-5.0-generic/server-war/WEB-INF/lib"
flatten="true">
<path refid="jboss-5.0"/>
</copy>
<mkdir dir="${test.temp.lib}/jboss-5.0-generic"/>
@@ -456,7 +466,7 @@
<fileset dir="${target}/test-classes/spi/generic/app-war">
<exclude name="**/jboss-kernel*.jar"/>
</fileset>
- </jar>
+ </jar> -->
<!--endpoint test case-->
@@ -503,7 +513,7 @@
<!-- ********* -->
<!-- JETTY 6.1 -->
<!-- ********* -->
- <mkdir dir="${test.temp.lib}/jetty-6.1"/>
+<!-- <mkdir dir="${test.temp.lib}/jetty-6.1"/>
<copy
todir="${test.support}/jetty-6.1-endpoint/default-servlet-mapping-war/WEB-INF/lib"
flatten="true">
<path refid="jetty-6.1"/>
@@ -528,7 +538,7 @@
<fileset
dir="${test.support}/jetty-6.1-endpoint/root-path-mapping-war"/>
<lib dir="${test.temp.lib}"
includes="portal-test-endpoint-lib.jar"/>
</war>
-
+-->
<!-- ********* -->
<!-- JBoss 4.2 -->
<!-- ********* -->
@@ -562,7 +572,7 @@
<!-- ********* -->
<!-- JBoss 5.0 -->
<!-- ********* -->
-
+<!--
<mkdir dir="${test.temp.lib}/jboss-5.0"/>
<copy
todir="${test.support}/jboss-5.0-endpoint/default-servlet-mapping-war/WEB-INF/lib"
flatten="true">
@@ -594,11 +604,10 @@
</fileset>
<lib dir="${test.temp.lib}"
includes="portal-test-endpoint-lib.jar"/>
</war>
-
+-->
<!--Strip cargo manager war filename-->
<copy file="${dependency.cargo-manager.war}"
tofile="${test.temp.lib}/manager.war"/>
-
</target>
<target name="cargo.setup">
@@ -630,6 +639,7 @@
<sharedClasspath>
<path refid="jboss-4.2-shared"/>
+ <path refid="exo"/>
</sharedClasspath>
<configuration>
@@ -876,6 +886,7 @@
<sharedClasspath>
<path refid="tomcat-6.0-shared"/>
+ <path refid="exo"/>
</sharedClasspath>
<configuration>
@@ -971,7 +982,7 @@
</target>
- <target name="cargo.jetty-6.1.start" depends="cargo.setup">
+<!-- <target name="cargo.jetty-6.1.start"
depends="cargo.setup">
<cargo
containerId="jetty6x"
home="${test.jetty-6.1.home}"
@@ -998,9 +1009,9 @@
<configuration>
<property name="cargo.servlet.port" value="8080"/>
<property name="cargo.logging" value="high"/>
- <property name="cargo.jvmargs" value="-Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8222"/>
+ <property name="cargo.jvmargs" value="-Xdebug -Xnoagent
-Djava.compiler=NONE
-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8222"/> -->
<!-- overwrite these files to give jetty the propery security setup
-->
- <configfile
file="${basedir}/src/test/resources/config/jetty/jetty.xml"
todir="etc"/>
+<!-- <configfile
file="${basedir}/src/test/resources/config/jetty/jetty.xml"
todir="etc"/>
<configfile
file="${basedir}/src/test/resources/config/jetty/realm.properties"
todir="etc"/>
<deployable type="war" file="${cargo.war}"/>
<deployable type="war"
file="${dependency.cargo.jetty-deployer}">
@@ -1077,19 +1088,19 @@
</target>
<target name="tests.jetty-6.1">
- <!-- spi tests -->
- <antcall target="tests.jetty-6.1.spi">
+--> <!-- spi tests -->
+<!-- <antcall target="tests.jetty-6.1.spi">
<param name="test.jetty-6.1.name"
value="RemoteJetty_6_1"/>
<param name="test.jetty-6.1.home"
value="${JETTY_6_1_HOME}"/>
</antcall>
-
+-->
<!-- endpoint tests -->
- <antcall target="tests.jetty-6.1.endpoint">
+<!-- <antcall target="tests.jetty-6.1.endpoint">
<param name="test.jetty-6.1.name"
value="RemoteJetty_6_1"/>
<param name="test.jetty-6.1.home"
value="${JETTY_6_1_HOME}"/>
</antcall>
</target>
-
+-->
<target name="tests.local">
<taskdef name="jboss-unit"
classname="org.jboss.unit.tooling.ant.JBossUnitTask"
classpath="${plugin_classpath}"/>
Modified:
jbossexo/modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/container/ServletContainerTestCase.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/container/ServletContainerTestCase.java 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/container/ServletContainerTestCase.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -107,7 +107,8 @@
container.register(scc2);
// Registration failed
- assertNull(scc2.registration);
+ // TODO: figure this out now that the two contexts can be registered
+ //assertNull(scc2.registration);
// Cancel
scc1.registration.cancel();
Modified:
jbossexo/modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/spi/SPITestCase.java
===================================================================
---
jbossexo/modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/spi/SPITestCase.java 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/test/java/org/jboss/portal/test/web/spi/SPITestCase.java 2009-07-06
20:47:04 UTC (rev 13525)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.test.web.spi;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
import org.jboss.portal.test.web.WebAppRegistry;
import org.jboss.portal.test.web.TestServlet;
import org.jboss.portal.test.web.ServletTestCase;
@@ -144,7 +146,10 @@
{
if (getRequestCount() == -1)
{
- container = DefaultServletContainerFactory.getInstance().getServletContainer();
+ //container =
DefaultServletContainerFactory.getInstance().getServletContainer();
+ ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ container = (ServletContainer)
exoContainer.getComponentInstance(ServletContainer.class);
+
if (container == null)
{
return new FailureResponse(Failure.createAssertionFailure("No servlet
container present"));
Modified:
jbossexo/modules/web/trunk/web/src/test/resources/portal-test-endpoint-jar/org/jboss/portal/test/web/server-beans.xml
===================================================================
---
jbossexo/modules/web/trunk/web/src/test/resources/portal-test-endpoint-jar/org/jboss/portal/test/web/server-beans.xml 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/test/resources/portal-test-endpoint-jar/org/jboss/portal/test/web/server-beans.xml 2009-07-06
20:47:04 UTC (rev 13525)
@@ -45,6 +45,7 @@
</constructor>
</bean>
+<!--
<bean name="ServletContainerFactory"
class="org.jboss.portal.web.impl.DefaultServletContainerFactory">
<constructor
factoryClass="org.jboss.portal.web.impl.DefaultServletContainerFactory"
factoryMethod="getInstance"/>
</bean>
@@ -55,6 +56,7 @@
</constructor>
</bean>
+-->
<bean name="TestSuite"
class="org.jboss.unit.driver.impl.composite.CompositeTestDriver"/>
<bean name="GetTestCase"
class="org.jboss.portal.test.web.endpoint.GetTestCase">
Modified:
jbossexo/modules/web/trunk/web/src/test/resources/portal-test-spi-jar/org/jboss/portal/test/web/server-beans.xml
===================================================================
---
jbossexo/modules/web/trunk/web/src/test/resources/portal-test-spi-jar/org/jboss/portal/test/web/server-beans.xml 2009-07-06
19:31:34 UTC (rev 13524)
+++
jbossexo/modules/web/trunk/web/src/test/resources/portal-test-spi-jar/org/jboss/portal/test/web/server-beans.xml 2009-07-06
20:47:04 UTC (rev 13525)
@@ -45,7 +45,7 @@
</constructor>
</bean>
- <bean name="ServletContainerFactory"
GetTestCaseclass="org.jboss.portal.web.impl.DefaultServletContainerFactory">
+<!-- <bean name="ServletContainerFactory"
GetTestCaseclass="org.jboss.portal.web.impl.DefaultServletContainerFactory">
<constructor
factoryClass="org.jboss.portal.web.impl.DefaultServletContainerFactory"
factoryMethod="getInstance"/>
</bean>
@@ -54,6 +54,7 @@
<factory bean="ServletContainerFactory"/>
</constructor>
</bean>
+-->
<bean name="TestSuite"
class="org.jboss.unit.driver.impl.composite.CompositeTestDriver"/>