JBoss Portal SVN: r7735 - in branches/JBoss_Portal_Branch_2_6: core-wsrp and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-12 09:26:23 -0400 (Thu, 12 Jul 2007)
New Revision: 7735
Modified:
branches/JBoss_Portal_Branch_2_6/build/distrib.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/
branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml
Log:
Use the Servlet wrapper on core-wsrp
Modified: branches/JBoss_Portal_Branch_2_6/build/distrib.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/distrib.xml 2007-07-12 13:13:27 UTC (rev 7734)
+++ branches/JBoss_Portal_Branch_2_6/build/distrib.xml 2007-07-12 13:26:23 UTC (rev 7735)
@@ -239,6 +239,10 @@
<copy todir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp.sar">
<fileset dir="${source.dir}/wsrp/output/lib/portal-wsrp-exploded.sar"/>
</copy>
+ <mkdir dir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp-admin.sar"/>
+ <copy todir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp-admin.sar">
+ <fileset dir="${source.dir}/core-wsrp/output/resources" includes="portal-wsrp-admin.sar/**"/>
+ </copy>
</target>
<!--
@@ -269,6 +273,10 @@
<copy todir="${portal.build.ha.bin}/jboss-portal-ha.sar/portal-wsrp.sar">
<fileset dir="${source.dir}/wsrp/output/lib/portal-wsrp-exploded.sar"/>
</copy>
+ <mkdir dir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp-admin.sar"/>
+ <copy todir="${portal.build.normal.bin}/jboss-portal.sar/portal-wsrp-admin.sar">
+ <fileset dir="${source.dir}/core-wsrp/output/resources" includes="portal-wsrp-admin.sar/**"/>
+ </copy>
<copy file="${docs.dir}/readmeFiles/jboss-portal-ha-bin.README" todir="${portal.build.ha.bin}"/>
</target>
Property changes on: branches/JBoss_Portal_Branch_2_6/core-wsrp
___________________________________________________________________
Name: svn:ignore
+ output
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml 2007-07-12 13:13:27 UTC (rev 7734)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/build.xml 2007-07-12 13:26:23 UTC (rev 7735)
@@ -196,35 +196,39 @@
</fileset>
</jar>
+ <!-- portal-admin.war -->
+ <copy todir="${build.resources}/portal-wsrp-admin-war/WEB-INF/lib2">
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar,myfaces-impl.jar,jstl.jar"/>
+ <fileset dir="${build.lib}" includes="portal-wsrp-admin-lib.jar"/>
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
+ <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
+ <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
+ <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
+ </copy>
- <jar jarfile="${build.lib}/portal-wsrp-admin.war">
- <fileset dir="${build.resources}/portal-wsrp-admin-war"/>
- </jar>
+ <jar jarfile="${build.lib}/portal-wsrp-admin.war">
+ <fileset dir="${build.resources}/portal-wsrp-admin-war"/>
+ </jar>
- <!-- portal-wsrp-admin.sar -->
+ <!-- portal-wsrp-admin.sar -->
<copy todir="${build.resources}/portal-wsrp-admin-sar/lib">
- <fileset dir="${build.lib}" includes="portal-wsrp-admin-lib.jar"/>
-
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-loader-lib.jar"/>
<!-- For JSF -->
- <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
- <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar, myfaces-impl.jar, jstl.jar"/>
<fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
<fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
<fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
- <fileset dir="${el.el.lib}" includes="el-api.jar, el-ri.jar"/>
- <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
- <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
</copy>
- <!-- portal-wsrp-admin.sar -->
+ <!-- portal-wsrp-admin.sar -->
<copy todir="${build.resources}/portal-wsrp-admin-sar">
<fileset dir="${build.lib}" includes="portal-wsrp-admin.war"/>
</copy>
- <jar jarfile="${build.lib}/portal-wsrp-admin.sar">
- <fileset dir="${build.resources}/portal-wsrp-admin-sar" includes="**/*"/>
- </jar>
+ <jar jarfile="${build.lib}/portal-wsrp-admin.sar">
+ <fileset dir="${build.resources}/portal-wsrp-admin-sar" includes="**/*"/>
+ </jar>
</target>
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml 2007-07-12 13:13:27 UTC (rev 7734)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/portlet.xml 2007-07-12 13:26:23 UTC (rev 7735)
@@ -29,7 +29,7 @@
<description>Configuration portlet for WSRP remote producers.</description>
<portlet-name>WSRPConsumersConfigurationPortlet</portlet-name>
<display-name>WSRP Consumers Configuration</display-name>
- <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
+ <portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
<init-param>
<name>default-view</name>
<value>/WEB-INF/jsf/consumers/consumers.xhtml</value>
Modified: branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml 2007-07-12 13:13:27 UTC (rev 7734)
+++ branches/JBoss_Portal_Branch_2_6/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml 2007-07-12 13:26:23 UTC (rev 7735)
@@ -72,19 +72,10 @@
<!-- JSF entry point -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <servlet-class>org.jboss.portal.faces.loader.FacesLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
- <context-param>
- <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <listener>
- <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
- </listener>
-
</web-app>
16 years, 11 months
JBoss Portal SVN: r7734 - in branches/JBoss_Portal_Branch_2_6: core-admin/src/resources/portal-admin-war/WEB-INF and 3 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-12 09:13:27 -0400 (Thu, 12 Jul 2007)
New Revision: 7734
Added:
branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/
branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java
branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java
branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java
Removed:
branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java
branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java
branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java
branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/portlet/
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/build.xml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
branches/JBoss_Portal_Branch_2_6/faces/build.xml
Log:
Removed JSF MetaBridge
Added Servlet wrapper in core-admin
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/build.xml 2007-07-12 12:43:58 UTC (rev 7733)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/build.xml 2007-07-12 13:13:27 UTC (rev 7734)
@@ -186,31 +186,35 @@
<!-- portal-core-admin-lib.jar -->
<jar jarfile="${build.lib}/portal-core-admin-lib.jar">
- <fileset dir="${build.classes}">
- </fileset>
+ <fileset dir="${build.classes}"/>
</jar>
+ <!-- portal-admin.war -->
+ <copy todir="${build.resources}/portal-admin-war/WEB-INF/lib2">
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar,myfaces-impl.jar,jstl.jar"/>
+ <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
+ <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
+ <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
+ <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
+ </copy>
+ <copy todir="${build.resources}/portal-admin-war">
+ <fileset dir="${source.bin}/portal-admin-war"/>
+ </copy>
<!-- portal-admin.sar -->
<copy todir="${build.resources}/portal-admin.sar">
<fileset dir="${build.resources}/portal-admin-sar"/>
</copy>
<copy todir="${build.resources}/portal-admin.sar/lib">
- <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
-
- <!-- For JSF -->
- <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
- <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar, myfaces-impl.jar, jstl.jar"/>
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-loader-lib.jar"/>
<fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
<fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
<fileset dir="${apache.digester.lib}" includes="commons-digester.jar"/>
- <fileset dir="${el.el.lib}" includes="el-api.jar, el-ri.jar"/>
- <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
- <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
</copy>
<copy todir="${build.resources}/portal-admin.sar/portal-admin.war">
<fileset dir="${build.resources}/portal-admin-war"/>
- <fileset dir="${source.bin}/portal-admin-war"/>
</copy>
</target>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-12 12:43:58 UTC (rev 7733)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-12 13:13:27 UTC (rev 7734)
@@ -31,7 +31,7 @@
<description>Administration Portlet</description>
<portlet-name>AdminPortlet</portlet-name>
<display-name>Administration Portlet</display-name>
- <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
+ <portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
<init-param>
<name>default-view</name>
<value>/WEB-INF/jsf/objects.xhtml</value>
@@ -49,7 +49,7 @@
<description>Dashboard Configurator Portlet</description>
<portlet-name>DashboardConfigPortlet</portlet-name>
<display-name>Dashboard Configurator Portlet</display-name>
- <portlet-class>org.apache.myfaces.portlet.MyFacesGenericPortlet</portlet-class>
+ <portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
<init-param>
<name>default-view</name>
<value>/WEB-INF/jsf/dashboard/dashboard.xhtml</value>
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-07-12 12:43:58 UTC (rev 7733)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-07-12 13:13:27 UTC (rev 7734)
@@ -77,17 +77,8 @@
<!-- The JSF servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <servlet-class>org.jboss.portal.faces.loader.FacesLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
- <context-param>
- <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
- <param-value>true</param-value>
- </context-param>
-
- <listener>
- <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
- </listener>
-
</web-app>
Modified: branches/JBoss_Portal_Branch_2_6/faces/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/faces/build.xml 2007-07-12 12:43:58 UTC (rev 7733)
+++ branches/JBoss_Portal_Branch_2_6/faces/build.xml 2007-07-12 13:13:27 UTC (rev 7734)
@@ -154,10 +154,16 @@
<!-- portal-faces-lib.jar -->
<mkdir dir="${build.lib}"/>
<jar jarfile="${build.lib}/portal-faces-lib.jar">
- <fileset dir="${build.classes}"/>
+ <fileset dir="${build.classes}" excludes="org/jboss/portal/faces/loader/**"/>
<fileset dir="${build.resources}/portal-faces-lib-jar" includes="**/*"/>
</jar>
+ <!-- portal-faces-loader-lib.jar -->
+ <mkdir dir="${build.lib}"/>
+ <jar jarfile="${build.lib}/portal-faces-loader-lib.jar">
+ <fileset dir="${build.classes}" includes="org/jboss/portal/faces/loader/**"/>
+ </jar>
+
<!-- portal-faces.war -->
<mkdir dir="${build.resources}/portal-faces-war/WEB-INF/lib"/>
<copy todir="${build.resources}/portal-faces-war/WEB-INF/lib">
Copied: branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader (from rev 7732, trunk/faces/src/main/org/jboss/portal/faces/loader)
Deleted: branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java 2007-07-12 12:37:06 UTC (rev 7732)
+++ branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java 2007-07-12 13:13:27 UTC (rev 7734)
@@ -1,86 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.faces.loader;
-
-import org.apache.log4j.Logger;
-
-import java.net.URLClassLoader;
-import java.net.URL;
-import java.util.Map;
-import java.util.HashMap;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class FacesClassLoader extends URLClassLoader
-{
-
- /** . */
- private final Logger log = Logger.getLogger(FacesClassLoader.class);
-
- public FacesClassLoader(URL[] urls, ClassLoader classLoader)
- {
- super(urls, classLoader);
- }
-
- private final Map cache = new HashMap();
-
- protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException
- {
- if (name.startsWith("javax.faces") || name.startsWith("org.apache.myfaces"))
- {
- log.debug("Want to load " + name + " locally");
- return locateClass(name);
- }
-
- //
- try
- {
- log.debug("Want to load " + name + " will delegate");
- return super.loadClass(name, resolve);
- }
- catch (ClassNotFoundException e)
- {
- log.debug("Not found in the parent will try to load " + name + " locally");
- return locateClass(name);
- }
- }
-
- private Class locateClass(String name) throws ClassNotFoundException
- {
- //
- Class clazz = (Class)cache.get(name);
-
- //
- if (clazz == null)
- {
- clazz = findClass(name);
- cache.put(name, clazz);
- }
-
- //
- return clazz;
- }
-
-}
Copied: branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java (from rev 7732, trunk/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java 2007-07-12 13:13:27 UTC (rev 7734)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * 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.faces.loader;
+
+import org.apache.log4j.Logger;
+
+import java.net.URLClassLoader;
+import java.net.URL;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class FacesClassLoader extends URLClassLoader
+{
+
+ /** . */
+ private final Logger log = Logger.getLogger(FacesClassLoader.class);
+
+ public FacesClassLoader(URL[] urls, ClassLoader classLoader)
+ {
+ super(urls, classLoader);
+ }
+
+ private final Map cache = new HashMap();
+
+ protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException
+ {
+ if (name.startsWith("javax.faces") || name.startsWith("org.apache.myfaces"))
+ {
+ log.debug("Want to load " + name + " locally");
+ return locateClass(name);
+ }
+
+ //
+ try
+ {
+ log.debug("Want to load " + name + " will delegate");
+ return super.loadClass(name, resolve);
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.debug("Not found in the parent will try to load " + name + " locally");
+ return locateClass(name);
+ }
+ }
+
+ private Class locateClass(String name) throws ClassNotFoundException
+ {
+ //
+ Class clazz = (Class)cache.get(name);
+
+ //
+ if (clazz == null)
+ {
+ clazz = findClass(name);
+ cache.put(name, clazz);
+ }
+
+ //
+ return clazz;
+ }
+
+}
Deleted: branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java 2007-07-12 12:37:06 UTC (rev 7732)
+++ branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java 2007-07-12 13:13:27 UTC (rev 7734)
@@ -1,195 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.faces.loader;
-
-import org.apache.log4j.Logger;
-
-import javax.servlet.http.HttpServlet;
-import javax.servlet.ServletException;
-import javax.servlet.ServletContext;
-import javax.servlet.Servlet;
-import javax.servlet.ServletContextListener;
-import javax.servlet.ServletContextEvent;
-import java.net.URL;
-import java.util.ArrayList;
-import java.io.File;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class FacesLoaderServlet extends HttpServlet
-{
-
- /** . */
- private final static Logger log = Logger.getLogger(FacesLoaderServlet.class);
-
- /** . */
- private final String servletContextListenerClassName = "org.apache.myfaces.webapp.StartupServletContextListener";
-
- /** . */
- private FacesClassLoader loader;
-
- /** . */
- private ServletContextListener listener;
-
- /** . */
- private Servlet servlet;
-
- public void init() throws ServletException
- {
- try
- {
- ServletContext ctx = getServletConfig().getServletContext();
-
- ArrayList tmp = new ArrayList();
- File f = new File(ctx.getRealPath("/WEB-INF/lib2/"));
- File[] libs = f.listFiles();
- for (int i = 0; i < libs.length; i++)
- {
- File lib = libs[i];
- URL libURL = lib.toURL();
- log.debug("Added " + libURL + " to faces class loader");
- tmp.add(libURL);
- }
- URL[] urls = (URL[])tmp.toArray(new URL[tmp.size()]);
-
- //
- loader = new FacesClassLoader(urls, Thread.currentThread().getContextClassLoader());
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
-
- //
- if (loader != null)
- {
- getServletConfig().getServletContext().setAttribute("FACESCLASSLOADER", loader);
- ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(loader);
-
- //
- try
- {
- // Perform myfaces bootstrap
- initMyFaces();
-
- //
- initFacesServlet();
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(containerLoader);
- }
- }
- }
-
- public void destroy()
- {
- if (loader != null)
- {
- ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(loader);
-
- //
- try
- {
- //
- destroyFacesServlet();
-
- //
- destroyMyFaces();
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(containerLoader);
- }
- }
- }
-
-
- private void initFacesServlet()
- {
- try
- {
- Class facesServletClass = loader.loadClass("javax.faces.webapp.FacesServlet");
- servlet = (Servlet)facesServletClass.newInstance();
- servlet.init(getServletConfig());
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- private void destroyFacesServlet()
- {
- if (servlet != null)
- {
- servlet.destroy();
- }
- }
-
- private void initMyFaces()
- {
- try
- {
- Class bridgeClass = Thread.currentThread().getContextClassLoader().loadClass(servletContextListenerClassName);
- log.debug("Obtain bridge bootstrap class " + bridgeClass.getName());
- listener = (ServletContextListener)bridgeClass.newInstance();
- }
- catch (ClassNotFoundException e)
- {
- // It is not an error, this happens when we run with Sun RI
- log.debug("Bridge bootstrap not available " + servletContextListenerClassName, e);
- }
- catch (IllegalAccessException e)
- {
- log.error("Bridge bootstrap not accessible " + servletContextListenerClassName, e);
- }
- catch (InstantiationException e)
- {
- log.error("Bridge bootstrap not instantiable " + servletContextListenerClassName, e);
- }
-
- //
- if (listener != null)
- {
- log.debug("About to initialize the bridge bootstrap");
- ServletContextEvent event = new ServletContextEvent(getServletConfig().getServletContext());
- listener.contextInitialized(event);
- }
- }
-
- private void destroyMyFaces()
- {
- if (listener != null)
- {
- log.debug("About to destroy the bridge bootstrap");
- ServletContextEvent event = new ServletContextEvent(getServletConfig().getServletContext());
- listener.contextDestroyed(event);
- }
- }
-
-}
Copied: branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java (from rev 7732, trunk/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java 2007-07-12 13:13:27 UTC (rev 7734)
@@ -0,0 +1,195 @@
+/******************************************************************************
+ * 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.faces.loader;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+import javax.servlet.ServletContext;
+import javax.servlet.Servlet;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+import java.net.URL;
+import java.util.ArrayList;
+import java.io.File;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class FacesLoaderServlet extends HttpServlet
+{
+
+ /** . */
+ private final static Logger log = Logger.getLogger(FacesLoaderServlet.class);
+
+ /** . */
+ private final String servletContextListenerClassName = "org.apache.myfaces.webapp.StartupServletContextListener";
+
+ /** . */
+ private FacesClassLoader loader;
+
+ /** . */
+ private ServletContextListener listener;
+
+ /** . */
+ private Servlet servlet;
+
+ public void init() throws ServletException
+ {
+ try
+ {
+ ServletContext ctx = getServletConfig().getServletContext();
+
+ ArrayList tmp = new ArrayList();
+ File f = new File(ctx.getRealPath("/WEB-INF/lib2/"));
+ File[] libs = f.listFiles();
+ for (int i = 0; i < libs.length; i++)
+ {
+ File lib = libs[i];
+ URL libURL = lib.toURL();
+ log.debug("Added " + libURL + " to faces class loader");
+ tmp.add(libURL);
+ }
+ URL[] urls = (URL[])tmp.toArray(new URL[tmp.size()]);
+
+ //
+ loader = new FacesClassLoader(urls, Thread.currentThread().getContextClassLoader());
+ }
+ catch (Exception e)
+ {
+ throw new ServletException("Cannot find WEB-INF/lib2 directory to load libraries from", e);
+ }
+
+ //
+ if (loader != null)
+ {
+ getServletConfig().getServletContext().setAttribute("FACESCLASSLOADER", loader);
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+
+ //
+ try
+ {
+ // Perform myfaces bootstrap
+ initMyFaces();
+
+ //
+ initFacesServlet();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+
+ public void destroy()
+ {
+ if (loader != null)
+ {
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+
+ //
+ try
+ {
+ //
+ destroyFacesServlet();
+
+ //
+ destroyMyFaces();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+
+
+ private void initFacesServlet()
+ {
+ try
+ {
+ Class facesServletClass = loader.loadClass("javax.faces.webapp.FacesServlet");
+ servlet = (Servlet)facesServletClass.newInstance();
+ servlet.init(getServletConfig());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ private void destroyFacesServlet()
+ {
+ if (servlet != null)
+ {
+ servlet.destroy();
+ }
+ }
+
+ private void initMyFaces()
+ {
+ try
+ {
+ Class bridgeClass = Thread.currentThread().getContextClassLoader().loadClass(servletContextListenerClassName);
+ log.debug("Obtain bridge bootstrap class " + bridgeClass.getName());
+ listener = (ServletContextListener)bridgeClass.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+ // It is not an error, this happens when we run with Sun RI
+ log.debug("Bridge bootstrap not available " + servletContextListenerClassName, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ log.error("Bridge bootstrap not accessible " + servletContextListenerClassName, e);
+ }
+ catch (InstantiationException e)
+ {
+ log.error("Bridge bootstrap not instantiable " + servletContextListenerClassName, e);
+ }
+
+ //
+ if (listener != null)
+ {
+ log.debug("About to initialize the bridge bootstrap");
+ ServletContextEvent event = new ServletContextEvent(getServletConfig().getServletContext());
+ listener.contextInitialized(event);
+ }
+ }
+
+ private void destroyMyFaces()
+ {
+ if (listener != null)
+ {
+ log.debug("About to destroy the bridge bootstrap");
+ ServletContextEvent event = new ServletContextEvent(getServletConfig().getServletContext());
+ listener.contextDestroyed(event);
+ }
+ }
+
+}
Deleted: branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java 2007-07-12 12:37:06 UTC (rev 7732)
+++ branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java 2007-07-12 13:13:27 UTC (rev 7734)
@@ -1,118 +0,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. *
- ******************************************************************************/
-package org.jboss.portal.faces.loader;
-
-import javax.portlet.Portlet;
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletException;
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.PortletSecurityException;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class FacesPortlet implements Portlet
-{
-
- /** . */
- private Portlet portlet;
-
- /** . */
- private ClassLoader loader;
-
- public void init(PortletConfig config) throws PortletException
- {
- try
- {
- loader = (ClassLoader)config.getPortletContext().getAttribute("FACESCLASSLOADER");
- if (loader != null)
- {
- ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(loader);
- try
- {
- Class facesServletClass = loader.loadClass("org.apache.myfaces.portlet.MyFacesGenericPortlet");
- portlet = (Portlet)facesServletClass.newInstance();
- portlet.init(config);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(containerLoader);
- }
- }
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public void processAction(ActionRequest request, ActionResponse response) throws PortletException, PortletSecurityException, IOException
- {
- if (portlet != null)
- {
- ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(loader);
- try
- {
- portlet.processAction(request, response);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(containerLoader);
- }
- }
- }
-
- public void render(RenderRequest request, RenderResponse response) throws PortletException, PortletSecurityException, IOException
- {
- if (portlet != null)
- {
- ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
- Thread.currentThread().setContextClassLoader(loader);
- try
- {
- portlet.render(request, response);
- }
- finally
- {
- Thread.currentThread().setContextClassLoader(containerLoader);
- }
- }
- }
-
- public void destroy()
- {
- if (portlet != null)
- {
- portlet.destroy();
- portlet = null;
- loader = null;
- }
- }
-}
Copied: branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java (from rev 7732, trunk/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java)
===================================================================
--- branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_6/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java 2007-07-12 13:13:27 UTC (rev 7734)
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * 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.faces.loader;
+
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class FacesPortlet implements Portlet
+{
+
+ /** . */
+ private Portlet portlet;
+
+ /** . */
+ private ClassLoader loader;
+
+ public void init(PortletConfig config) throws PortletException
+ {
+ try
+ {
+ loader = (ClassLoader)config.getPortletContext().getAttribute("FACESCLASSLOADER");
+ if (loader != null)
+ {
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+ try
+ {
+ Class facesServletClass = loader.loadClass("org.apache.myfaces.portlet.MyFacesGenericPortlet");
+ portlet = (Portlet)facesServletClass.newInstance();
+ portlet.init(config);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, PortletSecurityException, IOException
+ {
+ if (portlet != null)
+ {
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+ try
+ {
+ portlet.processAction(request, response);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+
+ public void render(RenderRequest request, RenderResponse response) throws PortletException, PortletSecurityException, IOException
+ {
+ if (portlet != null)
+ {
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+ try
+ {
+ portlet.render(request, response);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+
+ public void destroy()
+ {
+ if (portlet != null)
+ {
+ portlet.destroy();
+ portlet = null;
+ loader = null;
+ }
+ }
+}
16 years, 11 months
JBoss Portal SVN: r7733 - trunk/build.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-07-12 08:43:58 -0400 (Thu, 12 Jul 2007)
New Revision: 7733
Modified:
trunk/build/build-thirdparty.xml
Log:
modified thirdparty
Modified: trunk/build/build-thirdparty.xml
===================================================================
--- trunk/build/build-thirdparty.xml 2007-07-12 12:37:06 UTC (rev 7732)
+++ trunk/build/build-thirdparty.xml 2007-07-12 12:43:58 UTC (rev 7733)
@@ -33,7 +33,7 @@
<!-- Main Definition of dependencies -->
<build id="jbossportal-thirdparty"
impltitle="JBossPortal"
- implversion="jboss-portal-2.6.0.BETA1"
+ implversion="jboss-portal-2.6.1.CR1"
implvendor="JBoss, a division of Red Hat Inc."
implurl="http://www.jboss.org"
description="JBoss Portal"
@@ -51,8 +51,10 @@
<componentref name="apache-ant" version="1.6.5"/>
<componentref name="jackrabbit" version="1.1.1"/>
<componentref name="apache-myfaces" version="1.1.1"/>
+ <componentref name="apache-beanutils" version="1.7.0"/>
<componentref name="apache-codec" version="1.3.0"/>
<componentref name="apache-collections" version="3.1"/>
+ <componentref name="apache-digester" version="1.6"/>
<!--<componentref name="apache-directory" version="mixed"/>-->
<componentref name="apache-fileupload" version="1.1.1"/>
<componentref name="apache-httpclient" version="3.0.1"/>
@@ -65,6 +67,7 @@
<componentref name="asm" version="1.5.3"/>
<componentref name="beanshell" version="1.3.0"/>
<componentref name="cglib" version="2.1.3"/>
+ <componentref name="commons-el" version="1.0"/>
<componentref name="dbunit" version="2.1"/>
<componentref name="dom4j" version="1.6.1jboss"/>
<componentref name="ehcache" version="1.2.2"/>
@@ -103,12 +106,14 @@
<componentref name="sun-jaf" version="1.0.2"/>
<componentref name="sun-javacc" version="3.2-portal"/>
<componentref name="sun-javamail" version="1.3.1"/>
+ <componentref name="sun-jsf" version="1.2.1_02"/>
<componentref name="sun-opends" version="snapshot"/>
<componentref name="sun-servlet" version="2.4"/>
<componentref name="xdoclet" version="1.2.3"/>
<componentref name="jbpm/jaronly" version="3.1.2"/>
<componentref name="freemarker" version="2.3.9"/>
<componentref name="wutka-dtdparser" version="1.2.1"/>
+ <componentref name="commons-el" version="1.0"/>
<componentref name="portals-bridges" version="1.0"/>
<!-- patched jsf-portlet bridge -->
<componentref name="portals-bridges/jsf-portlet" version="1.2-patched"/>
16 years, 11 months
JBoss Portal SVN: r7732 - in trunk: core-admin/src/resources/portal-admin-war/WEB-INF and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-07-12 08:37:06 -0400 (Thu, 12 Jul 2007)
New Revision: 7732
Added:
trunk/faces/src/main/org/jboss/portal/faces/loader/
trunk/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java
trunk/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java
trunk/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java
Modified:
trunk/core-admin/build.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
trunk/faces/build.xml
Log:
Faces loader implementation
Modified: trunk/core-admin/build.xml
===================================================================
--- trunk/core-admin/build.xml 2007-07-12 05:27:37 UTC (rev 7731)
+++ trunk/core-admin/build.xml 2007-07-12 12:37:06 UTC (rev 7732)
@@ -186,29 +186,41 @@
<!-- portal-core-admin-lib.jar -->
<jar jarfile="${build.lib}/portal-core-admin-lib.jar">
- <fileset dir="${build.classes}">
- </fileset>
+ <fileset dir="${build.classes}"/>
</jar>
+ <!-- portal-admin.war -->
+ <copy todir="${build.resources}/portal-admin.war/WEB-INF/lib2">
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar,myfaces-impl.jar,jstl.jar"/>
+ <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
+ <fileset dir="${apache.myfaces.lib}" includes="myfaces-api.jar,myfaces-impl.jar,jstl.jar"/>
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
+ <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
+ <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
+ <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
+ <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
+ </copy>
+ <copy todir="${build.resources}/portal-admin.war">
+ <fileset dir="${source.bin}/portal-admin-war"/>
+ <fileset dir="${build.resources}/portal-admin-war"/>
+ </copy>
+
<!-- portal-admin.sar -->
<copy todir="${build.resources}/portal-admin.sar">
<fileset dir="${build.resources}/portal-admin-sar"/>
</copy>
<copy todir="${build.resources}/portal-admin.sar/lib">
- <fileset dir="${build.lib}" includes="portal-core-admin-lib.jar"/>
- <!--<fileset dir="." includes="jsf-portlet.jar"/>-->
+ <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-loader-lib.jar"/>
+
<!-- For JSF -->
- <fileset dir="${jboss.portal-faces.root}/lib" includes="portal-faces-lib.jar"/>
- <fileset dir="../core-admin/src/etc/sun-jsf" includes="jsf-example.jar"/>
- <fileset dir="${facelets.facelets.lib}" includes="jsf-facelets.jar"/>
- <fileset dir="${el.el.lib}" includes="el-api.jar,el-ri.jar"/>
- <fileset dir="${portals.bridges/jsf.portlet.lib}" includes="jsf-portlet.jar"/>
+ <fileset dir="${apache.beanutils.lib}" includes="commons-beanutils.jar"/>
+ <fileset dir="${apache.digester.lib}" includes="commons-digester-1.6.jar"/>
+ <fileset dir="${commons.el.lib}" includes="commons-el.jar"/>
+
</copy>
-
<copy todir="${build.resources}/portal-admin.sar/portal-admin.war">
- <fileset dir="${build.resources}/portal-admin-war"/>
- <fileset dir="${source.bin}/portal-admin-war"/>
+ <fileset dir="${build.resources}/portal-admin.war"/>
</copy>
</target>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-12 05:27:37 UTC (rev 7731)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/portlet.xml 2007-07-12 12:37:06 UTC (rev 7732)
@@ -31,9 +31,9 @@
<description>Administration Portlet</description>
<portlet-name>AdminPortlet</portlet-name>
<display-name>Administration Portlet</display-name>
- <portlet-class>org.jboss.portal.faces.portlet.JSFMetaBridgePortlet</portlet-class>
+ <portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
<init-param>
- <name>VIEW</name>
+ <name>default-view</name>
<value>/WEB-INF/jsf/objects.xhtml</value>
</init-param>
<supports>
@@ -49,9 +49,9 @@
<description>Dashboard Configurator Portlet</description>
<portlet-name>DashboardConfigPortlet</portlet-name>
<display-name>Dashboard Configurator Portlet</display-name>
- <portlet-class>org.jboss.portal.faces.portlet.JSFMetaBridgePortlet</portlet-class>
+ <portlet-class>org.jboss.portal.faces.loader.FacesPortlet</portlet-class>
<init-param>
- <name>VIEW</name>
+ <name>default-view</name>
<value>/WEB-INF/jsf/dashboard/dashboard.xhtml</value>
</init-param>
<expiration-cache>-1</expiration-cache>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-07-12 05:27:37 UTC (rev 7731)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-07-12 12:37:06 UTC (rev 7732)
@@ -77,13 +77,7 @@
<!-- The JSF servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <servlet-class>org.jboss.portal.faces.loader.FacesLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
-
- <!-- The JSF meta bridge bootstrap -->
- <listener>
- <display-name> Faces Meta Bridge Bootstrap</display-name>
- <listener-class>org.jboss.portal.faces.portlet.JSFMetaBridgeBootstrap</listener-class>
- </listener>
</web-app>
Modified: trunk/faces/build.xml
===================================================================
--- trunk/faces/build.xml 2007-07-12 05:27:37 UTC (rev 7731)
+++ trunk/faces/build.xml 2007-07-12 12:37:06 UTC (rev 7732)
@@ -154,10 +154,16 @@
<!-- portal-faces-lib.jar -->
<mkdir dir="${build.lib}"/>
<jar jarfile="${build.lib}/portal-faces-lib.jar">
- <fileset dir="${build.classes}"/>
+ <fileset dir="${build.classes}" excludes="org/jboss/portal/faces/loader/**"/>
<fileset dir="${build.resources}/portal-faces-lib-jar" includes="**/*"/>
</jar>
+ <!-- portal-faces-loader-lib.jar -->
+ <mkdir dir="${build.lib}"/>
+ <jar jarfile="${build.lib}/portal-faces-loader-lib.jar">
+ <fileset dir="${build.classes}" includes="org/jboss/portal/faces/loader/**"/>
+ </jar>
+
<!-- portal-faces.war -->
<mkdir dir="${build.resources}/portal-faces-war/WEB-INF/lib"/>
<copy todir="${build.resources}/portal-faces-war/WEB-INF/lib">
Added: trunk/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java (rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/loader/FacesClassLoader.java 2007-07-12 12:37:06 UTC (rev 7732)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * 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.faces.loader;
+
+import org.apache.log4j.Logger;
+
+import java.net.URLClassLoader;
+import java.net.URL;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class FacesClassLoader extends URLClassLoader
+{
+
+ /** . */
+ private final Logger log = Logger.getLogger(FacesClassLoader.class);
+
+ public FacesClassLoader(URL[] urls, ClassLoader classLoader)
+ {
+ super(urls, classLoader);
+ }
+
+ private final Map cache = new HashMap();
+
+ protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException
+ {
+ if (name.startsWith("javax.faces") || name.startsWith("org.apache.myfaces"))
+ {
+ log.debug("Want to load " + name + " locally");
+ return locateClass(name);
+ }
+
+ //
+ try
+ {
+ log.debug("Want to load " + name + " will delegate");
+ return super.loadClass(name, resolve);
+ }
+ catch (ClassNotFoundException e)
+ {
+ log.debug("Not found in the parent will try to load " + name + " locally");
+ return locateClass(name);
+ }
+ }
+
+ private Class locateClass(String name) throws ClassNotFoundException
+ {
+ //
+ Class clazz = (Class)cache.get(name);
+
+ //
+ if (clazz == null)
+ {
+ clazz = findClass(name);
+ cache.put(name, clazz);
+ }
+
+ //
+ return clazz;
+ }
+
+}
Added: trunk/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java (rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/loader/FacesLoaderServlet.java 2007-07-12 12:37:06 UTC (rev 7732)
@@ -0,0 +1,195 @@
+/******************************************************************************
+ * 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.faces.loader;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.http.HttpServlet;
+import javax.servlet.ServletException;
+import javax.servlet.ServletContext;
+import javax.servlet.Servlet;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+import java.net.URL;
+import java.util.ArrayList;
+import java.io.File;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class FacesLoaderServlet extends HttpServlet
+{
+
+ /** . */
+ private final static Logger log = Logger.getLogger(FacesLoaderServlet.class);
+
+ /** . */
+ private final String servletContextListenerClassName = "org.apache.myfaces.webapp.StartupServletContextListener";
+
+ /** . */
+ private FacesClassLoader loader;
+
+ /** . */
+ private ServletContextListener listener;
+
+ /** . */
+ private Servlet servlet;
+
+ public void init() throws ServletException
+ {
+ try
+ {
+ ServletContext ctx = getServletConfig().getServletContext();
+
+ ArrayList tmp = new ArrayList();
+ File f = new File(ctx.getRealPath("/WEB-INF/lib2/"));
+ File[] libs = f.listFiles();
+ for (int i = 0; i < libs.length; i++)
+ {
+ File lib = libs[i];
+ URL libURL = lib.toURL();
+ log.debug("Added " + libURL + " to faces class loader");
+ tmp.add(libURL);
+ }
+ URL[] urls = (URL[])tmp.toArray(new URL[tmp.size()]);
+
+ //
+ loader = new FacesClassLoader(urls, Thread.currentThread().getContextClassLoader());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ //
+ if (loader != null)
+ {
+ getServletConfig().getServletContext().setAttribute("FACESCLASSLOADER", loader);
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+
+ //
+ try
+ {
+ // Perform myfaces bootstrap
+ initMyFaces();
+
+ //
+ initFacesServlet();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+
+ public void destroy()
+ {
+ if (loader != null)
+ {
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+
+ //
+ try
+ {
+ //
+ destroyFacesServlet();
+
+ //
+ destroyMyFaces();
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+
+
+ private void initFacesServlet()
+ {
+ try
+ {
+ Class facesServletClass = loader.loadClass("javax.faces.webapp.FacesServlet");
+ servlet = (Servlet)facesServletClass.newInstance();
+ servlet.init(getServletConfig());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ private void destroyFacesServlet()
+ {
+ if (servlet != null)
+ {
+ servlet.destroy();
+ }
+ }
+
+ private void initMyFaces()
+ {
+ try
+ {
+ Class bridgeClass = Thread.currentThread().getContextClassLoader().loadClass(servletContextListenerClassName);
+ log.debug("Obtain bridge bootstrap class " + bridgeClass.getName());
+ listener = (ServletContextListener)bridgeClass.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+ // It is not an error, this happens when we run with Sun RI
+ log.debug("Bridge bootstrap not available " + servletContextListenerClassName, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ log.error("Bridge bootstrap not accessible " + servletContextListenerClassName, e);
+ }
+ catch (InstantiationException e)
+ {
+ log.error("Bridge bootstrap not instantiable " + servletContextListenerClassName, e);
+ }
+
+ //
+ if (listener != null)
+ {
+ log.debug("About to initialize the bridge bootstrap");
+ ServletContextEvent event = new ServletContextEvent(getServletConfig().getServletContext());
+ listener.contextInitialized(event);
+ }
+ }
+
+ private void destroyMyFaces()
+ {
+ if (listener != null)
+ {
+ log.debug("About to destroy the bridge bootstrap");
+ ServletContextEvent event = new ServletContextEvent(getServletConfig().getServletContext());
+ listener.contextDestroyed(event);
+ }
+ }
+
+}
Added: trunk/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java (rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/loader/FacesPortlet.java 2007-07-12 12:37:06 UTC (rev 7732)
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * 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.faces.loader;
+
+import javax.portlet.Portlet;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class FacesPortlet implements Portlet
+{
+
+ /** . */
+ private Portlet portlet;
+
+ /** . */
+ private ClassLoader loader;
+
+ public void init(PortletConfig config) throws PortletException
+ {
+ try
+ {
+ loader = (ClassLoader)config.getPortletContext().getAttribute("FACESCLASSLOADER");
+ if (loader != null)
+ {
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+ try
+ {
+ Class facesServletClass = loader.loadClass("org.apache.myfaces.portlet.MyFacesGenericPortlet");
+ portlet = (Portlet)facesServletClass.newInstance();
+ portlet.init(config);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ public void processAction(ActionRequest request, ActionResponse response) throws PortletException, PortletSecurityException, IOException
+ {
+ if (portlet != null)
+ {
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+ try
+ {
+ portlet.processAction(request, response);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+
+ public void render(RenderRequest request, RenderResponse response) throws PortletException, PortletSecurityException, IOException
+ {
+ if (portlet != null)
+ {
+ ClassLoader containerLoader = Thread.currentThread().getContextClassLoader();
+ Thread.currentThread().setContextClassLoader(loader);
+ try
+ {
+ portlet.render(request, response);
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(containerLoader);
+ }
+ }
+ }
+
+ public void destroy()
+ {
+ if (portlet != null)
+ {
+ portlet.destroy();
+ portlet = null;
+ loader = null;
+ }
+ }
+}
16 years, 11 months
JBoss Portal SVN: r7731 - in branches/JBoss_Portal_Branch_2_6: core/src/main/org/jboss/portal/core/model/portal and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-07-12 01:27:37 -0400 (Thu, 12 Jul 2007)
New Revision: 7731
Modified:
branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
Log:
- JBPORTAL-1574: Handle root case specifically so that we bypass issue with Oracle.
- Use constants instead of hardcoded values (more could be done in particular for LegacyFormat)...
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2007-07-12 05:19:40 UTC (rev 7730)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2007-07-12 05:27:37 UTC (rev 7731)
@@ -30,12 +30,12 @@
import org.jboss.portal.security.RoleSecurityBinding;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -114,10 +114,10 @@
/**
* Create and persist the provided child object. The object also becomes of child of this node.
*
- * @param name the child name
+ * @param name the child name
* @param childObject the child object
* @throws DuplicatePortalObjectException if a child with such a name already exists
- * @throws IllegalArgumentException if the name is null or zero length or the child object is null
+ * @throws IllegalArgumentException if the name is null or zero length or the child object is null
*/
void addChild(String name, PortalObjectImpl childObject) throws DuplicatePortalObjectException, IllegalArgumentException
{
@@ -243,7 +243,7 @@
public String toString()
{
- return path + ":" + name;
+ return path.toString() + PortalObjectId.NAMESPACE_SEPARATOR + name;
}
protected PortalObjectId toChildPath(String name)
@@ -342,4 +342,4 @@
return null;
}
}
-}
+}
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java 2007-07-12 05:19:40 UTC (rev 7730)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java 2007-07-12 05:27:37 UTC (rev 7731)
@@ -22,23 +22,22 @@
******************************************************************************/
package org.jboss.portal.core.impl.model.portal;
+import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
+import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
-import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
import org.jboss.logging.Logger;
+import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
+import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.jems.hibernate.ObjectContextualizer;
import org.jboss.portal.security.impl.JBossAuthorizationDomainRegistry;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
-import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
-import org.jboss.portal.core.model.portal.PortalObjectPath;
import javax.naming.InitialContext;
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
@@ -47,7 +46,8 @@
{
/** The query for lookup when the path is null. */
- private static final String LOOKUP_QUERY_FOR_NULL_PATH = "from ObjectNode where path=:path or path is null";
+ private static final String LOOKUP_QUERY_FOR_EMPTY_PATH = "from ObjectNode where path=:path";
+ private static final String LOOKUP_QUERY_FOR_ROOT = "from ObjectNode where path=:path or path is null";
/** . */
private static Logger log = Logger.getLogger(PersistentPortalObjectContainer.class);
@@ -247,9 +247,15 @@
Object result;
if (id.getPath().getLength() == 0)
{
- // For oracle where an empty path is treated as null so we need to add that here
- // See also org.jboss.portal.core.hibernate.OracleString
- Query query = session.createQuery(LOOKUP_QUERY_FOR_NULL_PATH);
+ // Oracle returns the root object when using LOOKUP_QUERY_FOR_NULL_PATH thus preventing the creation of the
+ // dashboard node as null is never returned for it and is therefore cached...
+ String queryString = LOOKUP_QUERY_FOR_EMPTY_PATH;
+ if (id.toString().lastIndexOf(PortalObjectPath.CanonicalFormat.PATH_SEPARATOR) == 0)
+ {
+ queryString = LOOKUP_QUERY_FOR_ROOT;
+ }
+
+ Query query = session.createQuery(queryString);
query.setParameter("path", id);
query.setCacheable(true);
result = query.uniqueResult();
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2007-07-12 05:19:40 UTC (rev 7730)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2007-07-12 05:27:37 UTC (rev 7731)
@@ -26,11 +26,9 @@
/**
* A composite id for a portal object in the scope of its container.
+ * <p/>
+ * <ul> <li>The empty string maps to the empty namespace and the empty path</li> </ul>
*
- * <ul>
- * <li>The empty string maps to the empty namespace and the empty path</li>
- * </ul>
- *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
@@ -51,12 +49,13 @@
/** The lazy computed to string value for legacy format. */
private String toStringLegacyFormat;
+ public static final char NAMESPACE_SEPARATOR = ':';
/**
* Build a new portal object id.
*
* @param namespace the namespace value
- * @param path the path object
+ * @param path the path object
* @throws IllegalArgumentException if any argument is null
*/
public PortalObjectId(String namespace, PortalObjectPath path) throws IllegalArgumentException
@@ -120,9 +119,9 @@
* Parse a portal object id given its string representation.
*
* @param idValue the id string value
- * @param format the format
- * @throws IllegalArgumentException if any argument is null or not well formed
+ * @param format the format
* @return the PortalObjectId
+ * @throws IllegalArgumentException if any argument is null or not well formed
*/
public static PortalObjectId parse(String idValue, PortalObjectPath.Format format) throws IllegalArgumentException
{
@@ -130,7 +129,7 @@
{
throw new IllegalArgumentException("No null id value accepted");
}
- int pos = idValue.indexOf(':');
+ int pos = idValue.indexOf(NAMESPACE_SEPARATOR);
//
if (pos == -1)
@@ -150,7 +149,7 @@
*
* @param namespace the namespace value
* @param pathValue the path value
- * @param format the path format
+ * @param format the path format
* @return the PortalObjectId
* @throws IllegalArgumentException if any argument is null or not well formed
*/
@@ -210,8 +209,8 @@
* Format a portal object id values to a string value.
*
* @param namespace the id value
- * @param path the id path
- * @param format the desired format
+ * @param path the id path
+ * @param format the desired format
* @return the formated value
* @throws IllegalArgumentException if any argument is null or not well formed
*/
@@ -227,7 +226,7 @@
}
if (namespace.length() > 0)
{
- return namespace + ":" + path.toString(format);
+ return namespace + NAMESPACE_SEPARATOR + path.toString(format);
}
else
{
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2007-07-12 05:19:40 UTC (rev 7730)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2007-07-12 05:27:37 UTC (rev 7731)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.core.model.portal;
+import org.jboss.portal.common.util.Base64;
import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.util.Base64;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
@@ -232,9 +232,7 @@
return hashCode.intValue();
}
- /**
- * Lexicographical order based implementation on the names atoms.
- */
+ /** Lexicographical order based implementation on the names atoms. */
public int compareTo(Object o)
{
PortalObjectPath that = (PortalObjectPath)o;
@@ -339,12 +337,16 @@
}
/** Canonical format, smth like /a/b/c. */
- public static final PortalObjectPath.Format CANONICAL_FORMAT = new PortalObjectPath.Format()
+ public static final PortalObjectPath.Format CANONICAL_FORMAT = new CanonicalFormat();
+
+ public static final class CanonicalFormat extends Format
{
+ public static final char PATH_SEPARATOR = '/';
+
public String[] parse(String value)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(value, "value", "Format.parse(value)");
- if (value.charAt(0) != '/')
+ if (value.charAt(0) != PATH_SEPARATOR)
{
throw new IllegalArgumentException("Not a canonical value " + value);
}
@@ -358,7 +360,7 @@
int previous = 1;
while (true)
{
- int next = value.indexOf('/', previous);
+ int next = value.indexOf(PATH_SEPARATOR, previous);
if (next == -1)
{
break;
@@ -373,7 +375,7 @@
previous = 1;
while (true)
{
- int next = value.indexOf('/', previous);
+ int next = value.indexOf(PATH_SEPARATOR, previous);
if (next == -1)
{
break;
@@ -392,7 +394,7 @@
ParameterValidation.throwIllegalArgExceptionIfNull(names, "name string array");
if (from == to)
{
- return "/";
+ return "" + PATH_SEPARATOR;
}
else
{
@@ -404,13 +406,15 @@
{
throw new IllegalArgumentException("No null name expected in the name string array");
}
- tmp.append('/').append(name);
+ tmp.append(PATH_SEPARATOR).append(name);
}
return tmp.toString();
}
}
- };
+ }
+ ;
+
/** The internal format when it is persisted, smth like a.b.c . */
public static final PortalObjectPath.Format LEGACY_FORMAT = new PortalObjectPath.LegacyFormat();
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-07-12 05:19:40 UTC (rev 7730)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-07-12 05:27:37 UTC (rev 7731)
@@ -70,6 +70,16 @@
TransactionAssert.commitTransaction();
}
+ public void testDashboardNodeCreation() throws DuplicatePortalObjectException
+ {
+ TransactionAssert.beginTransaction();
+ PortalObject root = container.getContext();
+ PortalObject dashboard = container.createContext("dashboard");
+ assertNotNull(dashboard);
+ assertFalse(root.equals(dashboard));
+ TransactionAssert.commitTransaction();
+ }
+
public void testPropertyUpdateCascadeToDescendantsWhenTheyDoNotDeclareIt() throws Exception
{
TransactionAssert.beginTransaction();
@@ -395,4 +405,4 @@
return po1.getId().compareTo(po2.getId());
}
}
-}
\ No newline at end of file
+}
Modified: branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java 2007-07-12 05:19:40 UTC (rev 7730)
+++ branches/JBoss_Portal_Branch_2_6/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java 2007-07-12 05:27:37 UTC (rev 7731)
@@ -22,24 +22,24 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui.dashboard;
+import org.jboss.portal.common.util.IteratorStatus;
+import org.jboss.portal.core.admin.ui.actions.AddPageAction;
+import org.jboss.portal.core.admin.ui.common.PageManagerBean;
+import org.jboss.portal.core.admin.ui.portlet.PortletDefinitionInvoker;
+import org.jboss.portal.core.model.instance.InstanceContainer;
+import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
+import org.jboss.portal.core.model.portal.Page;
+import org.jboss.portal.core.model.portal.Portal;
+import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.Portal;
-import org.jboss.portal.core.model.portal.Page;
-import org.jboss.portal.core.model.portal.PortalObject;
-import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
import org.jboss.portal.core.model.portal.PortalObjectPath;
-import org.jboss.portal.core.model.instance.InstanceContainer;
-import org.jboss.portal.core.admin.ui.common.PageManagerBean;
-import org.jboss.portal.core.admin.ui.portlet.PortletDefinitionInvoker;
-import org.jboss.portal.core.admin.ui.actions.AddPageAction;
import org.jboss.portal.theme.LayoutService;
+import org.jboss.portal.theme.ThemeConstants;
import org.jboss.portal.theme.ThemeService;
-import org.jboss.portal.theme.ThemeConstants;
-import org.jboss.portal.common.util.IteratorStatus;
+import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
-import javax.faces.context.FacesContext;
import java.util.Collection;
/**
@@ -50,7 +50,8 @@
{
/** . */
- private static final PortalObjectId dashboardId = PortalObjectId.parse("dashboard:/", PortalObjectPath.CANONICAL_FORMAT);
+ private static final PortalObjectId dashboardId = PortalObjectId.parse("dashboard"
+ + PortalObjectId.NAMESPACE_SEPARATOR + PortalObjectPath.CanonicalFormat.PATH_SEPARATOR, PortalObjectPath.CANONICAL_FORMAT);
// Wired services
@@ -127,7 +128,7 @@
{
return;
}
-
+
// Page for editting
if (selectedPageName != null)
{
@@ -150,7 +151,7 @@
//
Collection pages = userPortal.getChildren(PortalObject.PAGE_MASK);
pageItems = new SelectItem[pages.size()];
- for (IteratorStatus i = new IteratorStatus(pages);i.hasNext();)
+ for (IteratorStatus i = new IteratorStatus(pages); i.hasNext();)
{
PortalObject object = (PortalObject)i.next();
SelectItem item = new SelectItem();
16 years, 11 months
JBoss Portal SVN: r7730 - in trunk: core/src/main/org/jboss/portal/core/model/portal and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-07-12 01:19:40 -0400 (Thu, 12 Jul 2007)
New Revision: 7730
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
Log:
- JBPORTAL-1574: Handle root case specifically so that we bypass issue with Oracle.
- Use constants instead of hardcoded values (more could be done in particular for LegacyFormat)...
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2007-07-11 22:16:34 UTC (rev 7729)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/ObjectNode.java 2007-07-12 05:19:40 UTC (rev 7730)
@@ -30,12 +30,12 @@
import org.jboss.portal.security.RoleSecurityBinding;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
-import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -114,10 +114,10 @@
/**
* Create and persist the provided child object. The object also becomes of child of this node.
*
- * @param name the child name
+ * @param name the child name
* @param childObject the child object
* @throws DuplicatePortalObjectException if a child with such a name already exists
- * @throws IllegalArgumentException if the name is null or zero length or the child object is null
+ * @throws IllegalArgumentException if the name is null or zero length or the child object is null
*/
void addChild(String name, PortalObjectImpl childObject) throws DuplicatePortalObjectException, IllegalArgumentException
{
@@ -243,7 +243,7 @@
public String toString()
{
- return path + ":" + name;
+ return path.toString() + PortalObjectId.NAMESPACE_SEPARATOR + name;
}
protected PortalObjectId toChildPath(String name)
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java 2007-07-11 22:16:34 UTC (rev 7729)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PersistentPortalObjectContainer.java 2007-07-12 05:19:40 UTC (rev 7730)
@@ -22,23 +22,22 @@
******************************************************************************/
package org.jboss.portal.core.impl.model.portal;
+import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
+import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
-import org.hibernate.Criteria;
import org.hibernate.criterion.Restrictions;
import org.jboss.logging.Logger;
+import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
+import org.jboss.portal.core.model.portal.PortalObjectId;
+import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.jems.hibernate.ObjectContextualizer;
import org.jboss.portal.security.impl.JBossAuthorizationDomainRegistry;
import org.jboss.portal.security.spi.auth.PortalAuthorizationManagerFactory;
-import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
-import org.jboss.portal.core.model.portal.PortalObjectPath;
import javax.naming.InitialContext;
-import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
-
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision$
@@ -47,7 +46,8 @@
{
/** The query for lookup when the path is null. */
- private static final String LOOKUP_QUERY_FOR_NULL_PATH = "from ObjectNode where path=:path or path is null";
+ private static final String LOOKUP_QUERY_FOR_EMPTY_PATH = "from ObjectNode where path=:path";
+ private static final String LOOKUP_QUERY_FOR_ROOT = "from ObjectNode where path=:path or path is null";
/** . */
private static Logger log = Logger.getLogger(PersistentPortalObjectContainer.class);
@@ -247,9 +247,15 @@
Object result;
if (id.getPath().getLength() == 0)
{
- // For oracle where an empty path is treated as null so we need to add that here
- // See also org.jboss.portal.core.hibernate.OracleString
- Query query = session.createQuery(LOOKUP_QUERY_FOR_NULL_PATH);
+ // Oracle returns the root object when using LOOKUP_QUERY_FOR_NULL_PATH thus preventing the creation of the
+ // dashboard node as null is never returned for it and is therefore cached...
+ String queryString = LOOKUP_QUERY_FOR_EMPTY_PATH;
+ if (id.toString().lastIndexOf(PortalObjectPath.CanonicalFormat.PATH_SEPARATOR) == 0)
+ {
+ queryString = LOOKUP_QUERY_FOR_ROOT;
+ }
+
+ Query query = session.createQuery(queryString);
query.setParameter("path", id);
query.setCacheable(true);
result = query.uniqueResult();
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2007-07-11 22:16:34 UTC (rev 7729)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectId.java 2007-07-12 05:19:40 UTC (rev 7730)
@@ -26,11 +26,9 @@
/**
* A composite id for a portal object in the scope of its container.
+ * <p/>
+ * <ul> <li>The empty string maps to the empty namespace and the empty path</li> </ul>
*
- * <ul>
- * <li>The empty string maps to the empty namespace and the empty path</li>
- * </ul>
- *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
@@ -51,12 +49,13 @@
/** The lazy computed to string value for legacy format. */
private String toStringLegacyFormat;
+ public static final char NAMESPACE_SEPARATOR = ':';
/**
* Build a new portal object id.
*
* @param namespace the namespace value
- * @param path the path object
+ * @param path the path object
* @throws IllegalArgumentException if any argument is null
*/
public PortalObjectId(String namespace, PortalObjectPath path) throws IllegalArgumentException
@@ -120,9 +119,9 @@
* Parse a portal object id given its string representation.
*
* @param idValue the id string value
- * @param format the format
- * @throws IllegalArgumentException if any argument is null or not well formed
+ * @param format the format
* @return the PortalObjectId
+ * @throws IllegalArgumentException if any argument is null or not well formed
*/
public static PortalObjectId parse(String idValue, PortalObjectPath.Format format) throws IllegalArgumentException
{
@@ -130,7 +129,7 @@
{
throw new IllegalArgumentException("No null id value accepted");
}
- int pos = idValue.indexOf(':');
+ int pos = idValue.indexOf(NAMESPACE_SEPARATOR);
//
if (pos == -1)
@@ -150,7 +149,7 @@
*
* @param namespace the namespace value
* @param pathValue the path value
- * @param format the path format
+ * @param format the path format
* @return the PortalObjectId
* @throws IllegalArgumentException if any argument is null or not well formed
*/
@@ -210,8 +209,8 @@
* Format a portal object id values to a string value.
*
* @param namespace the id value
- * @param path the id path
- * @param format the desired format
+ * @param path the id path
+ * @param format the desired format
* @return the formated value
* @throws IllegalArgumentException if any argument is null or not well formed
*/
@@ -227,7 +226,7 @@
}
if (namespace.length() > 0)
{
- return namespace + ":" + path.toString(format);
+ return namespace + NAMESPACE_SEPARATOR + path.toString(format);
}
else
{
Modified: trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2007-07-11 22:16:34 UTC (rev 7729)
+++ trunk/core/src/main/org/jboss/portal/core/model/portal/PortalObjectPath.java 2007-07-12 05:19:40 UTC (rev 7730)
@@ -22,9 +22,9 @@
******************************************************************************/
package org.jboss.portal.core.model.portal;
+import org.jboss.portal.common.util.Base64;
import org.jboss.portal.common.util.ParameterValidation;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.util.Base64;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
@@ -232,9 +232,7 @@
return hashCode.intValue();
}
- /**
- * Lexicographical order based implementation on the names atoms.
- */
+ /** Lexicographical order based implementation on the names atoms. */
public int compareTo(Object o)
{
PortalObjectPath that = (PortalObjectPath)o;
@@ -339,12 +337,16 @@
}
/** Canonical format, smth like /a/b/c. */
- public static final PortalObjectPath.Format CANONICAL_FORMAT = new PortalObjectPath.Format()
+ public static final PortalObjectPath.Format CANONICAL_FORMAT = new CanonicalFormat();
+
+ public static final class CanonicalFormat extends Format
{
+ public static final char PATH_SEPARATOR = '/';
+
public String[] parse(String value)
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(value, "value", "Format.parse(value)");
- if (value.charAt(0) != '/')
+ if (value.charAt(0) != PATH_SEPARATOR)
{
throw new IllegalArgumentException("Not a canonical value " + value);
}
@@ -358,7 +360,7 @@
int previous = 1;
while (true)
{
- int next = value.indexOf('/', previous);
+ int next = value.indexOf(PATH_SEPARATOR, previous);
if (next == -1)
{
break;
@@ -373,7 +375,7 @@
previous = 1;
while (true)
{
- int next = value.indexOf('/', previous);
+ int next = value.indexOf(PATH_SEPARATOR, previous);
if (next == -1)
{
break;
@@ -392,7 +394,7 @@
ParameterValidation.throwIllegalArgExceptionIfNull(names, "name string array");
if (from == to)
{
- return "/";
+ return "" + PATH_SEPARATOR;
}
else
{
@@ -404,13 +406,15 @@
{
throw new IllegalArgumentException("No null name expected in the name string array");
}
- tmp.append('/').append(name);
+ tmp.append(PATH_SEPARATOR).append(name);
}
return tmp.toString();
}
}
- };
+ }
+ ;
+
/** The internal format when it is persisted, smth like a.b.c . */
public static final PortalObjectPath.Format LEGACY_FORMAT = new PortalObjectPath.LegacyFormat();
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-07-11 22:16:34 UTC (rev 7729)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-07-12 05:19:40 UTC (rev 7730)
@@ -70,6 +70,16 @@
TransactionAssert.commitTransaction();
}
+ public void testDashboardNodeCreation() throws DuplicatePortalObjectException
+ {
+ TransactionAssert.beginTransaction();
+ PortalObject root = container.getContext();
+ PortalObject dashboard = container.createContext("dashboard");
+ assertNotNull(dashboard);
+ assertFalse(root.equals(dashboard));
+ TransactionAssert.commitTransaction();
+ }
+
public void testPropertyUpdateCascadeToDescendantsWhenTheyDoNotDeclareIt() throws Exception
{
TransactionAssert.beginTransaction();
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java 2007-07-11 22:16:34 UTC (rev 7729)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/dashboard/DashboardBean.java 2007-07-12 05:19:40 UTC (rev 7730)
@@ -22,24 +22,24 @@
******************************************************************************/
package org.jboss.portal.core.admin.ui.dashboard;
+import org.jboss.portal.common.util.IteratorStatus;
+import org.jboss.portal.core.admin.ui.actions.AddPageAction;
+import org.jboss.portal.core.admin.ui.common.PageManagerBean;
+import org.jboss.portal.core.admin.ui.portlet.PortletDefinitionInvoker;
+import org.jboss.portal.core.model.instance.InstanceContainer;
+import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
+import org.jboss.portal.core.model.portal.Page;
+import org.jboss.portal.core.model.portal.Portal;
+import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectId;
-import org.jboss.portal.core.model.portal.Portal;
-import org.jboss.portal.core.model.portal.Page;
-import org.jboss.portal.core.model.portal.PortalObject;
-import org.jboss.portal.core.model.portal.NoSuchPortalObjectException;
import org.jboss.portal.core.model.portal.PortalObjectPath;
-import org.jboss.portal.core.model.instance.InstanceContainer;
-import org.jboss.portal.core.admin.ui.common.PageManagerBean;
-import org.jboss.portal.core.admin.ui.portlet.PortletDefinitionInvoker;
-import org.jboss.portal.core.admin.ui.actions.AddPageAction;
import org.jboss.portal.theme.LayoutService;
+import org.jboss.portal.theme.ThemeConstants;
import org.jboss.portal.theme.ThemeService;
-import org.jboss.portal.theme.ThemeConstants;
-import org.jboss.portal.common.util.IteratorStatus;
+import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
-import javax.faces.context.FacesContext;
import java.util.Collection;
/**
@@ -50,7 +50,8 @@
{
/** . */
- private static final PortalObjectId dashboardId = PortalObjectId.parse("dashboard:/", PortalObjectPath.CANONICAL_FORMAT);
+ private static final PortalObjectId dashboardId = PortalObjectId.parse("dashboard"
+ + PortalObjectId.NAMESPACE_SEPARATOR + PortalObjectPath.CanonicalFormat.PATH_SEPARATOR, PortalObjectPath.CANONICAL_FORMAT);
// Wired services
@@ -127,7 +128,7 @@
{
return;
}
-
+
// Page for editting
if (selectedPageName != null)
{
@@ -150,7 +151,7 @@
//
Collection pages = userPortal.getChildren(PortalObject.PAGE_MASK);
pageItems = new SelectItem[pages.size()];
- for (IteratorStatus i = new IteratorStatus(pages);i.hasNext();)
+ for (IteratorStatus i = new IteratorStatus(pages); i.hasNext();)
{
PortalObject object = (PortalObject)i.next();
SelectItem item = new SelectItem();
16 years, 11 months
JBoss Portal SVN: r7729 - branches/JBoss_Portal_Branch_2_6/wsrp.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 18:16:34 -0400 (Wed, 11 Jul 2007)
New Revision: 7729
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
Log:
Remove test case moved to core-wsrp.
Modified: branches/JBoss_Portal_Branch_2_6/wsrp/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-07-11 21:59:46 UTC (rev 7728)
+++ branches/JBoss_Portal_Branch_2_6/wsrp/build.xml 2007-07-11 22:16:34 UTC (rev 7729)
@@ -831,7 +831,7 @@
<test todir="${test.reports}"
name="org.jboss.portal.test.wsrp.other.RegistrationPropertyDescriptionTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.wsrp.handler.RequestHeaderClientHandlerTestCase"/>
- <test todir="${test.reports}" name="org.jboss.portal.test.wsrp.other.ConsumerBeanTestCase"/>
+ <!--test todir="${test.reports}" name="org.jboss.portal.test.wsrp.other.ConsumerBeanTestCase"/-->
</x-test>
<x-sysproperty>
<!--<jvmarg value="-Xdebug"/>
16 years, 11 months
JBoss Portal SVN: r7728 - branches/JBoss_Portal_Branch_2_6/faces/src/resources/portal-faces-lib-jar/META-INF.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 17:59:46 -0400 (Wed, 11 Jul 2007)
New Revision: 7728
Removed:
branches/JBoss_Portal_Branch_2_6/faces/src/resources/portal-faces-lib-jar/META-INF/faces-config.xml
Log:
faces-config.xml not necessary anymore
Deleted: branches/JBoss_Portal_Branch_2_6/faces/src/resources/portal-faces-lib-jar/META-INF/faces-config.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/faces/src/resources/portal-faces-lib-jar/META-INF/faces-config.xml 2007-07-11 21:52:16 UTC (rev 7727)
+++ branches/JBoss_Portal_Branch_2_6/faces/src/resources/portal-faces-lib-jar/META-INF/faces-config.xml 2007-07-11 21:59:46 UTC (rev 7728)
@@ -1,70 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
- The contents of this file are subject to the terms
- of the Common Development and Distribution License
- (the License). You may not use this file except in
- compliance with the License.
-
- You can obtain a copy of the License at
- https://javaserverfaces.dev.java.net/CDDL.html or
- legal/CDDLv1.0.txt.
- See the License for the specific language governing
- permission and limitations under the License.
-
- When distributing Covered Code, include this CDDL
- Header Notice in each file and include the License file
- at legal/CDDLv1.0.txt.
- If applicable, add the following below the CDDL Header,
- with the fields enclosed by brackets [] replaced by
- your own identifying information:
- "Portions Copyrighted [year] [name of copyright owner]"
-
- [Name of File] [ver.__] [Date]
-
- Copyright 2006 Sun Microsystems Inc. All Rights Reserved
--->
-
-<!DOCTYPE faces-config PUBLIC
- "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
- "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-
-
-<faces-config>
-
-
- <!-- Install Replacement Factory Objects -->
- <factory>
- <faces-context-factory>
- org.jboss.portal.faces.portlet.JSFMetaBridgeFacesContextFactoryImpl
- </faces-context-factory>
- <lifecycle-factory>
- org.jboss.portal.faces.portlet.JSFMetaBridgeLifecycleFactoryImpl
- </lifecycle-factory>
- </factory>
-
- <!-- Install Replacement Application Objects -->
- <application>
- <view-handler>
- org.jboss.portal.faces.portlet.JSFMetaBridgeViewHandlerImpl
- </view-handler>
- </application>
-
-
- <component>
- <component-type>PortletComponent</component-type>
- <component-class>com.sun.faces.portlet.PortletComponent</component-class>
- <property>
- <description>
- ValueBinding Expression which evaluates to a PortletId for the Portlet
- </description>
- <property-name>portletId</property-name>
- <property-class>java.lang.String</property-class>
- </property>
-
- <component-extension>
- <component-family>PortletComponent</component-family>
- </component-extension>
-
- </component>
-</faces-config>
16 years, 11 months
JBoss Portal SVN: r7727 - in branches/JBoss_Portal_Branch_2_6: tools/etc/buildfragments and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 17:52:16 -0400 (Wed, 11 Jul 2007)
New Revision: 7727
Modified:
branches/JBoss_Portal_Branch_2_6/build/build.xml
branches/JBoss_Portal_Branch_2_6/tools/etc/buildfragments/modules.ent
Log:
core-wsrp
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-07-11 21:40:42 UTC (rev 7726)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-07-11 21:52:16 UTC (rev 7727)
@@ -301,7 +301,7 @@
<!--<copy file="../core-search/output/lib/portal-search.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>-->
<copy file="../widget/output/lib/widget.war" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../wsrp/output/lib/portal-wsrp.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
- <copy file="../wsrp/output/lib/portal-wsrp-admin.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../core-wsrp/output/lib/portal-wsrp-admin.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
</target>
<target name="undeploy-all"
Modified: branches/JBoss_Portal_Branch_2_6/tools/etc/buildfragments/modules.ent
===================================================================
--- branches/JBoss_Portal_Branch_2_6/tools/etc/buildfragments/modules.ent 2007-07-11 21:40:42 UTC (rev 7726)
+++ branches/JBoss_Portal_Branch_2_6/tools/etc/buildfragments/modules.ent 2007-07-11 21:52:16 UTC (rev 7727)
@@ -141,6 +141,13 @@
<pathelement path="${jboss.portal-core-samples.lib}/portal-core-samples-lib.jar"/>
</path>
+ <!-- core-wsrp -->
+ <property name="jboss.portal-core-wsrp.root" value="${project.root}/core-wsrp/output"/>
+ <property name="jboss.portal-core-wsrp.lib" value="${jboss.portal-core-wsrp.root}/lib"/>
+ <path id="jboss.portal-core-wsrp.classpath">
+ <pathelement path="${jboss.portal-core-wsrp.lib}/portal-core-wsrp-lib.jar"/>
+ </path>
+
<!-- theme -->
<property name="jboss.portal-theme.root" value="${project.root}/theme/output"/>
<property name="jboss.portal-theme.lib" value="${jboss.portal-theme.root}/lib"/>
16 years, 11 months
JBoss Portal SVN: r7726 - branches/JBoss_Portal_Branch_2_6/build.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-07-11 17:40:42 -0400 (Wed, 11 Jul 2007)
New Revision: 7726
Modified:
branches/JBoss_Portal_Branch_2_6/build/build.xml
Log:
Update deploy-all and undeploy-all
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-07-11 21:21:55 UTC (rev 7725)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-07-11 21:40:42 UTC (rev 7726)
@@ -131,6 +131,7 @@
<module name="core-cms"/>
<module name="core-management"/>
<module name="core-admin"/>
+ <module name="core-wsrp"/>
<module name="search"/>
<module name="core-samples"/>
<module name="wsrp"/>
@@ -143,7 +144,7 @@
<group name="portal">
<include
- modules="common, test, api, web, jems, server, security, identity, search, format, portlet, portlet-server, bridge, faces, portlet-federation, theme, workflow, cms, registration, core, wsrp, core-admin, core-cms, core-management, core-samples, widget"/>
+ modules="common, test, api, web, jems, server, security, identity, search, format, portlet, portlet-server, bridge, faces, portlet-federation, theme, workflow, cms, registration, core, wsrp, core-wsrp, core-admin, core-cms, core-management, core-samples, widget"/>
</group>
<group name="cms">
@@ -300,6 +301,7 @@
<!--<copy file="../core-search/output/lib/portal-search.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>-->
<copy file="../widget/output/lib/widget.war" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
<copy file="../wsrp/output/lib/portal-wsrp.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../wsrp/output/lib/portal-wsrp-admin.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
</target>
<target name="undeploy-all"
@@ -317,6 +319,7 @@
<!--<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-search.sar"/>-->
<delete file="${jboss.home}/server/${portal.deploy.dir}/widget.war"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp-admin.sar"/>
</target>
<target name="exploded-deploy"
16 years, 11 months