Author: julien(a)jboss.com
Date: 2008-02-18 18:41:34 -0500 (Mon, 18 Feb 2008)
New Revision: 10019
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletContainerContext.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletApplication.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletContainer.java
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ValveInterceptor.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplication.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationContext.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletContainer.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-beans.xml
Log:
preliminary work on the "Rewrite Portlet Container component lifecycle SPI"
task, did some cleanup for now
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ValveInterceptor.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ValveInterceptor.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/aspects/portlet/ValveInterceptor.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -47,6 +47,7 @@
{
protected Object invoke(PortletInvocation invocation) throws Exception,
InvocationException
{
+/*
PortletContainer container =
(PortletContainer)invocation.getAttribute(PortletInvocation.INVOCATION_SCOPE,
PortletContainerInvoker.PORTLET_CONTAINER);
Valve valve = container.getValve();
@@ -83,5 +84,8 @@
{
return new UnavailableResponse();
}
+*/
+
+ return invocation.invokeNext();
}
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplication.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplication.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplication.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -22,10 +22,10 @@
******************************************************************************/
package org.jboss.portal.portlet.container;
-import java.util.Set;
+import java.util.Collection;
/**
- * A portlet application.
+ * A portlet application exposed for management.
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 6733 $
@@ -40,31 +40,49 @@
String getId();
/**
- * Return the set of components part of this web application.
+ * Set the context required by that application.
*
- * @return the set of portlet containers
+ * @param context the context
*/
- Set<PortletContainer> getPortletContainers();
+ void setContext(PortletApplicationContext context);
/**
- * Return a specific portlet container.
+ * Returns the context related to this application.
*
- * @return a portlet container
+ * @return the context
*/
- PortletContainer getPortletContainer(String id);
+ PortletApplicationContext getContext();
/**
- * Return the porlet application context.
+ * Wire a container.
*
- * @return the context
+ * @param container the container
*/
- PortletApplicationContext getContext();
-
void addContainer(PortletContainer container);
+ /**
+ * Unwire a container.
+ *
+ * @param container the container
+ */
void removeContainer(PortletContainer container);
/**
+ * Returns the set of related portlet containers.
+ *
+ * @return the portlet containers
+ */
+ Collection<PortletContainer> getPortletContainers();
+
+ /**
+ * Returns a specific container or null if it does not exist
+ *
+ * @param containerId the container id
+ * @return the portlet container
+ */
+ PortletContainer getPortletContainer(String containerId);
+
+ /**
* Starts the application only. It does not take care of starting its components.
*
* @throws Exception any exception preventing the start
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationContext.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletApplicationContext.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -25,7 +25,7 @@
import javax.servlet.ServletContext;
/**
- * The context provided to a portlet application. For now it manages the application
external resources
+ * The context provided to a portlet application by its envronment. For now it manages
the application external resources
* such as the servlet context and the application classloader. It manages also the life
cycle of the
* application and its components.
*
@@ -57,25 +57,13 @@
/**
* Start the portlet application and its components.
+ *
+ * @throws Exception any exception
*/
- void startPortletApplication() throws Exception;
+ void invokeStart() throws Exception;
/**
* Stop the portlet application and its components.
*/
- void stopPortletApplication();
-
- /**
- * Start a portlet container.
- *
- * @param portletName the container name
- */
- void startPortletContainer(String portletName) throws Exception;
-
- /**
- * Stop a portlet container.
- *
- * @param portletName the container name
- */
- void stopPortletContainer(String portletName);
+ void invokeStop();
}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletContainer.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletContainer.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletContainer.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -51,21 +51,33 @@
PortletInfo getInfo();
/**
- * Return the portlet application of this container.
+ * Wire the application.
*
+ * @param application the related application
+ */
+ void setApplication(PortletApplication application);
+
+ /**
+ * Returns the wired application.
+ *
* @return the application
*/
PortletApplication getApplication();
- void setApplication(PortletApplication application);
-
/**
+ * Wire the portlet container context.
*
+ * @param context the context
*/
- Valve getValve();
+ void setContext(PortletContainerContext context);
/**
+ * Invoke the portlet container.
*
+ * @param invocation the portlet invocation
+ * @return the portlet invocation response
+ * @throws PortletInvokerException a portlet invoker exception
+ * @throws InvocationException an invocation exception
*/
PortletInvocationResponse dispatch(PortletInvocation invocation) throws
PortletInvokerException, InvocationException;
Added:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletContainerContext.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletContainerContext.java
(rev 0)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/container/PortletContainerContext.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -0,0 +1,44 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.container;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface PortletContainerContext
+{
+
+ /**
+ * Start the portlet container.
+ *
+ * @throws Exception any exception
+ */
+ void invokeStart() throws Exception;
+
+ /**
+ * Stop the portlet container.
+ */
+ void invokeStop();
+
+}
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/container/PortletApplicationContextImpl.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -95,7 +95,7 @@
// PortletApplicationContext implementation
*************************************************************************
- public void startPortletApplication() throws Exception
+ public void invokeStart() throws Exception
{
throw new FixMe("Not used anymore for now, check or reimplement in
2.6");
/*
@@ -141,7 +141,7 @@
*/
}
- public void stopPortletApplication()
+ public void invokeStop()
{
// if the portlet application wasn't properly started, we shouldn't be
trying to stop it
if (portletApp != null)
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletApplicationImpl.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -73,9 +73,6 @@
phaseToType.put(LifeCyclePhase.RESOURCE, ResourceFilter.class);
}
- /** Logger. */
- protected final Logger log;
-
/** . */
protected final ContainerPortletApplicationInfo info;
@@ -86,11 +83,14 @@
protected final JBossApplicationMetaData jbossMetaData;
/** . */
- protected final PortletApplicationContext context;
+ protected final PortletAPIFactory portletAPIFactory;
/** . */
- protected final PortletAPIFactory portletAPIFactory;
+ protected PortletApplicationContext context;
+ /** Logger. */
+ protected Logger log;
+
/** . */
protected LinkedHashMap<String, PortletContainer> portlets;
@@ -113,7 +113,6 @@
ContainerPortletApplicationInfo info,
PortletApplication10MetaData metaData,
JBossApplicationMetaData jbossMetaData,
- PortletApplicationContext context,
PortletAPIFactory portletAPIFactory)
{
this.info = info;
@@ -121,8 +120,12 @@
this.jbossMetaData = jbossMetaData;
this.portletAPIFactory = portletAPIFactory;
this.portlets = new LinkedHashMap<String, PortletContainer>();
+ this.log = Logger.getLogger(PortletApplication.class);
+ }
+
+ public void setContext(PortletApplicationContext context)
+ {
this.context = context;
- this.log = Logger.getLogger("org.jboss.portal.portlet.application." +
context.getContextPath().replace('.', '_'));
}
public String getId()
@@ -164,10 +167,11 @@
public void start() throws Exception
{
+// this.log = Logger.getLogger(PortletApplication.class.getName() + "." +
context.getContextPath().replace('.', '_'));
+
PortletContextImpl portletContext = new
PortletContextImpl(context.getServletContext());
//
- //
List<PortletURLGenerationListener> listeners = Collections.emptyList();
for (ContainerListenerInfo listenerInfo : info.getListeners())
{
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java
===================================================================
---
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletContainerImpl.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -30,6 +30,7 @@
import org.jboss.portal.portlet.container.PortletApplication;
import org.jboss.portal.portlet.container.PortletContainer;
import org.jboss.portal.portlet.container.PortletInitializationException;
+import org.jboss.portal.portlet.container.PortletContainerContext;
import org.jboss.portal.portlet.impl.jsr168.api.ActionRequestImpl;
import org.jboss.portal.portlet.impl.jsr168.api.ActionResponseImpl;
import org.jboss.portal.portlet.impl.jsr168.api.PortletConfigImpl;
@@ -135,6 +136,9 @@
/** . */
private List<ResourceFilter> resourceFilterList;
+ /** . */
+ private PortletContainerContext context;
+
/**
* The preference validator, this is not exposed as runtime meta data as it is only
used by the JSR 168 portlet
* container implementation.
@@ -155,6 +159,11 @@
this.started = false;
}
+ public void setContext(PortletContainerContext context)
+ {
+ this.context = context;
+ }
+
public ContainerPortletInfo getInfo()
{
if (started)
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletApplication.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletApplication.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletApplication.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -0,0 +1,120 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test;
+
+import org.jboss.portal.portlet.container.PortletApplicationContext;
+import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
+import org.jboss.portal.portlet.impl.jsr168.spi.PortletAPIFactory;
+import org.jboss.portal.portlet.impl.info.ContainerPortletApplicationInfo;
+import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
+import org.jboss.portal.portlet.metadata.JBossApplicationMetaData;
+import org.jboss.portal.web.WebApp;
+import org.jboss.portal.common.NotYetImplemented;
+
+import javax.servlet.ServletContext;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ManagedPortletApplication implements PortletApplicationContext
+{
+
+ /** . */
+ private final WebApp webApp;
+
+ /** . */
+ final PortletApplicationImpl portletApplication;
+
+ /** . */
+ private final Map<String, ManagedPortletContainer> managedPortletContainers;
+
+ public ManagedPortletApplication(
+ ContainerPortletApplicationInfo portletApplicationInfo,
+ PortletApplication10MetaData portletApplicationMetaData,
+ JBossApplicationMetaData jbossApplicationMetaData,
+ PortletAPIFactory portletAPIFactory,
+ WebApp webApp)
+ {
+ this.webApp = webApp;
+ this.portletApplication = new PortletApplicationImpl(
+ portletApplicationInfo,
+ portletApplicationMetaData,
+ jbossApplicationMetaData,
+ portletAPIFactory);
+ this.managedPortletContainers = new HashMap<String,
ManagedPortletContainer>();
+ }
+
+ public void addManagedPortletContainer(ManagedPortletContainer
managedPortletContainer)
+ {
+ managedPortletContainers.put(managedPortletContainer.portletContainer.getId(),
managedPortletContainer);
+ portletApplication.addContainer(managedPortletContainer.portletContainer);
+ }
+
+ public void removeManagedPortletContainer(ManagedPortletContainer
managedPortletContainer)
+ {
+ portletApplication.removeContainer(managedPortletContainer.portletContainer);
+ managedPortletContainers.remove(managedPortletContainer.portletContainer.getId());
+ }
+
+ public void start() throws Exception
+ {
+ portletApplication.setContext(this);
+ portletApplication.start();
+ }
+
+ public void stop()
+ {
+ portletApplication.stop();
+ portletApplication.setContext(null);
+ }
+
+ // PortletApplicationContext
****************************************************************************************
+
+ public ServletContext getServletContext()
+ {
+ return webApp.getServletContext();
+ }
+
+ public String getContextPath()
+ {
+ return webApp.getContextPath();
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return webApp.getClassLoader();
+ }
+
+ public void invokeStart() throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void invokeStop()
+ {
+ throw new NotYetImplemented();
+ }
+}
Added:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletContainer.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletContainer.java
(rev 0)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/ManagedPortletContainer.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -0,0 +1,91 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.test;
+
+import org.jboss.portal.portlet.container.PortletContainerContext;
+import org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl;
+import org.jboss.portal.portlet.impl.info.ContainerPortletInfo;
+import org.jboss.portal.common.NotYetImplemented;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class ManagedPortletContainer implements PortletContainerContext
+{
+
+ /** . */
+ final PortletContainerImpl portletContainer;
+
+ /** . */
+ private ManagedPortletApplication managedPortletApplication;
+
+ public ManagedPortletContainer(ContainerPortletInfo portletInfo)
+ {
+ portletContainer = new PortletContainerImpl(portletInfo);
+ }
+
+ public ManagedPortletApplication getManagedPortletApplication()
+ {
+ return managedPortletApplication;
+ }
+
+ public void setManagedPortletApplication(ManagedPortletApplication
managedPortletApplication)
+ {
+ if (managedPortletApplication != null)
+ {
+ portletContainer.setApplication(managedPortletApplication.portletApplication);
+ }
+ else
+ {
+ portletContainer.setApplication(null);
+ }
+
+ //
+ this.managedPortletApplication = managedPortletApplication;
+ }
+
+ public void start() throws Exception
+ {
+ portletContainer.setContext(this);
+ portletContainer.start();
+ }
+
+ public void stop()
+ {
+ portletContainer.stop();
+ portletContainer.setContext(null);
+ }
+
+ //
+
+ public void invokeStart() throws Exception
+ {
+ throw new NotYetImplemented();
+ }
+
+ public void invokeStop()
+ {
+ throw new NotYetImplemented();
+ }
+}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployer.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -100,8 +100,8 @@
private ClassLoader classLoader;
/** . */
- private final Map<PortletApplication, PortletApplicationRegistrationContext>
registrationContextMap =
- new HashMap<PortletApplication, PortletApplicationRegistrationContext>();
+ private final Map<ManagedPortletApplication,
PortletApplicationRegistrationContext> registrationContextMap =
+ new HashMap<ManagedPortletApplication,
PortletApplicationRegistrationContext>();
public PortletApplicationRegistry getRegistry()
{
@@ -165,7 +165,7 @@
Kernel kernel = controllerContext.getKernel();
PortletApplicationDeployment deployment = new
PortletApplicationDeployment(kernel, webApp, metaData);
deploymentMap.put(webApp.getContextPath(), deployment);
- deployment.start();
+ deployment.install();
}
finally
{
@@ -183,7 +183,7 @@
try
{
Thread.currentThread().setContextClassLoader(classLoader);
- deployment.stop();
+ deployment.uninstall();
}
finally
{
@@ -270,29 +270,36 @@
}
/** Called by MC to install application. */
- public void installPortletApplication(PortletApplication application)
+ public void addManagedPortletApplication(ManagedPortletApplication
managedPortletApplication)
{
- PortletApplicationRegistrationContext context =
registry.registerPortletApplication(application);
- registrationContextMap.put(application, context);
+ PortletApplication portletApplication =
managedPortletApplication.portletApplication;
+ PortletApplicationRegistrationContext context =
registry.registerPortletApplication(portletApplication);
+ registrationContextMap.put(managedPortletApplication, context);
+
}
/** Called by MC to install container. */
- public void installPortletContainer(PortletContainer container)
+ public void addManagedPortletContainer(ManagedPortletContainer
managedPortletContainer)
{
- PortletApplicationRegistrationContext context =
registrationContextMap.get(container.getApplication());
- context.registerPortlet(container);
+ ManagedPortletApplication managedPortletApplication =
managedPortletContainer.getManagedPortletApplication();
+ PortletApplicationRegistrationContext context =
registrationContextMap.get(managedPortletApplication);
+ PortletContainer portletContainer = managedPortletContainer.portletContainer;
+ context.registerPortlet(portletContainer);
}
/** Called by MC to uninstall application. */
- public void uninstallPortletApplication(PortletApplication application)
+ public void removeManagedPortletApplication(ManagedPortletApplication
managedPortletApplication)
{
- registry.unregisterPortletApplication(application);
+ PortletApplication portletApplication =
managedPortletApplication.portletApplication;
+ registry.unregisterPortletApplication(portletApplication);
}
/** Called by MC to uninstall container. */
- public void uninstallPortletContainer(PortletContainer container)
+ public void removeManagedPortletContainer(ManagedPortletContainer
managedPortletContainer)
{
- PortletApplicationRegistrationContext context =
registrationContextMap.get(container.getApplication());
- context.unregisterPortlet(container);
+ ManagedPortletApplication managedPortletApplication =
managedPortletContainer.getManagedPortletApplication();
+ PortletApplicationRegistrationContext context =
registrationContextMap.get(managedPortletApplication);
+ PortletContainer portletContainer = managedPortletContainer.portletContainer;
+ context.unregisterPortlet(portletContainer);
}
}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployment.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployment.java 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/PortletApplicationDeployment.java 2008-02-18
23:41:34 UTC (rev 10019)
@@ -26,34 +26,29 @@
import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
import org.jboss.beans.metadata.plugins.AbstractConstructorMetaData;
import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
-import org.jboss.beans.metadata.plugins.AbstractInstallMetaData;
import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
import org.jboss.beans.metadata.plugins.AbstractParameterMetaData;
import org.jboss.beans.metadata.plugins.AbstractPropertyMetaData;
+import org.jboss.beans.metadata.plugins.AbstractInstallMetaData;
import org.jboss.beans.metadata.plugins.ThisValueMetaData;
-import org.jboss.beans.metadata.spi.InstallMetaData;
import org.jboss.beans.metadata.spi.ParameterMetaData;
import org.jboss.beans.metadata.spi.PropertyMetaData;
+import org.jboss.beans.metadata.spi.InstallMetaData;
import org.jboss.dependency.spi.ControllerState;
import org.jboss.kernel.Kernel;
import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.portlet.container.PortletApplicationContext;
import org.jboss.portal.portlet.impl.info.ContainerInfoBuilder;
import org.jboss.portal.portlet.impl.info.ContainerInfoBuilderContext;
import org.jboss.portal.portlet.impl.info.ContainerPortletApplicationInfo;
import org.jboss.portal.portlet.impl.info.ContainerPortletInfo;
import org.jboss.portal.portlet.impl.jsr168.ContainerInfoBuilderContextImpl;
-import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
-import org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl;
import org.jboss.portal.portlet.impl.jsr168.spi.PortletAPIFactory;
import org.jboss.portal.portlet.impl.metadata.PortletApplication10MetaData;
import org.jboss.portal.portlet.metadata.JBossApplicationMetaData;
import org.jboss.portal.web.WebApp;
-import javax.servlet.ServletContext;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
@@ -63,7 +58,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class PortletApplicationDeployment implements PortletApplicationContext
+public class PortletApplicationDeployment
{
/** . */
@@ -81,14 +76,14 @@
/** . */
private final LinkedHashMap<String, KernelControllerContext> installed;
- /** . */
-// private KernelControllerContext portletApplicationControllerContext;
+// /** . */
+//// private KernelControllerContext portletApplicationControllerContext;
+//
+// /** . */
+//// private List<KernelControllerContext> portletContainerControllerContexts =
new ArrayList<KernelControllerContext>();
+//
+// /** . */
- /** . */
-// private List<KernelControllerContext> portletContainerControllerContexts = new
ArrayList<KernelControllerContext>();
-
- /** . */
-
public PortletApplicationDeployment(Kernel kernel, WebApp webApp,
PortletApplication10MetaData metaData)
{
this.kernel = kernel;
@@ -98,9 +93,48 @@
this.installed = new LinkedHashMap<String, KernelControllerContext>();
}
- void start()
+ public AbstractBeanMetaData createManagedPortletContainerMetaData(String
managedPortletContainerId, ContainerPortletInfo portletInfo)
{
+ AbstractBeanMetaData beanMD = new AbstractBeanMetaData(managedPortletContainerId,
ManagedPortletContainer.class.getName());
+ //
+ AbstractConstructorMetaData ctorMD = new AbstractConstructorMetaData();
+ ctorMD.setParameters(Tools.toList((ParameterMetaData)new
AbstractParameterMetaData(ContainerPortletInfo.class.getName(), portletInfo)));
+ beanMD.setConstructor(ctorMD);
+
+ //
+ beanMD.setStart(new AbstractLifecycleMetaData("start"));
+ beanMD.setStop(new AbstractLifecycleMetaData("stop"));
+
+ //
+ return beanMD;
+ }
+
+ public AbstractBeanMetaData
createManagedPortletApplicationMetaData(ContainerPortletApplicationInfo
portletApplicationInfo, String managedPortletApplicationId)
+ {
+ AbstractBeanMetaData beanMD = new AbstractBeanMetaData(managedPortletApplicationId,
ManagedPortletApplication.class.getName());
+
+ //
+ AbstractConstructorMetaData ctorMD = new AbstractConstructorMetaData();
+ ctorMD.setParameters(Tools.toList(
+ (ParameterMetaData)new
AbstractParameterMetaData(ContainerPortletApplicationInfo.class.getName(),
portletApplicationInfo),
+ new AbstractParameterMetaData(PortletApplication10MetaData.class.getName(),
metaData),
+ new AbstractParameterMetaData(JBossApplicationMetaData.class.getName(),
(Object)null),
+ new AbstractParameterMetaData(PortletAPIFactory.class.getName(), new
AbstractDependencyValueMetaData("PortletAPIFactory")),
+ new AbstractParameterMetaData(WebApp.class.getName(), webApp)));
+ beanMD.setConstructor(ctorMD);
+
+ //
+ beanMD.setStart(new AbstractLifecycleMetaData("start"));
+ beanMD.setStop(new AbstractLifecycleMetaData("stop"));
+
+ //
+ return beanMD;
+ }
+
+ void install()
+ {
+
log.debug("Starting installation");
//
@@ -110,6 +144,9 @@
String portletApplicationId = "PortletApplication[" +
webApp.getContextPath() + "]";
//
+ String managedPortletApplicationId = "ManagedPortletApplication[" +
webApp.getContextPath() + "]";
+
+ //
ContainerInfoBuilderContext builderContext = new
ContainerInfoBuilderContextImpl(metaData, webApp);
ContainerInfoBuilder builder = new ContainerInfoBuilder(metaData, builderContext);
builder.build();
@@ -121,71 +158,127 @@
for (ContainerPortletInfo containerInfo : builder.getPortlets())
{
//
- String portletContainerId = "PortletContainer[" +
webApp.getContextPath() + "," + containerInfo.getName() + "]";
+ String managedPortletContainerId = "ManagedPortletContainer[" +
webApp.getContextPath() + "," + containerInfo.getName() + "]";
//
- AbstractBeanMetaData portletBMD = new AbstractBeanMetaData(portletContainerId,
PortletContainerImpl.class.getName());
- AbstractConstructorMetaData ctormd = new AbstractConstructorMetaData();
- ctormd.setParameters(Tools.toList((ParameterMetaData)new
AbstractParameterMetaData(ContainerPortletInfo.class.getName(), containerInfo)));
- portletBMD.setConstructor(ctormd);
- portletBMD.setStart(new AbstractLifecycleMetaData("start"));
- portletBMD.setStop(new AbstractLifecycleMetaData("stop"));
- portletBMD.setProperties(Collections.singleton((PropertyMetaData)new
AbstractPropertyMetaData("application", new
AbstractDependencyValueMetaData(portletApplicationId))));
- AbstractInstallMetaData deployerinstallmd = new AbstractInstallMetaData();
- deployerinstallmd.setBean("PortletApplicationDeployer");
- deployerinstallmd.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
- deployerinstallmd.setMethodName("installPortletContainer");
- AbstractInstallMetaData applicationinstallmd = new AbstractInstallMetaData();
- applicationinstallmd.setBean(portletApplicationId);
-
applicationinstallmd.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
- applicationinstallmd.setMethodName("addContainer");
- portletBMD.setInstalls(Tools.toList((InstallMetaData)deployerinstallmd,
applicationinstallmd));
- AbstractInstallMetaData deployeruninstallmd = new AbstractInstallMetaData();
- deployeruninstallmd.setBean("PortletApplicationDeployer");
-
deployeruninstallmd.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
- deployeruninstallmd.setMethodName("uninstallPortletContainer");
- AbstractInstallMetaData applicationuninstallmd = new AbstractInstallMetaData();
- applicationuninstallmd.setBean(portletApplicationId);
-
applicationuninstallmd.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
- applicationuninstallmd.setMethodName("removeContainer");
- portletBMD.setUninstalls(Tools.toList((InstallMetaData)deployeruninstallmd,
applicationuninstallmd));
- toInstall.add(portletBMD);
+ AbstractBeanMetaData managedPortletContainerMD =
createManagedPortletContainerMetaData(managedPortletContainerId, containerInfo);
+
+/*
+ // Inject the managed portlet container and the portlet application in the
portlet container
+ AbstractDependencyValueMetaData portletContainerContextDependencyMD = new
AbstractDependencyValueMetaData(managedPortletContainerId);
+
portletContainerContextDependencyMD.setDependentState(ControllerState.INSTANTIATED);
+ AbstractDependencyValueMetaData portletApplicationDependencyMD = new
AbstractDependencyValueMetaData(portletApplicationId);
+ portletApplicationDependencyMD.setDependentState(ControllerState.INSTALLED);
+ portletContainerMD.setProperties(Tools.toSet(
+ (PropertyMetaData)new AbstractPropertyMetaData("context",
portletContainerContextDependencyMD),
+ new AbstractPropertyMetaData("application",
portletApplicationDependencyMD)));
+
+ // Inject the portlet container in the managed portlet container
+ AbstractDependencyValueMetaData portletContainerDependencyMD = new
AbstractDependencyValueMetaData(portletContainerId);
+ portletContainerDependencyMD.setDependentState(ControllerState.INSTALLED);
+ managedPortletContainerMD.setProperties(Tools.toSet((PropertyMetaData)new
AbstractPropertyMetaData("peer", portletContainerDependencyMD)));
+
+ // Install the portlet container on the managed portlet container and on the
portlet application
+ AbstractInstallMetaData installPortletContainerMD = new
AbstractInstallMetaData();
+ installPortletContainerMD.setBean(portletApplicationId);
+
installPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+ installPortletContainerMD.setMethodName("addContainer");
+
portletContainerMD.setInstalls(Tools.toList((InstallMetaData)installPortletContainerMD));
+
+ // Uninstall the portlet container from the managed portlet container and from
the portlet application
+ AbstractInstallMetaData uninstallPortletContainerMD = new
AbstractInstallMetaData();
+ uninstallPortletContainerMD.setBean(portletApplicationId);
+
uninstallPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+ uninstallPortletContainerMD.setMethodName("removeContainer");
+
portletContainerMD.setUninstalls(Tools.toList((InstallMetaData)uninstallPortletContainerMD));
+
+ // Install the managed portlet container on the portlet application deployer
+ AbstractInstallMetaData installManagedPortletContainerMD = new
AbstractInstallMetaData();
+
installManagedPortletContainerMD.setBean("PortletApplicationDeployer");
+
installManagedPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+
installManagedPortletContainerMD.setMethodName("installManagedPortletContainer");
+
managedPortletContainerMD.setInstalls(Collections.singletonList((InstallMetaData)installManagedPortletContainerMD));
+
+ // Uninstall the managed portlet container from the portlet application
deployer
+ AbstractInstallMetaData uninstallManagedPortletCotainerMD = new
AbstractInstallMetaData();
+
uninstallManagedPortletCotainerMD.setBean("PortletApplicationDeployer");
+
uninstallManagedPortletCotainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+
uninstallManagedPortletCotainerMD.setMethodName("uninstallManagedPortletContainer");
+
managedPortletContainerMD.setUninstalls(Collections.singletonList((InstallMetaData)uninstallManagedPortletCotainerMD));
+*/
+
+ // Inject the managed portlet application in the managed portlet container
+ AbstractDependencyValueMetaData managedPortletApplicationDependencyMD = new
AbstractDependencyValueMetaData(managedPortletApplicationId);
+ managedPortletContainerMD.setProperties(Tools.toSet((PropertyMetaData)new
AbstractPropertyMetaData("managedPortletApplication",
managedPortletApplicationDependencyMD)));
+
+ // Install the managed portlet container on the managed portlet application
+ AbstractInstallMetaData installManagedPortletContainerMD = new
AbstractInstallMetaData();
+ installManagedPortletContainerMD.setBean(managedPortletApplicationId);
+
installManagedPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+
installManagedPortletContainerMD.setMethodName("addManagedPortletContainer");
+
managedPortletContainerMD.setInstalls(Collections.singletonList((InstallMetaData)installManagedPortletContainerMD));
+
+ // Uninstall the managed portlet container from the managed portlet application
+ AbstractInstallMetaData uninstallManagedPortletContainerMD = new
AbstractInstallMetaData();
+ uninstallManagedPortletContainerMD.setBean(managedPortletApplicationId);
+
uninstallManagedPortletContainerMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+
uninstallManagedPortletContainerMD.setMethodName("removeManagedPortletContainer");
+
managedPortletContainerMD.setUninstalls(Collections.singletonList((InstallMetaData)uninstallManagedPortletContainerMD));
+
+ //
+ toInstall.add(managedPortletContainerMD);
}
//
- AbstractBeanMetaData applicationBMD = new
AbstractBeanMetaData(portletApplicationId, PortletApplicationImpl.class.getName());
- AbstractConstructorMetaData ctormd = new AbstractConstructorMetaData();
- ctormd.setParameters(Tools.toList(
- (ParameterMetaData)new
AbstractParameterMetaData(ContainerPortletApplicationInfo.class.getName(),
builder.getApplication()),
- new AbstractParameterMetaData(PortletApplication10MetaData.class.getName(),
metaData),
- new AbstractParameterMetaData(JBossApplicationMetaData.class.getName(),
(Object)null),
- new AbstractParameterMetaData(PortletApplicationContext.class.getName(), this),
- new AbstractParameterMetaData(PortletAPIFactory.class.getName(), new
AbstractDependencyValueMetaData("PortletAPIFactory"))));
- applicationBMD.setConstructor(ctormd);
- applicationBMD.setStart(new AbstractLifecycleMetaData("start"));
- applicationBMD.setStop(new AbstractLifecycleMetaData("stop"));
- AbstractInstallMetaData installmd = new AbstractInstallMetaData();
- installmd.setBean("PortletApplicationDeployer");
- installmd.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
- installmd.setMethodName("installPortletApplication");
- applicationBMD.setInstalls(Collections.singletonList((InstallMetaData)installmd));
- AbstractInstallMetaData uninstallmd = new AbstractInstallMetaData();
- uninstallmd.setBean("PortletApplicationDeployer");
- uninstallmd.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
- uninstallmd.setMethodName("uninstallPortletApplication");
-
applicationBMD.setUninstalls(Collections.singletonList((InstallMetaData)uninstallmd));
- toInstall.add(applicationBMD);
+ AbstractBeanMetaData managedPortletApplicationMD =
createManagedPortletApplicationMetaData(builder.getApplication(),
managedPortletApplicationId);
+/*
+ // Inject the managed portlet application in the portlet application
+ AbstractDependencyValueMetaData portletApplicationContextDependencyMD = new
AbstractDependencyValueMetaData(managedPortletApplicationId);
+
portletApplicationContextDependencyMD.setDependentState(ControllerState.INSTANTIATED);
+ portletApplicationMD.setProperties(Collections.singleton((PropertyMetaData)new
AbstractPropertyMetaData("context", portletApplicationContextDependencyMD)));
+
+ // Inject the portlet application managed portlet application
+ AbstractDependencyValueMetaData portletApplicationDependencyMD = new
AbstractDependencyValueMetaData(portletApplicationId);
+ portletApplicationDependencyMD.setDependentState(ControllerState.INSTALLED);
+ managedPortletApplicationMD.setProperties(Tools.toSet((PropertyMetaData)new
AbstractPropertyMetaData("peer", portletApplicationDependencyMD)));
+
+ // Install the managed portlet application on the portlet application deployer
+ AbstractInstallMetaData installManagedPortletApplicationMD = new
AbstractInstallMetaData();
+
installManagedPortletApplicationMD.setBean("PortletApplicationDeployer");
+
installManagedPortletApplicationMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+
installManagedPortletApplicationMD.setMethodName("installManagedPortletApplication");
+
managedPortletApplicationMD.setInstalls(Collections.singletonList((InstallMetaData)installManagedPortletApplicationMD));
+
+ // Uninstall the managed portlet application from the portlet application deployer
+ AbstractInstallMetaData uninstallManagedPortletApplicationMD = new
AbstractInstallMetaData();
+
uninstallManagedPortletApplicationMD.setBean("PortletApplicationDeployer");
+
uninstallManagedPortletApplicationMD.setParameters(Collections.singletonList((ParameterMetaData)new
AbstractParameterMetaData(new ThisValueMetaData())));
+
uninstallManagedPortletApplicationMD.setMethodName("uninstallManagedPortletApplication");
+
managedPortletApplicationMD.setUninstalls(Collections.singletonList((InstallMetaData)uninstallManagedPortletApplicationMD));
+*/
+
//
+ toInstall.add(managedPortletApplicationMD);
+// toInstall.add(portletApplicationMD);
+
+ // Install beans
for (AbstractBeanMetaData beanMetaData : toInstall)
{
String beanName = beanMetaData.getName();
try
{
+// beanMetaData.setMode(ControllerMode.MANUAL);
+
+ //
log.debug("Installing bean " + beanName);
KernelControllerContext kcc = controller.install(beanMetaData);
+
+ //
installed.put(beanName, kcc);
log.debug("Installed bean " + beanName);
+
+ //
logBeanFailure(kcc);
}
catch (Throwable throwable)
@@ -209,17 +302,8 @@
}
}
- private void logBeanFailure(KernelControllerContext context)
+ void uninstall()
{
- Throwable t = context.getError();
- if (t != null)
- {
- log.debug("Installation of bean " + context.getName() + "
produced an error", t);
- }
- }
-
- void stop()
- {
log.debug("Uninstalling");
//
@@ -252,53 +336,12 @@
// portletContainerControllerContexts = null;
}
- public ServletContext getServletContext()
+ private void logBeanFailure(KernelControllerContext context)
{
- return webApp.getServletContext();
+ Throwable t = context.getError();
+ if (t != null)
+ {
+ log.debug("Installation of bean " + context.getName() + "
produced an error", t);
+ }
}
-
- public ClassLoader getClassLoader()
- {
- return webApp.getClassLoader();
- }
-
- public void startPortletApplication() throws Exception
- {
- throw new NotYetImplemented();
-// try
-// {
-// kernel.getController().change(portletApplicationControllerContext,
ControllerState.INSTALLED);
-// }
-// catch (Throwable throwable)
-// {
-// }
- }
-
- public void stopPortletApplication()
- {
- throw new NotYetImplemented();
-// try
-// {
-// kernel.getController().change(portletApplicationControllerContext,
ControllerState.CREATE);
-// }
-// catch (Throwable throwable)
-// {
-// throwable.printStackTrace();
-// }
- }
-
- public void startPortletContainer(String portletName) throws Exception
- {
- throw new NotYetImplemented();
- }
-
- public void stopPortletContainer(String portletName)
- {
- throw new NotYetImplemented();
- }
-
- public String getContextPath()
- {
- return webApp.getContextPath();
- }
}
Modified:
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/test/src/test/resources/portlet-test-war/WEB-INF/jboss-beans.xml 2008-02-18
23:41:34 UTC (rev 10019)
@@ -42,6 +42,10 @@
<property name="registry"><inject
bean="PortletApplicationRegistry"/></property>
<property name="servletContainer"><inject
bean="ServletContainer"/></property>
<property name="driver"><inject
bean="TestDriverServer"/></property>
+ <incallback method="addManagedPortletApplication"/>
+ <uncallback method="removeManagedPortletApplication"/>
+ <incallback method="addManagedPortletContainer"/>
+ <uncallback method="removeManagedPortletContainer"/>
</bean>
<bean name="PortletAPIFactory"
class="org.jboss.portal.portlet.impl.jsr168.PortletAPIFactoryImpl"/>
Modified:
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-beans.xml
===================================================================
---
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-beans.xml 2008-02-18
13:08:46 UTC (rev 10018)
+++
modules/portlet/trunk/test/src/test/resources/simple-portal-war/WEB-INF/jboss-beans.xml 2008-02-18
23:41:34 UTC (rev 10019)
@@ -30,6 +30,10 @@
<bean name="PortletApplicationDeployer"
class="org.jboss.portal.portlet.test.PortletApplicationDeployer">
<property name="registry"><inject
bean="PortletApplicationRegistry"/></property>
<property name="servletContainer"><inject
bean="ServletContainer"/></property>
+ <incallback method="addManagedPortletApplication"/>
+ <uncallback method="removeManagedPortletApplication"/>
+ <incallback method="addManagedPortletContainer"/>
+ <uncallback method="removeManagedPortletContainer"/>
</bean>
<bean name="PortletAPIFactory"
class="org.jboss.portal.portlet.impl.jsr168.PortletAPIFactoryImpl"/>