taylor 2004/01/11 22:42:43
Modified: portal/src/java/org/apache/jetspeed/container/invoker
AbstractPortletInvokerFactory.java
JetspeedPortletInvoker.java
LocalPortletInvoker.java
LocalPortletInvokerFactory.java
ServletPortletInvoker.java
ServletPortletInvokerFactory.java
portal/src/java/org/apache/jetspeed/portlets/layout
GenericLayoutPortlet.java
portal/src/webapp/WEB-INF/conf jetspeed.properties
Added: portal/src/java/org/apache/jetspeed/portlets/decorator
DecoratorPortlet.java GenericDecoratorPortlet.java
Removed: portal/src/java/org/apache/jetspeed/exception
JetspeedException.java
JetspeedRuntimeException.java
RegistryException.java
Log:
changing package for registry
Revision Changes Path
1.5 +4 -2
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/AbstractPortletInvokerFactory.java
Index: AbstractPortletInvokerFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/AbstractPortletInvokerFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractPortletInvokerFactory.java 8 Jan 2004 23:25:13 -0000 1.4
+++ AbstractPortletInvokerFactory.java 12 Jan 2004 06:42:43 -0000 1.5
@@ -58,7 +58,9 @@
import org.apache.commons.pool.impl.StackObjectPool;
/**
- * AbstractPortletInvokerFactory
+ * AbstractPortletInvokerFactory handles the actual creation fo invokers.
+ * It manages the generic object pooling and objection creation and release patterns
+ * for all invoker implementations.
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @version $Id$
1.2 +3 -2
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvoker.java
Index: JetspeedPortletInvoker.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/JetspeedPortletInvoker.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JetspeedPortletInvoker.java 30 Dec 2003 06:37:39 -0000 1.1
+++ JetspeedPortletInvoker.java 12 Jan 2004 06:42:43 -0000 1.2
@@ -75,8 +75,9 @@
*
* @param portletDefinition The portlet's definition that is being invoked.
* @param servletConfig The servlet configuration of the portal.
+ * @param containerServlet
*/
- void activate(PortletDefinition portletDefinition, ServletConfig servletConfig);
+ void activate(PortletDefinition portletDefinition, ServletConfig
servletConfig); //, String entryPoint);
/**
* Passivates an invoker, freeing it back to the invoker pool.
1.4 +1 -6
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/LocalPortletInvoker.java
Index: LocalPortletInvoker.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/LocalPortletInvoker.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- LocalPortletInvoker.java 8 Jan 2004 23:25:13 -0000 1.3
+++ LocalPortletInvoker.java 12 Jan 2004 06:42:43 -0000 1.4
@@ -172,7 +172,6 @@
}
}
- static private final String PHONEY_PORTLET_WINDOW =
"<P>++++++++++++++++++++++++++++++++++</P>";
/**
* Invokes the specific request denoted by the <code>method</code> parameter on
a portlet.
@@ -252,13 +251,9 @@
RenderResponse renderResponse = (RenderResponse)portletResponse;
renderResponse.setContentType("text/html");
- renderResponse.getWriter().print(PHONEY_PORTLET_WINDOW);
renderResponse.getWriter().print(portletDefinition.getName());
- renderResponse.getWriter().print(PHONEY_PORTLET_WINDOW);
portlet.render(renderRequest, renderResponse);
-
- renderResponse.getWriter().print(PHONEY_PORTLET_WINDOW);
}
Thread.currentThread().setContextClassLoader(oldLoader);
1.2 +4 -7
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/LocalPortletInvokerFactory.java
Index: LocalPortletInvokerFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/LocalPortletInvokerFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- LocalPortletInvokerFactory.java 7 Jan 2004 22:01:05 -0000 1.1
+++ LocalPortletInvokerFactory.java 12 Jan 2004 06:42:43 -0000 1.2
@@ -62,10 +62,7 @@
* @version $Id$
*/
public class LocalPortletInvokerFactory extends AbstractPortletInvokerFactory
-{
- private String localInvokerClass;
- private int localInvokerPoolSize = 30;
-
+{
public final static String INVOKER_LOCAL = "factory.invoker.local";
public final static String INVOKER_LOCAL_POOL_SIZE =
"factory.invoker.local.pool.size";
@@ -78,8 +75,8 @@
public LocalPortletInvokerFactory(PortalContext pc)
{
super();
- localInvokerClass = pc.getConfigurationProperty(INVOKER_LOCAL);
- localInvokerPoolSize =
pc.getConfiguration().getInt(INVOKER_LOCAL_POOL_SIZE);
+ String localInvokerClass = pc.getConfigurationProperty(INVOKER_LOCAL);
+ int localInvokerPoolSize =
pc.getConfiguration().getInt(INVOKER_LOCAL_POOL_SIZE);
init(localInvokerClass, localInvokerPoolSize);
}
1.9 +7 -2
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java
Index: ServletPortletInvoker.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/ServletPortletInvoker.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ServletPortletInvoker.java 7 Jan 2004 22:01:05 -0000 1.8
+++ ServletPortletInvoker.java 12 Jan 2004 06:42:43 -0000 1.9
@@ -79,7 +79,12 @@
import org.apache.pluto.om.portlet.PortletDefinition;
/**
- * Portlet Invoker implementation, invokes the JetspeedContainerServlet
+ * ServletPortletInvoker invokes portlets in another web application, calling a
+ * portlet's render or action method via a cross context request dispatcher.
+ * In order for this class to work, a servlet must be special servlet must be
+ * infused into the web (portlet) application. This servlet knows how to delegate
+ * to portlets and package their response back into a servlet response.
+ * The context name of the servlet should be configurable. The default context name
is "/container"
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @version $Id$
1.2 +3 -1
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/ServletPortletInvokerFactory.java
Index: ServletPortletInvokerFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/invoker/ServletPortletInvokerFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServletPortletInvokerFactory.java 7 Jan 2004 22:01:06 -0000 1.1
+++ ServletPortletInvokerFactory.java 12 Jan 2004 06:42:43 -0000 1.2
@@ -65,12 +65,14 @@
{
public final static String INVOKER_SERVLET = "factory.invoker.servlet";
public final static String INVOKER_SERVLET_POOL_SIZE =
"factory.invoker.servlet.pool.size";
+ public final static String INVOKER_SERVLET_CONTEXT =
"factory.invoker.servlet.context";
public ServletPortletInvokerFactory(PortalContext pc)
{
super();
String servletInvokerClass = pc.getConfigurationProperty(INVOKER_SERVLET);
int servletInvokerPoolSize =
pc.getConfiguration().getInt(INVOKER_SERVLET_POOL_SIZE);
+ //String servletInvokerClass = pc.getConfigurationProperty(INVOKER_SERVLET);
init(servletInvokerClass, servletInvokerPoolSize);
}
1.1
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/portlets/decorator/DecoratorPortlet.java
Index: DecoratorPortlet.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Jetspeed" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Jetspeed", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.jetspeed.portlets.decorator;
import javax.portlet.Portlet;
/**
* DecoratorPortlet
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @version $Id: DecoratorPortlet.java,v 1.1 2004/01/12 06:42:43 taylor Exp $
*/
public interface DecoratorPortlet extends Portlet
{
}
1.1
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/portlets/decorator/GenericDecoratorPortlet.java
Index: GenericDecoratorPortlet.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Jetspeed" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Jetspeed", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
package org.apache.jetspeed.portlets.decorator;
import java.io.IOException;
import javax.portlet.GenericPortlet;
import javax.portlet.PortletContext;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
/**
* GenericDecoratorPortlet
*
* @author <a href="mailto:[EMAIL PROTECTED]">David Sean Taylor</a>
* @version $Id: GenericDecoratorPortlet.java,v 1.1 2004/01/12 06:42:43 taylor Exp $
*/
public class GenericDecoratorPortlet
extends GenericPortlet
implements DecoratorPortlet
{
public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException
{
PortletContext context = getPortletContext();
response.setContentType("text/html");
// PortletURL url = response.createRenderURL();
// url.addParameter("test", "value");
// OK, so this is square one as they say. We're going to need some portlet
tools next
response.getWriter().println("<br/><b>Decorator Portlet</b>");
// PortletRequestDispatcher rd =
context.getRequestDispatcher("/WEB-INF/hello.jsp");
// rd.include(request, response);
}
}
1.2 +1 -3
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/portlets/layout/GenericLayoutPortlet.java
Index: GenericLayoutPortlet.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/portlets/layout/GenericLayoutPortlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- GenericLayoutPortlet.java 6 Dec 2003 02:06:11 -0000 1.1
+++ GenericLayoutPortlet.java 12 Jan 2004 06:42:43 -0000 1.2
@@ -58,8 +58,6 @@
import javax.portlet.GenericPortlet;
import javax.portlet.PortletContext;
import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.PortletURL;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
1.21 +2 -1
jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/jetspeed.properties
Index: jetspeed.properties
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/webapp/WEB-INF/conf/jetspeed.properties,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- jetspeed.properties 8 Jan 2004 03:14:12 -0000 1.20
+++ jetspeed.properties 12 Jan 2004 06:42:43 -0000 1.21
@@ -73,6 +73,7 @@
factory.invoker.servlet.pool.size = 50
factory.invoker.local = org.apache.jetspeed.container.invoker.LocalPortletInvoker
factory.invoker.local.pool.size = 50
+factory.invoker.servlet.context = /container
## Pluto Factory
plutofactory.javax.portlet.ActionRequest =
org.apache.pluto.factory.impl.ActionRequestFactoryImpl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]