Author: mwringe
Date: 2009-07-06 17:44:41 -0400 (Mon, 06 Jul 2009)
New Revision: 13526
Added:
jbossexo/modules/portlet/trunk/exo/
jbossexo/modules/portlet/trunk/exo/pom.xml
jbossexo/modules/portlet/trunk/exo/src/
jbossexo/modules/portlet/trunk/exo/src/main/
jbossexo/modules/portlet/trunk/exo/src/main/java/
jbossexo/modules/portlet/trunk/exo/src/main/java/org/
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/ExoKernelIntegration.java
jbossexo/modules/portlet/trunk/exo/src/main/resources/
jbossexo/modules/portlet/trunk/exo/src/main/resources/conf/
jbossexo/modules/portlet/trunk/exo/src/main/resources/conf/configuration.xml
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/exo/
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/exo/kernel/
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/exo/kernel/KernelListener.java
jbossexo/modules/portlet/trunk/portal/src/test/java/org/
jbossexo/modules/portlet/trunk/portal/src/test/java/org/jboss/
jbossexo/modules/portlet/trunk/portal/src/test/java/org/jboss/portal/
jbossexo/modules/portlet/trunk/portal/src/test/java/org/jboss/portal/portlet/
jbossexo/modules/portlet/trunk/portal/src/test/java/org/jboss/portal/portlet/portal/
jbossexo/modules/portlet/trunk/portal/src/test/java/org/jboss/portal/portlet/portal/exo/
jbossexo/modules/portlet/trunk/portal/src/test/java/org/jboss/portal/portlet/portal/exo/kernel/
Modified:
jbossexo/modules/portlet/trunk/.classpath
jbossexo/modules/portlet/trunk/build/pom.xml
jbossexo/modules/portlet/trunk/pom.xml
jbossexo/modules/portlet/trunk/portal/pom.xml
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-jboss42.xml
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-jboss50.xml
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-tomcat60.xml
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java
jbossexo/modules/portlet/trunk/portal/src/main/resources/simple-portal-war/WEB-INF/jboss-portal-beans.xml
jbossexo/modules/portlet/trunk/portal/src/main/resources/simple-portal-war/WEB-INF/web.xml
jbossexo/modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java
jbossexo/modules/portlet/trunk/test/pom.xml
jbossexo/modules/portlet/trunk/test/src/test/build.xml
Log:
Update the portlet module to use eXo kernel.
Modified: jbossexo/modules/portlet/trunk/.classpath
===================================================================
--- jbossexo/modules/portlet/trunk/.classpath 2009-07-06 20:47:04 UTC (rev 13525)
+++ jbossexo/modules/portlet/trunk/.classpath 2009-07-06 21:44:41 UTC (rev 13526)
@@ -3,6 +3,7 @@
<classpathentry kind="src" output="jsr168api/target/classes"
path="jsr168api/src/main/java"/>
<classpathentry kind="src" output="api/target/classes"
path="api/src/main/java"/>
<classpathentry kind="src" output="api/target/test-classes"
path="api/src/test/java"/>
+ <classpathentry kind="src" path="exo/src/main/java"/>
<classpathentry kind="src" output="portlet/target/classes"
path="portlet/src/main/java"/>
<classpathentry excluding="**" kind="src"
output="portlet/target/classes"
path="portlet/src/main/resources"/>
<classpathentry kind="src" output="portlet/target/test-classes"
path="portlet/src/test/java"/>
Modified: jbossexo/modules/portlet/trunk/build/pom.xml
===================================================================
--- jbossexo/modules/portlet/trunk/build/pom.xml 2009-07-06 20:47:04 UTC (rev 13525)
+++ jbossexo/modules/portlet/trunk/build/pom.xml 2009-07-06 21:44:41 UTC (rev 13526)
@@ -34,7 +34,7 @@
<version.jbossxb>2.0.0.GA</version.jbossxb>
<version.jboss-remoting>2.2.1.GA</version.jboss-remoting>
<version.jboss.portal.common>1.2.3</version.jboss.portal.common>
- <version.jboss.portal.web>1.2.3</version.jboss.portal.web>
+ <version.jboss.portal.web>1.2.0-SNAPSHOT</version.jboss.portal.web>
<version.jboss.unit>1.2.2</version.jboss.unit>
<version.log4j>1.2.14</version.log4j>
<version.apache.commons-logging>1.1.1</version.apache.commons-logging>
@@ -48,6 +48,8 @@
<version.portlet-api>2.0</version.portlet-api>
<version.ccpp-api>1.0</version.ccpp-api>
<version.xerces>2.9.1</version.xerces>
+ <version.exo.kernel>2.1.1</version.exo.kernel>
+
</properties>
<repositories>
@@ -84,6 +86,12 @@
<enabled>false</enabled>
</snapshots>
</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>
@@ -340,6 +348,13 @@
<artifactId>portlet-api</artifactId>
<version>${version.portlet-api}</version>
</dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${version.exo.kernel}</version>
+ </dependency>
+
+
</dependencies>
</dependencyManagement>
Property changes on: jbossexo/modules/portlet/trunk/exo
___________________________________________________________________
Name: svn:ignore
+ target
Added: jbossexo/modules/portlet/trunk/exo/pom.xml
===================================================================
--- jbossexo/modules/portlet/trunk/exo/pom.xml (rev 0)
+++ jbossexo/modules/portlet/trunk/exo/pom.xml 2009-07-06 21:44:41 UTC (rev 13526)
@@ -0,0 +1,30 @@
+<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.portlet</groupId>
+ <artifactId>module-parent</artifactId>
+ <version>trunk-SNAPSHOT</version>
+ <relativePath>../build/pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>portlet-exo</artifactId>
+ <packaging>jar</packaging>
+ <name>portlet exo integration</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-portlet</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-mc</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
Added:
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/ExoKernelIntegration.java
===================================================================
---
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/ExoKernelIntegration.java
(rev 0)
+++
jbossexo/modules/portlet/trunk/exo/src/main/java/org/jboss/portal/portlet/exo/ExoKernelIntegration.java 2009-07-06
21:44:41 UTC (rev 13526)
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * 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.portlet.exo;
+
+import javax.servlet.http.HttpServlet;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.jboss.portal.portlet.api.PortletInvoker;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.CCPPInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.EventPayloadInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.PortletCustomizationInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.RequestAttributeConversationInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor;
+import org.jboss.portal.portlet.aspects.portlet.ValveInterceptor;
+import org.jboss.portal.portlet.container.ContainerPortletDispatcher;
+import org.jboss.portal.portlet.container.ContainerPortletInvoker;
+import org.jboss.portal.portlet.impl.state.StateConverterV0;
+import org.jboss.portal.portlet.impl.state.StateManagementPolicyService;
+import
org.jboss.portal.portlet.impl.state.producer.PortletStatePersistenceManagerService;
+import org.jboss.portal.portlet.mc.PortletApplicationDeployer;
+import org.jboss.portal.portlet.state.producer.ProducerPortletInvoker;
+import org.jboss.portal.web.ServletContainer;
+import org.picocontainer.Startable;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class ExoKernelIntegration extends HttpServlet
+{
+
+ protected PortletApplicationDeployer portletApplicationRegistry;
+
+ public void init()
+ {
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+
+ // The producer persistence manager
+ PortletStatePersistenceManagerService producerPersistanceManager = new
PortletStatePersistenceManagerService();
+
+ // The producer state management policy
+ StateManagementPolicyService producerStateManagementPolicy = new
StateManagementPolicyService();
+ producerStateManagementPolicy.setPersistLocally(true);
+
+ // The producer state converter
+ StateConverterV0 producerStateConverter = new StateConverterV0();
+
+ // The portlet container invoker
+ ContainerPortletInvoker containerPortletInvoker = new ContainerPortletInvoker();
+ // continued below
+
+
+ // The portlet application deployer
+ portletApplicationRegistry = new PortletApplicationDeployer();
+ portletApplicationRegistry.setContainerPortletInvoker(containerPortletInvoker);
+// ServletContainer servletContainer =
(ServletContainer)container.getComponentInstance(ServletContainer.class);
+// servletContainer.addWebAppListener(portletApplicationRegistry);
+
+
+ //Container Stack
+ ContainerPortletDispatcher portletContainerDispatcher = new
ContainerPortletDispatcher();
+ EventPayloadInterceptor eventPayloadInterceptor = new EventPayloadInterceptor();
+ eventPayloadInterceptor.setNext(portletContainerDispatcher);
+ RequestAttributeConversationInterceptor requestAttributeConversationInterceptor =
new RequestAttributeConversationInterceptor();
+ requestAttributeConversationInterceptor.setNext(eventPayloadInterceptor);
+ CCPPInterceptor ccppInterceptor = new CCPPInterceptor();
+ ccppInterceptor.setNext(requestAttributeConversationInterceptor);
+ ProducerCacheInterceptor producerCacheInterceptor = new
ProducerCacheInterceptor();
+ producerCacheInterceptor.setNext(ccppInterceptor);
+ ContextDispatcherInterceptor contextDispatcherInterceptor = new
ContextDispatcherInterceptor();
+ contextDispatcherInterceptor.setNext(producerCacheInterceptor);
+ SecureTransportInterceptor secureTransportInterceptor = new
SecureTransportInterceptor();
+ secureTransportInterceptor.setNext(contextDispatcherInterceptor);
+ ValveInterceptor valveInterceptor = new ValveInterceptor();
+ valveInterceptor.setPortletApplicationRegistry(portletApplicationRegistry);
+ valveInterceptor.setNext(secureTransportInterceptor);
+
+
+ ServletContainer servletContainer =
(ServletContainer)container.getComponentInstance(ServletContainer.class);
+ portletApplicationRegistry.setServletContainer(servletContainer);
+// portletApplicationRegistry.start();
+ //servletContainer.addWebAppListener(portletApplicationRegistry);
+
+ // The portlet container invoker continued
+ containerPortletInvoker.setNext(valveInterceptor);
+ /* register with container */
+ container.registerComponentInstance(PortletInvoker.class,
containerPortletInvoker);
+
+
+ // The producer portlet invoker
+ ProducerPortletInvoker producerPortletInvoker = new ProducerPortletInvoker();
+ producerPortletInvoker.setNext(containerPortletInvoker);
+ producerPortletInvoker.setPersistenceManager(producerPersistanceManager);
+ producerPortletInvoker.setStateManagementPolicy(producerStateManagementPolicy);
+ producerPortletInvoker.setStateConverter(producerStateConverter);
+
+
+ // The consumer portlet invoker
+ PortletCustomizationInterceptor portletCustomizationInterceptor = new
PortletCustomizationInterceptor();
+ portletCustomizationInterceptor.setNext(producerPortletInvoker);
+ ConsumerCacheInterceptor consumerCacheInterceptor = new
ConsumerCacheInterceptor();
+ consumerCacheInterceptor.setNext(portletCustomizationInterceptor);
+ PortletInvokerInterceptor consumerPortletInvoker = new
PortletInvokerInterceptor();
+ consumerPortletInvoker.setNext(consumerCacheInterceptor);
+
+ container.registerComponentInstance(PortletInvokerInterceptor.class,
consumerPortletInvoker);
+
+ portletApplicationRegistry.start();
+ }
+
+
+ public void destroy()
+ {
+ if (portletApplicationRegistry != null)
+ {
+ portletApplicationRegistry.stop();
+ }
+ }
+}
+
Added: jbossexo/modules/portlet/trunk/exo/src/main/resources/conf/configuration.xml
===================================================================
--- jbossexo/modules/portlet/trunk/exo/src/main/resources/conf/configuration.xml
(rev 0)
+++
jbossexo/modules/portlet/trunk/exo/src/main/resources/conf/configuration.xml 2009-07-06
21:44:41 UTC (rev 13526)
@@ -0,0 +1,18 @@
+<?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">
+
+ <!-- class to setup the other classes -->
+<!-- <component>
+ <type>org.jboss.portal.portlet.exo.ExoKernelIntegration</type>
+ </component> -->
+
+ <!-- Service Exposed for the Portal -->
+<!-- <component>
+ <key>org.jboss.portal.portlet.PortletInvoker</key>
+ <type>org.jboss.portal.portlet.container.ContainerPortletInvoker</type>
+ </component> -->
+
+</configuration>
Modified: jbossexo/modules/portlet/trunk/pom.xml
===================================================================
--- jbossexo/modules/portlet/trunk/pom.xml 2009-07-06 20:47:04 UTC (rev 13525)
+++ jbossexo/modules/portlet/trunk/pom.xml 2009-07-06 21:44:41 UTC (rev 13526)
@@ -42,6 +42,7 @@
<module>samples</module>
<module>docs</module>
<module>api</module>
+ <module>exo</module>
</modules>
<activation>
<activeByDefault>true</activeByDefault>
Modified: jbossexo/modules/portlet/trunk/portal/pom.xml
===================================================================
--- jbossexo/modules/portlet/trunk/portal/pom.xml 2009-07-06 20:47:04 UTC (rev 13525)
+++ jbossexo/modules/portlet/trunk/portal/pom.xml 2009-07-06 21:44:41 UTC (rev 13526)
@@ -44,6 +44,11 @@
<artifactId>portlet-api</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.portal.portlet</groupId>
+ <artifactId>portlet-exo</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>concurrent</groupId>
Modified: jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-jboss42.xml
===================================================================
---
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-jboss42.xml 2009-07-06
20:47:04 UTC (rev 13525)
+++
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-jboss42.xml 2009-07-06
21:44:41 UTC (rev 13526)
@@ -22,6 +22,17 @@
<include>javax.ccpp:ccpp</include>
<include>javax.portlet:portlet-api</include>
+ <include>org.exoplatform.kernel:exo.kernel.container</include>
+ <include>org.exoplatform.kernel:exo.kernel.commons</include>
+ <include>picocontainer:picocontainer</include>
+ <include>javax.xml.bind:jaxb-api</include>
+ <include>org.jibx:jibx-run</include>
+ <include>org.slf4j:slf4j-api</include>
+ <include>org.slf4j:slf4j-jdk14</include>
+ <include>javax.xml.stream:stax-api</include>
+ <include>xpp3:xpp3</include>
+ <include>commons-logging:commons-logging</include>
+ <include>sun-jaxb:jaxb-api</include>
</includes>
</dependencySet>
@@ -32,10 +43,9 @@
<include>org.jboss.portal.common:common-mc</include>
<include>org.jboss.portal.portlet:portlet-controller</include>
<include>org.jboss.portal.portlet:portlet-mc</include>
+ <include>org.jboss.portal.portlet:portlet-exo</include>
<include>org.jboss:jboss-common-core</include>
- <include>org.jboss.microcontainer:jboss-kernel</include>
- <include>org.jboss.microcontainer:jboss-dependency</include>
<include>org.jboss:jboss-reflect</include>
<include>org.jboss:jboss-mdr</include>
<include>org.jboss:jbossxb</include>
Modified: jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-jboss50.xml
===================================================================
---
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-jboss50.xml 2009-07-06
20:47:04 UTC (rev 13525)
+++
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-jboss50.xml 2009-07-06
21:44:41 UTC (rev 13526)
@@ -23,6 +23,18 @@
<include>javax.ccpp:ccpp</include>
<include>javax.portlet:portlet-api</include>
+ <include>org.exoplatform.kernel:exo.kernel.container</include>
+ <include>org.exoplatform.kernel:exo.kernel.commons</include>
+ <include>picocontainer:picocontainer</include>
+ <include>javax.xml.bind:jaxb-api</include>
+ <include>org.jibx:jibx-run</include>
+ <include>org.slf4j:slf4j-api</include>
+ <include>org.slf4j:slf4j-jdk14</include>
+ <include>javax.xml.stream:stax-api</include>
+ <include>xpp3:xpp3</include>
+ <include>commons-logging:commons-logging</include>
+ <include>sun-jaxb:jaxb-api</include>
+
</includes>
</dependencySet>
<dependencySet>
@@ -32,9 +44,9 @@
<include>org.jboss.portal.common:common-mc</include>
<include>org.jboss.portal.portlet:portlet-controller</include>
<include>org.jboss.portal.portlet:portlet-mc</include>
+ <include>org.jboss.portal.portlet:portlet-exo</include>
<include>org.jboss:jboss-common-core</include>
- <include>org.jboss.microcontainer:jboss-dependency</include>
<include>org.jboss:jboss-reflect</include>
<include>org.jboss:jboss-mdr</include>
<include>org.jboss:jbossxb</include>
Modified: jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-tomcat60.xml
===================================================================
---
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-tomcat60.xml 2009-07-06
20:47:04 UTC (rev 13525)
+++
jbossexo/modules/portlet/trunk/portal/src/assemble/simple-portal-tomcat60.xml 2009-07-06
21:44:41 UTC (rev 13526)
@@ -33,6 +33,18 @@
<include>apache-taglibs:jstl</include>
<include>apache-taglibs:standard</include>
+ <include>org.exoplatform.kernel:exo.kernel.container</include>
+ <include>org.exoplatform.kernel:exo.kernel.commons</include>
+ <include>picocontainer:picocontainer</include>
+ <include>javax.xml.bind:jaxb-api</include>
+ <include>org.jibx:jibx-run</include>
+ <include>org.slf4j:slf4j-api</include>
+ <include>org.slf4j:slf4j-jdk14</include>
+ <include>javax.xml.stream:stax-api</include>
+ <include>xpp3:xpp3</include>
+ <include>commons-logging:commons-logging</include>
+ <include>sun-jaxb:jaxb-api</include>
+
</includes>
</dependencySet>
<dependencySet>
@@ -42,13 +54,12 @@
<include>org.jboss.portal.common:common-mc</include>
<include>org.jboss.portal.portlet:portlet-controller</include>
<include>org.jboss.portal.portlet:portlet-mc</include>
+ <include>org.jboss.portal.portlet:portlet-exo</include>
<include>jboss:jboss-common-logging-spi</include>
<include>jboss:jboss-common-logging-log4j</include>
<include>jboss:jboss-common-logging-jdk</include>
<include>org.jboss:jboss-common-core</include>
- <include>org.jboss.microcontainer:jboss-kernel</include>
- <include>org.jboss.microcontainer:jboss-dependency</include>
<include>org.jboss:jboss-reflect</include>
<include>org.jboss:jboss-mdr</include>
<include>org.jboss:jbossxb</include>
Modified:
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
===================================================================
---
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2009-07-06
20:47:04 UTC (rev 13525)
+++
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2009-07-06
21:44:41 UTC (rev 13526)
@@ -59,7 +59,8 @@
if (applicationId != null)
{
// Use an alias
- PortletApplicationRegistry registry =
(PortletApplicationRegistry)getPortletContext().getAttribute("PortletApplicationDeployer");
+ //PortletApplicationRegistry registry =
(PortletApplicationRegistry)getPortletContext().getAttribute("PortletApplicationDeployer");
+ PortletApplicationRegistry registry =
(PortletApplicationRegistry)getPortletContext().getAttribute("jboss.portal:service=PortletApplicationDeployer");
//
ManagedPortletApplication application =
registry.getManagedPortletApplication(applicationId);
@@ -317,4 +318,4 @@
}
-}
\ No newline at end of file
+}
Added:
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/exo/kernel/KernelListener.java
===================================================================
---
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/exo/kernel/KernelListener.java
(rev 0)
+++
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/exo/kernel/KernelListener.java 2009-07-06
21:44:41 UTC (rev 13526)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * 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.portlet.portal.exo.kernel;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.exoplatform.container.StandaloneContainer;
+
+/**
+ * This is class is basically the
+ * org.exoplatform.services.portletcontainer.test.listeners.AppListener
+ *
+ * This class will setup the eXo Kernel when the webapp is loaded
+ * for testing. If using the real eXo Portal, this will already be
+ * setup by the portal itself.
+ *
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+public class KernelListener implements ServletContextListener
+{
+
+ public void contextDestroyed(ServletContextEvent arg0)
+ {
+ try
+ {
+ Object[][] components =
+ {{ServletContextListener.class.getName(), arg0.getServletContext()}};
+ StandaloneContainer.getInstance(Thread.currentThread().getContextClassLoader(),
components);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public void contextInitialized(ServletContextEvent arg0)
+ {
+ // FIXME contextInitialized
+ }
+
+}
+
Modified:
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java
===================================================================
---
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java 2009-07-06
20:47:04 UTC (rev 13525)
+++
jbossexo/modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/jsp/ControllerFilter.java 2009-07-06
21:44:41 UTC (rev 13526)
@@ -22,6 +22,9 @@
******************************************************************************/
package org.jboss.portal.portlet.portal.jsp;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.jboss.portal.portlet.PortletInvokerInterceptor;
import org.jboss.portal.portlet.controller.impl.PortletURLRenderer;
import org.jboss.portal.portlet.controller.impl.URLParameterConstants;
import org.jboss.portal.portlet.controller.impl.ControllerRequestFactory;
@@ -99,8 +102,11 @@
public void doFilter(HttpServletRequest req, HttpServletResponse resp, FilterChain
chain) throws IOException, ServletException, PortletInvokerException
{
- PortletInvoker invoker =
(PortletInvoker)getServletContext().getAttribute(WebBootstrap.BEAN_PREFIX +
"ConsumerPortletInvoker");
+ //PortletInvoker invoker =
(PortletInvoker)getServletContext().getAttribute(WebBootstrap.BEAN_PREFIX +
"ConsumerPortletInvoker");
+ ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ PortletInvoker invoker =
(PortletInvoker)exoContainer.getComponentInstanceOfType(PortletInvokerInterceptor.class);
+
//
PortalPrepareResponse prepareResponse = new PortalPrepareResponse(req, resp);
Modified:
jbossexo/modules/portlet/trunk/portal/src/main/resources/simple-portal-war/WEB-INF/jboss-portal-beans.xml
===================================================================
---
jbossexo/modules/portlet/trunk/portal/src/main/resources/simple-portal-war/WEB-INF/jboss-portal-beans.xml 2009-07-06
20:47:04 UTC (rev 13525)
+++
jbossexo/modules/portlet/trunk/portal/src/main/resources/simple-portal-war/WEB-INF/jboss-portal-beans.xml 2009-07-06
21:44:41 UTC (rev 13526)
@@ -21,7 +21,89 @@
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
+<!--<deployment xmlns="urn:jboss:bean-deployer:2.0">-->
+<!---->
+<!-- <bean name="PortletApplicationDeployer"
class="org.jboss.portal.portlet.mc.PortletApplicationDeployer">-->
+<!-- <alias>PortletApplicationRegistry</alias>-->
+<!-- <property name="servletContainer"><inject
bean="ServletContainer"/></property>-->
+<!-- <property name="containerPortletInvoker"><inject
bean="ContainerPortletInvoker"/></property>-->
+<!-- </bean>-->
+<!---->
+<!-- The ServletContainerFactory -->
+<!-- <bean name="ServletContainerFactory"
class="org.jboss.portal.web.impl.DefaultServletContainerFactory">-->
+<!-- <constructor
factoryClass="org.jboss.portal.web.impl.DefaultServletContainerFactory"
factoryMethod="getInstance"/>-->
+<!-- </bean>-->
+<!---->
+<!-- The servlet container obtained from the ServletContainerFactory -->
+<!-- <bean name="ServletContainer"
class="org.jboss.portal.web.ServletContainer">-->
+<!-- <constructor factoryMethod="getServletContainer">-->
+<!-- <factory bean="ServletContainerFactory"/>-->
+<!-- </constructor>-->
+<!-- </bean>-->
+<!---->
+<!-- The producer persistence manager -->
+<!-- <bean name="ProducerPersistenceManager"
class="org.jboss.portal.portlet.impl.state.producer.PortletStatePersistenceManagerService"/>-->
+<!---->
+<!-- The producer state management policy -->
+<!-- <bean name="ProducerStateManagementPolicy"
class="org.jboss.portal.portlet.impl.state.StateManagementPolicyService">-->
+<!-- <property
name="persistLocally"><value>true</value></property>-->
+<!-- </bean>-->
+<!---->
+<!-- The producer state converter -->
+<!-- <bean name="ProducerStateConverter"
class="org.jboss.portal.portlet.impl.state.StateConverterV0"/>-->
+<!---->
+<!-- The consumer portlet invoker -->
+<!-- <bean name="ConsumerPortletInvoker"
class="org.jboss.portal.portlet.PortletInvokerInterceptor">-->
+<!-- <property name="next"><inject
bean="ConsumerCacheInterceptor"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="ConsumerCacheInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor">-->
+<!-- <property name="next"><inject
bean="PortletCustomizationInterceptor"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="PortletCustomizationInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.PortletCustomizationInterceptor">-->
+<!-- <property name="next"><inject
bean="ProducerPortletInvoker"/></property>-->
+<!-- </bean>-->
+<!---->
+<!-- The producer portlet invoker -->
+<!-- <bean name="ProducerPortletInvoker"
class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">-->
+<!-- <property name="next"><inject
bean="ContainerPortletInvoker"/></property>-->
+<!-- <property name="persistenceManager"><inject
bean="ProducerPersistenceManager"/></property>-->
+<!-- <property name="stateManagementPolicy"><inject
bean="ProducerStateManagementPolicy"/></property>-->
+<!-- <property name="stateConverter"><inject
bean="ProducerStateConverter"/></property>-->
+<!-- </bean>-->
+<!---->
+<!-- The portlet container invoker -->
+<!-- <bean name="ContainerPortletInvoker"
class="org.jboss.portal.portlet.container.ContainerPortletInvoker">-->
+<!-- <property name="next"><inject
bean="ValveInterceptor"/></property>-->
+<!-- </bean>-->
+<!---->
+<!-- Container stack -->
+<!-- <bean name="ValveInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.ValveInterceptor">-->
+<!-- <property name="portletApplicationRegistry"><inject
bean="PortletApplicationRegistry"
state="Instantiated"/></property>-->
+<!-- <property name="next"><inject
bean="SecureTransportInterceptor"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="SecureTransportInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor">-->
+<!-- <property name="next"><inject
bean="ContextDispatcherInterceptor"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="ContextDispatcherInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor">-->
+<!-- <property name="servletContainerFactory"><inject
bean="ServletContainerFactory"/></property>-->
+<!-- <property name="next"><inject
bean="ProducerCacheInterceptor"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="ProducerCacheInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor">-->
+<!-- <property name="next"><inject
bean="CCPPInterceptor"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="CCPPInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.CCPPInterceptor">-->
+<!-- <property name="next"><inject
bean="RequestAttributeConversationInterceptor"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="RequestAttributeConversationInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.RequestAttributeConversationInterceptor">-->
+<!-- <property name="next"><inject
bean="EventPayloadInterceptor"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="EventPayloadInterceptor"
class="org.jboss.portal.portlet.aspects.portlet.EventPayloadInterceptor">-->
+<!-- <property name="next"><inject
bean="PortletContainerDispatcher"/></property>-->
+<!-- </bean>-->
+<!-- <bean name="PortletContainerDispatcher"
class="org.jboss.portal.portlet.container.ContainerPortletDispatcher">-->
+<!-- </bean>-->
+<!---->
+<!--</deployment>-->
<bean name="PortletApplicationDeployer"
class="org.jboss.portal.portlet.mc.PortletApplicationDeployer">
<alias>PortletApplicationRegistry</alias>
Modified:
jbossexo/modules/portlet/trunk/portal/src/main/resources/simple-portal-war/WEB-INF/web.xml
===================================================================
---
jbossexo/modules/portlet/trunk/portal/src/main/resources/simple-portal-war/WEB-INF/web.xml 2009-07-06
20:47:04 UTC (rev 13525)
+++
jbossexo/modules/portlet/trunk/portal/src/main/resources/simple-portal-war/WEB-INF/web.xml 2009-07-06
21:44:41 UTC (rev 13526)
@@ -26,10 +26,10 @@
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_2_5.xsd"
version="2.5">
- <context-param>
+<!-- <context-param>
<param-name>jboss.portal.mc.beans_resource_location</param-name>
<param-value>/WEB-INF/jboss-portal-beans.xml</param-value>
- </context-param>
+ </context-param> -->
<filter>
<filter-name>ErrorHandlingFilter</filter-name>
<filter-class>org.jboss.portal.portlet.portal.ErrorHandlingFilter</filter-class>
@@ -46,12 +46,18 @@
<filter-name>ControllerFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
- <listener>
-
<listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
+ <listener>
+<!--
<listener-class>org.jboss.portal.common.mc.bootstrap.WebBootstrap</listener-class>
-->
+
<listener-class>org.jboss.portal.portlet.portal.exo.kernel.KernelListener</listener-class>
</listener>
<servlet>
<servlet-name>ContainerServlet</servlet-name>
<servlet-class>org.jboss.portal.web.impl.tomcat.TC6ContainerServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
+ <load-on-startup>0</load-on-startup>
</servlet>
+ <servlet>
+ <servlet-name>exoint</servlet-name>
+
<servlet-class>org.jboss.portal.portlet.exo.ExoKernelIntegration</servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
</web-app>
Modified:
jbossexo/modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java
===================================================================
---
jbossexo/modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java 2009-07-06
20:47:04 UTC (rev 13525)
+++
jbossexo/modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ContextDispatcherInterceptor.java 2009-07-06
21:44:41 UTC (rev 13526)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.portlet.aspects.portlet;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
import org.jboss.portal.portlet.container.PortletApplication;
import org.jboss.portal.portlet.container.PortletContainer;
import org.jboss.portal.portlet.container.ContainerPortletInvoker;
@@ -71,7 +73,11 @@
PortletApplication portletApplication = container.getPortletApplication();
ServerContext reqCtx = invocation.getServerContext();
ServletContext targetCtx = portletApplication.getContext().getServletContext();
- ServletContainer servletContainer = servletContainerFactory.getServletContainer();
+
+ ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ ServletContainer servletContainer = (ServletContainer)
exoContainer.getComponentInstance(ServletContainer.class);
+
+ //ServletContainer servletContainer =
servletContainerFactory.getServletContainer();
try
{
return (PortletInvocationResponse)reqCtx.dispatch(servletContainer, targetCtx,
callback, invocation);
Modified: jbossexo/modules/portlet/trunk/test/pom.xml
===================================================================
--- jbossexo/modules/portlet/trunk/test/pom.xml 2009-07-06 20:47:04 UTC (rev 13525)
+++ jbossexo/modules/portlet/trunk/test/pom.xml 2009-07-06 21:44:41 UTC (rev 13526)
@@ -177,6 +177,14 @@
<groupId>apache-taglibs</groupId>
<artifactId>standard</artifactId>
</dependency>
+
+ <!-- eXo kernel dependencies -->
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
</dependencies>
<build>
@@ -255,7 +263,7 @@
<property name="dependency.junit.jar"
value="${maven.dependency.junit.junit.jar.path}"/>
<property name="dependency.jsr168api.jar"
value="${maven.dependency.javax.portlet.portlet-api.jar.path}"/>
<property name="dependency.ccpp.jar"
value="${maven.dependency.javax.ccpp.ccpp.jar.path}"/>
- <property name="dependency.jaxb.jar"
value="${maven.dependency.sun-jaxb.jaxb-api.jar.path}"/>
+ <property name="dependency.jaxb.jar"
value="${maven.dependency.javax.xml.bind.jaxb-api.jar.path}"/>
<property name="dependency.portal-common-common.jar"
value="${maven.dependency.org.jboss.portal.common.common-common.jar.path}"/>
<property name="dependency.portal-common-portal.jar"
value="${maven.dependency.org.jboss.portal.common.common-portal.jar.path}"/>
@@ -285,7 +293,7 @@
<property name="dependency.jboss-dependency.jar"
value="${maven.dependency.org.jboss.microcontainer.jboss-dependency.jar.path}"/>
<property name="dependency.jboss-reflect.jar"
value="${maven.dependency.org.jboss.jboss-reflect.jar.path}"/>
<property name="dependency.jboss-common-core.jar"
value="${maven.dependency.org.jboss.jboss-common-core.jar.path}"/>
-<!-- <property name="dependency.jaxb.jar"
value="${maven.dependency.javax.xml.bind.jaxb-api.jar.path}"/> -->
+ <property name="dependency.jaxb.jar"
value="${maven.dependency.javax.xml.bind.jaxb-api.jar.path}"/>
<property name="dependency.jboss-mdr.jar"
value="${maven.dependency.org.jboss.jboss-mdr.jar.path}"/>
<property name="dependency.javassist.jar"
value="${maven.dependency.org.jboss.javassist.jar.path}"/>
<property name="dependency.resolver.jar"
value="${maven.dependency.apache-xerces.resolver.jar.path}"/>
@@ -300,6 +308,15 @@
<property name="dependency.apache-jstl.jar"
value="${maven.dependency.apache-taglibs.jstl.jar.path}"/>
<property name="dependency.apache-standard.jar"
value="${maven.dependency.apache-taglibs.standard.jar.path}"/>
<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"/>
Modified: jbossexo/modules/portlet/trunk/test/src/test/build.xml
===================================================================
--- jbossexo/modules/portlet/trunk/test/src/test/build.xml 2009-07-06 20:47:04 UTC (rev
13525)
+++ jbossexo/modules/portlet/trunk/test/src/test/build.xml 2009-07-06 21:44:41 UTC (rev
13526)
@@ -92,6 +92,16 @@
<path location="${dependency.jsr168api.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-unit">
</path>
@@ -608,6 +618,7 @@
<sharedClasspath>
<path refid="jboss-4.2-shared"/>
+ <path refid="exo"/>
</sharedClasspath>
<configuration home="${test.jboss-4.2.tempdir}">
@@ -730,6 +741,7 @@
<sharedClasspath>
<path refid="jboss-5.0-shared"/>
+ <path refid="exo"/>
</sharedClasspath>
<configuration home="${test.jboss-5.0.tempdir}">
@@ -822,6 +834,7 @@
<sharedClasspath>
<path refid="tomcat-6.0-shared"/>
+ <path refid="exo"/>
</sharedClasspath>
<configuration>