Author: sohil.shah(a)jboss.com
Date: 2008-04-02 02:49:13 -0400 (Wed, 02 Apr 2008)
New Revision: 10474
Added:
modules/presentation/trunk/presentation/src/main/config/sar/
modules/presentation/trunk/presentation/src/main/config/sar/META-INF/
modules/presentation/trunk/presentation/src/main/config/sar/META-INF/jboss-service.xml
modules/presentation/trunk/presentation/src/main/config/war/
modules/presentation/trunk/presentation/src/main/config/war/WEB-INF/
modules/presentation/trunk/presentation/src/main/config/war/WEB-INF/web.xml
Modified:
modules/presentation/trunk/.classpath
modules/presentation/trunk/build/pom.xml
modules/presentation/trunk/pom.xml
modules/presentation/trunk/presentation/build.xml
modules/presentation/trunk/presentation/pom.xml
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
Log:
fix for deployable presentation.sar
Modified: modules/presentation/trunk/.classpath
===================================================================
--- modules/presentation/trunk/.classpath 2008-04-02 05:15:47 UTC (rev 10473)
+++ modules/presentation/trunk/.classpath 2008-04-02 06:49:13 UTC (rev 10474)
@@ -14,9 +14,9 @@
<classpathentry kind="var"
path="M2_REPO/org/codehaus/cargo/cargo-core-uberjar/0.8/cargo-core-uberjar-0.8.jar"/>
<classpathentry kind="var"
path="M2_REPO/apache-tomcat/catalina/5.5.12/catalina-5.5.12.jar"/>
<classpathentry kind="var"
path="M2_REPO/javax/ccpp/ccpp/1.0/ccpp-1.0.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/portal/common/common-common/1.2.0.Beta2/common-common-1.2.0.Beta2.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/portal/common/common-mc/1.2.0.Beta2/common-mc-1.2.0.Beta2.jar"/>
- <classpathentry kind="var"
path="M2_REPO/org/jboss/portal/common/common-portal/1.2.0.Beta2/common-portal-1.2.0.Beta2.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/portal/common/common-common/1.2.0.Beta3/common-common-1.2.0.Beta3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/portal/common/common-mc/1.2.0.Beta3/common-mc-1.2.0.Beta3.jar"/>
+ <classpathentry kind="var"
path="M2_REPO/org/jboss/portal/common/common-portal/1.2.0.Beta3/common-portal-1.2.0.Beta3.jar"/>
<classpathentry kind="var"
path="M2_REPO/commons-codec/commons-codec/1.2/commons-codec-1.2.jar"/>
<classpathentry kind="var"
path="M2_REPO/apache-httpclient/commons-httpclient/2.0.2/commons-httpclient-2.0.2.jar"/>
<classpathentry kind="var"
path="M2_REPO/commons-httpclient/commons-httpclient/3.0.1/commons-httpclient-3.0.1.jar"/>
Modified: modules/presentation/trunk/build/pom.xml
===================================================================
--- modules/presentation/trunk/build/pom.xml 2008-04-02 05:15:47 UTC (rev 10473)
+++ modules/presentation/trunk/build/pom.xml 2008-04-02 06:49:13 UTC (rev 10474)
@@ -44,7 +44,11 @@
<version.jboss.microcontainer>2.0.0.Beta9</version.jboss.microcontainer>
<version.jboss.common.core>2.0.3.GA</version.jboss.common.core>
- <version.jboss.remoting>2.2.1.GA</version.jboss.remoting>
+ <version.jboss.remoting>2.2.1.GA</version.jboss.remoting>
+
+ <!-- your local appserver installation -->
+ <jboss.home>/home/soshah/appServers/jboss-4.2.1.GA</jboss.home>
+ <portal.deploy.dir>presentation</portal.deploy.dir>
</properties>
<repositories>
Modified: modules/presentation/trunk/pom.xml
===================================================================
--- modules/presentation/trunk/pom.xml 2008-04-02 05:15:47 UTC (rev 10473)
+++ modules/presentation/trunk/pom.xml 2008-04-02 06:49:13 UTC (rev 10474)
@@ -28,24 +28,5 @@
<modules>
<module>build</module>
<module>presentation</module>
- </modules>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
- <artifactId>maven-antrun-extended-plugin</artifactId>
- <version>1.13</version>
- <executions>
- <execution>
- <id>install</id>
- <phase>install</phase>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ </modules>
</project>
Modified: modules/presentation/trunk/presentation/build.xml
===================================================================
--- modules/presentation/trunk/presentation/build.xml 2008-04-02 05:15:47 UTC (rev 10473)
+++ modules/presentation/trunk/presentation/build.xml 2008-04-02 06:49:13 UTC (rev 10474)
@@ -41,10 +41,9 @@
<!--| modules. |-->
<!--+====================================================================+-->
<target name="package"
- description="Generate all target output.">
- <echo>Packaging Presentation..........</echo>
-
+ description="Generate all target output.">
<!-- compile the GWT Java code into JavaScript/Web resources -->
+ <!-- need to delete this otherwise newly generated files tend to make this
directory have 100s of unecessary files -->
<delete dir="${basedir}/target/ajax-useragent"/>
<java classpath="${plugin_classpath}" fork="true"
classname="com.google.gwt.dev.GWTCompiler">
<classpath>
@@ -55,14 +54,29 @@
<arg line="org.jboss.portal.presentation.ajax.Portal"/>
</java>
- <!--
- <jar jarfile="${build.lib}/presentation.war">
- <fileset
dir="${build.resources}/presentation-war"></fileset>
- <fileset
dir="${build.lib}/ajax/org.jboss.portal.presentation.ajax.Portal"></fileset>
+ <jar jarfile="${basedir}/target/presentation.war">
+ <fileset dir="${basedir}/src/main/config/war"></fileset>
+ <fileset
dir="${basedir}/target/ajax-useragent/org.jboss.portal.presentation.ajax.Portal"></fileset>
</jar>
- -->
+
+ <jar
jarfile="${basedir}/target/presentation-mockportal-plugin.jar">
+ <fileset dir="${basedir}/target/test-classes">
+ <include
name="org/jboss/portal/presentation/test/portal/**/*.class"/>
+ </fileset>
+ </jar>
+
+ <jar jarfile="${basedir}/target/presentation.sar">
+ <fileset dir="${basedir}/src/main/config/sar"/>
+ <fileset file="${basedir}/target/presentation.war"/>
+ <fileset file="${dependency.gwt-user.jar}"/>
+ <fileset file="${dependency.presentation.jar}"/>
+ <fileset
file="${basedir}/target/presentation-mockportal-plugin.jar"/>
+ </jar>
</target>
-
+
+ <target name="install" description="Generate all target output and
deploy it to a locally setup app server" depends="package">
+ <copy file="${basedir}/target/presentation.sar"
todir="${jboss.home}/server/${portal.deploy.dir}/deploy"
overwrite="true"/>
+ </target>
<!-- ================================================================== -->
<!-- Integration-Tests -->
<!-- ================================================================== -->
Modified: modules/presentation/trunk/presentation/pom.xml
===================================================================
--- modules/presentation/trunk/presentation/pom.xml 2008-04-02 05:15:47 UTC (rev 10473)
+++ modules/presentation/trunk/presentation/pom.xml 2008-04-02 06:49:13 UTC (rev 10474)
@@ -6,6 +6,7 @@
<version>1.0.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
+
<modelVersion>4.0.0</modelVersion>
<artifactId>presentation-presentation</artifactId>
<packaging>jar</packaging>
@@ -142,8 +143,8 @@
</dependencies>
<executions>
<execution>
- <id>package</id>
- <phase>package</phase>
+ <id>install</id>
+ <phase>install</phase>
<configuration>
<tasks>
<property name="compile_classpath"
refid="maven.compile.classpath"/>
@@ -151,8 +152,14 @@
<property name="test_classpath"
refid="maven.test.classpath"/>
<property name="plugin_classpath"
refid="maven.plugin.classpath"/>
<property name="project.version"
value="${project.version}"/>
+ <property name="jboss.home"
value="${jboss.home}"/>
+ <property name="portal.deploy.dir"
value="${portal.deploy.dir}"/>
+
+ <property name="dependency.gwt-user.jar"
value="${maven.dependency.com.google.gwt.gwt-user.jar.path}"/>
+ <property name="dependency.presentation.jar"
value="${basedir}/target/presentation-presentation-${project.version}.jar"/>
+
<ant antfile="${basedir}/build.xml">
- <target name="package"/>
+ <target name="install"/>
</ant>
</tasks>
</configuration>
Added:
modules/presentation/trunk/presentation/src/main/config/sar/META-INF/jboss-service.xml
===================================================================
---
modules/presentation/trunk/presentation/src/main/config/sar/META-INF/jboss-service.xml
(rev 0)
+++
modules/presentation/trunk/presentation/src/main/config/sar/META-INF/jboss-service.xml 2008-04-02
06:49:13 UTC (rev 10474)
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<server>
+ <!-- Front end HTTP layer level services -->
+ <mbean
+ code="org.jboss.portal.presentation.client.controller.UIController"
+ name="portal:service=Controller,type=Presentation"
+ xmbean-dd=""
+
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="PresentationServer"
proxy-type="attribute">portal:service=PresentationServer</depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.presentation.client.controller.AjaxUIController"
+ name="portal:service=Controller,type=Ajax/Presentation"
+ xmbean-dd=""
+
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="PresentationServer"
proxy-type="attribute">portal:service=PresentationServer</depends>
+ </mbean>
+
+ <!-- Not needed in a Mock Portal Server setup -->
+ <!--
+ <mbean
+
code="org.jboss.portal.core.presentation.model.StructuralStateContextImpl"
+ name="portal:container=ModelLoader"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="PortalObjectContainer"
proxy-type="attribute">portal:container=PortalObject</depends>
+ <depends>portal:container=PortalObject</depends>
+ <depends>portal:service=PageService</depends>
+ <depends>portal:commandFactory=DefaultPortal</depends>
+ <depends>portal:urlFactory=Delegating</depends>
+ <depends>portal:service=InterceptorStackFactory,type=Command</depends>
+ <depends>portal:container=Instance</depends>
+ <depends>portal:service=PortalAuthorizationManagerFactory</depends>
+ <depends>portal:service=CustomizationManager</depends>
+ <depends>portal:service=ContentProviderRegistry</depends>
+ <depends>portal:service=ResponseHandler,type=Selector</depends>
+ <depends>portal:service=ControlPolicy,type=Page</depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.core.presentation.server.PresentationServerImpl"
+ name="portal:service=PresentationServer"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="Processor"
proxy-type="attribute">portal:service=Processor</depends>
+ <depends optional-attribute-name="ModelLoader"
proxy-type="attribute">portal:container=ModelLoader</depends>
+ <depends optional-attribute-name="ContentRendererRegistry"
proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
+ <depends optional-attribute-name="PortalObjectContainer"
proxy-type="attribute">portal:container=PortalObject</depends>
+ <depends>portal:service=PageService</depends>
+ <depends>portal:commandFactory=DefaultPortal</depends>
+ <depends>portal:urlFactory=Delegating</depends>
+ <depends>portal:service=InterceptorStackFactory,type=Command</depends>
+ <depends>portal:container=Instance</depends>
+ <depends>portal:service=PortalAuthorizationManagerFactory</depends>
+ <depends>portal:service=CustomizationManager</depends>
+ <depends>portal:service=ContentProviderRegistry</depends>
+ <depends>portal:service=ResponseHandler,type=Selector</depends>
+ <depends>portal:service=ControlPolicy,type=Page</depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.core.presentation.server.MainProcessor"
+ name="portal:service=Processor"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends>portal:service=PageService</depends>
+ <depends>portal:commandFactory=DefaultPortal</depends>
+ <depends>portal:urlFactory=Delegating</depends>
+ <depends>portal:service=InterceptorStackFactory,type=Command</depends>
+ <depends>portal:container=Instance</depends>
+ <depends>portal:service=PortalAuthorizationManagerFactory</depends>
+ <depends>portal:service=ContentProviderRegistry</depends>
+ <depends>portal:service=ResponseHandler,type=Selector</depends>
+ <depends>portal:service=ControlPolicy,type=Page</depends>
+ <depends optional-attribute-name="PortalObjectContainer"
proxy-type="attribute">portal:container=PortalObject</depends>
+ <depends optional-attribute-name="CustomizationManager"
proxy-type="attribute">portal:service=CustomizationManager</depends>
+ </mbean>
+ -->
+
+ <!-- PF Plugin Services: Temprarily hooking in PF integrated with the Mock Portal
Server -->
+ <mbean
+
code="org.jboss.portal.presentation.test.portal.plugin.PresentationServerImpl"
+ name="portal:service=PresentationServer"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ <depends optional-attribute-name="Processor"
proxy-type="attribute">portal:service=Processor</depends>
+ </mbean>
+ <mbean
+ code="org.jboss.portal.presentation.test.portal.plugin.MainProcessor"
+ name="portal:service=Processor"
+ xmbean-dd=""
+ xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
+ <xmbean/>
+ </mbean>
+</server>
Added: modules/presentation/trunk/presentation/src/main/config/war/WEB-INF/web.xml
===================================================================
--- modules/presentation/trunk/presentation/src/main/config/war/WEB-INF/web.xml
(rev 0)
+++ modules/presentation/trunk/presentation/src/main/config/war/WEB-INF/web.xml 2008-04-02
06:49:13 UTC (rev 10474)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <!-- Add the GWT Client Filter to run the Portal in full Web 2.0 Ajax Mode. In
turn, to run in Classic Html Mode, turn this filter off -->
+ <filter>
+ <filter-name>GWTClientFilter</filter-name>
+
<filter-class>org.jboss.portal.presentation.impl.ajax.entry.GWTClientFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>GWTClientFilter</filter-name>
+ <servlet-name>PortalServletWithPathMapping</servlet-name>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>GWTClientFilter</filter-name>
+ <servlet-name>PortalServletWithDefaultServletMapping</servlet-name>
+ </filter-mapping>
+
+ <!-- Asynchronous service request processor -->
+ <servlet>
+ <servlet-name>AjaxPortalEntryPoint</servlet-name>
+
<servlet-class>org.jboss.portal.presentation.impl.ajax.entry.PortalEntryPoint</servlet-class>
+ <init-param>
+ <param-name>interceptorStackFactoryName</param-name>
+
<param-value>portal:service=InterceptorStackFactory,type=Server</param-value>
+ <description>The request controller factory for the portal
servlet</description>
+ </init-param>
+ <init-param>
+ <param-name>clientController</param-name>
+
<param-value>portal:service=Controller,type=Ajax/Presentation</param-value>
+ <description>The Client Controller</description>
+ </init-param>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>AjaxPortalEntryPoint</servlet-name>
+ <url-pattern>/portalrpc/*</url-pattern>
+ </servlet-mapping>
+</web-app>
Modified:
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java
===================================================================
---
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-02
05:15:47 UTC (rev 10473)
+++
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/impl/ajax/entry/PortalEntryPoint.java 2008-04-02
06:49:13 UTC (rev 10474)
@@ -29,6 +29,8 @@
import org.jboss.portal.presentation.protocol.GetActivation;
import org.jboss.portal.presentation.protocol.PostActivation;
import org.jboss.portal.presentation.invocation.PresentationInvocation;
+import org.jboss.portal.presentation.invocation.ClientController;
+import org.jboss.portal.presentation.invocation.PresentationInvocationHandler;
import com.google.gwt.user.client.rpc.SerializationException;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;
@@ -49,6 +51,11 @@
/** The interceptor stack. */
private InterceptorStackFactory interceptorStack = null;
+ /**
+ *
+ */
+ private ClientController clientController = null;
+
/** Configure the as default servlet. */
public void init() throws ServletException
@@ -60,11 +67,17 @@
//Locate the interceptor stack factory
this.interceptorStack = (InterceptorStackFactory)
MBeanProxy.get(InterceptorStackFactory.class, new ObjectName(
this.getInitParameter("interceptorStackFactoryName")),
- mbeanServer);
+ mbeanServer);
+
+ //Client Controller
+ this.clientController = (ClientController)
MBeanProxy.get(ClientController.class, new ObjectName(
+ this.getInitParameter("clientController")),
+ mbeanServer);
}
catch (Exception e)
{
- this.interceptorStack = null;
+ this.interceptorStack = null;
+ this.clientController = null;
String msg = "Ajax Portal Entry point could not be created";
log.error(msg, e);
throw new UnavailableException(msg);
@@ -279,8 +292,10 @@
WebResponse webResp = new WebResponse(resp);
PresentationInvocation invocation = new PresentationInvocation(webReq, webResp);
- //TODO: set the proper invocation handler here
+ //Set the proper invocation handler here
+ invocation.setHandler(new PresentationInvocationHandler(this.clientController));
- invocation.invoke(this.interceptorStack.getInterceptorStack());
+ //invocation.invoke(this.interceptorStack.getInterceptorStack());
+ invocation.invokeNext();
}
}