portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine JetspeedEngine.java
Date Wed, 17 Mar 2004 01:50:13 GMT
taylor      2004/03/16 17:50:13

  Modified:    portal/src/java/org/apache/jetspeed/container
                        JetspeedPortletContainerWrapper.java
               portal/src/java/org/apache/jetspeed/aggregator/impl
                        PortletRendererImpl.java BasicAggregator.java
               portal/src/java/org/apache/jetspeed/aggregator
                        Aggregator.java
               portal/src/java/org/apache/jetspeed/pipeline/valve/impl
                        ActionValveImpl.java
               portal/src/java/org/apache/jetspeed/engine
                        JetspeedEngine.java
  Added:       portal/src/java/org/apache/jetspeed/container
                        PortletContainerWrapper.java
               portal/src/test/org/apache/jetspeed/container
                        TestPortletContainer.java
  Removed:     portal/src/java/org/apache/jetspeed/container
                        PortletContainerFactory.java
  Log:
  Start of refactoring of core engine:
  - PortletContainerWrapper is now a component
  - Removed PortletContainerFactory
  - added tests for PortletContainer
  
  - added licenses to all Groovy scripts
  
  PR:
  Obtained from:
  Submitted by:	
  Reviewed by:	
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.8       +33 -16    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java
  
  Index: JetspeedPortletContainerWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/JetspeedPortletContainerWrapper.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JetspeedPortletContainerWrapper.java	8 Mar 2004 00:24:59 -0000	1.7
  +++ JetspeedPortletContainerWrapper.java	17 Mar 2004 01:50:12 -0000	1.8
  @@ -23,13 +23,14 @@
   import javax.servlet.http.HttpServletResponse;
   import javax.portlet.PortletException;
   
  -import org.apache.pluto.PortletContainer;
   import org.apache.pluto.om.window.PortletWindow;
   import org.apache.pluto.services.PortletContainerEnvironment;
  +import org.apache.pluto.PortletContainer;
   import org.apache.pluto.PortletContainerException;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.jetspeed.engine.servlet.ServletObjectAccess;
  +import org.picocontainer.Startable;
   
   /**
    * Portlet Container Wrapper to secure access to portlet container.
  @@ -37,11 +38,30 @@
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @version $Id$
    */
  -public class JetspeedPortletContainerWrapper implements PortletContainer
  +public class JetspeedPortletContainerWrapper implements PortletContainerWrapper, Startable
   {
  -    private boolean initialiized = false;
  -    private static final Log log = LogFactory.getLog(JetspeedPortletContainerWrapper.class);
 
  +    private boolean initialized = false;
  +    private static final Log log = LogFactory.getLog(JetspeedPortletContainerWrapper.class);
  +    private PortletContainer pluto;
  +
  +    public JetspeedPortletContainerWrapper(PortletContainer pluto)
  +    {
  +        this.pluto = pluto;
  +        System.out.println("PLUTO = " + pluto);
  +    }
   
  +    public void start()
  +    {
  +        
  +    }
  +    
  +    public void stop()
  +    {
  +        
  +    }
  +    /**
  +     * initialization is still handled outside component architecture, since Pluto is not
a component
  +     */
       public synchronized void init(
           String uniqueContainerId,
           ServletConfig servletConfig,
  @@ -50,17 +70,14 @@
           throws PortletContainerException
       {
   
  -        PortletContainerFactory.getPortletContainerOriginal().init(uniqueContainerId, servletConfig,
environment, props);
  -        initialiized = true;
  +        pluto.init(uniqueContainerId, servletConfig, environment, props);
  +        initialized = true;
       }
   
       public synchronized void shutdown() throws PortletContainerException
       {
  -        //        PortletContainerFactory.
  -        //            getPortletContainerOriginal().
  -        //                destroy();
  -        initialiized = false;
  -        PortletContainerFactory.getPortletContainerOriginal().shutdown();
  +        initialized = false;
  +        pluto.shutdown();
       }
   
       public void renderPortlet(PortletWindow portletWindow, HttpServletRequest servletRequest,
HttpServletResponse servletResponse)
  @@ -78,7 +95,7 @@
       		log.warn("Could not render PortletWindow"+ portletWindow.getId() + " as it has no
PortletDefintion defined.");
       		return;
       	}
  -        PortletContainerFactory.getPortletContainerOriginal().renderPortlet(portletWindow,
servletRequest, servletResponse);
  +        pluto.renderPortlet(portletWindow, servletRequest, servletResponse);
           // TODO: figure out how to access pluto-services before container kicks in
           //                              ServletObjectAccess.getServletRequest(servletRequest),
           //                              ServletObjectAccess.getServletResponse(servletResponse));
  @@ -90,7 +107,7 @@
           HttpServletResponse servletResponse)
           throws PortletException, IOException, PortletContainerException
       {
  -        PortletContainerFactory.getPortletContainerOriginal().processPortletAction(portletWindow,
servletRequest, servletResponse);
  +        pluto.processPortletAction(portletWindow, servletRequest, servletResponse);
           //                                     ServletObjectAccess.getServletRequest(servletRequest),
           //                                     ServletObjectAccess.getServletResponse(servletResponse));
       }
  @@ -98,7 +115,7 @@
       public void portletLoad(PortletWindow portletWindow, HttpServletRequest servletRequest,
HttpServletResponse servletResponse)
           throws PortletException, PortletContainerException
       {
  -        PortletContainerFactory.getPortletContainerOriginal().portletLoad(
  +        pluto.portletLoad(
               portletWindow,
               ServletObjectAccess.getServletRequest(servletRequest, portletWindow),
               ServletObjectAccess.getServletResponse(servletResponse, portletWindow));
  @@ -114,7 +131,7 @@
        */
       public boolean isInitialized()
       {
  -        return initialiized;
  +        return initialized;
       }
   
   }
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/PortletContainerWrapper.java
  
  Index: PortletContainerWrapper.java
  ===================================================================
  /*
   * Copyright 2000-2001,2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  package org.apache.jetspeed.container;
  
  import org.apache.pluto.PortletContainer;
  
  /**
   * Portlet Container Wrapper inteface
   *
   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
   * @version $Id: PortletContainerWrapper.java,v 1.1 2004/03/17 01:50:12 taylor Exp $
   */
  public interface PortletContainerWrapper extends PortletContainer
  {
  }
  
  
  
  1.15      +3 -13     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java
  
  Index: PortletRendererImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/PortletRendererImpl.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PortletRendererImpl.java	15 Mar 2004 20:40:29 -0000	1.14
  +++ PortletRendererImpl.java	17 Mar 2004 01:50:12 -0000	1.15
  @@ -26,14 +26,12 @@
   import org.apache.jetspeed.aggregator.ContentDispatcherCtrl;
   import org.apache.jetspeed.aggregator.PortletRenderer;
   import org.apache.jetspeed.aggregator.UnknownPortletDefinitionException;
  -import org.apache.jetspeed.container.PortletContainerFactory;
   import org.apache.jetspeed.container.window.PortletWindowAccessor;
   import org.apache.jetspeed.cps.BaseCommonService;
   import org.apache.jetspeed.om.page.Fragment;
   import org.apache.jetspeed.request.RequestContext;
   import org.apache.jetspeed.util.JetspeedObjectID;
   import org.apache.pluto.PortletContainer;
  -import org.apache.pluto.PortletContainerException;
   import org.apache.pluto.om.common.ObjectID;
   import org.apache.pluto.om.entity.PortletEntity;
   import org.apache.pluto.om.window.PortletWindow;
  @@ -63,16 +61,8 @@
           this.monitor = new WorkerMonitor();
           this.monitor.init();
   
  -        try
  -        {
  -            this.container = PortletContainerFactory.getPortletContainer();
  -        }
  -        catch (PortletContainerException e)
  -        {            
  -            log.error("Failed to get PortletContainer: " + e.toString(), e);
  -            return;
  -        }
  -
  +        // TODO: deprecate this when converted to component
  +        this.container = (PortletContainer)Jetspeed.getComponentManager().getComponent(PortletContainer.class);
           setInit(true);
       }
   
  
  
  
  1.2       +38 -72    jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/BasicAggregator.java
  
  Index: BasicAggregator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/impl/BasicAggregator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BasicAggregator.java	16 Mar 2004 20:21:06 -0000	1.1
  +++ BasicAggregator.java	17 Mar 2004 01:50:12 -0000	1.2
  @@ -23,13 +23,9 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.apache.jetspeed.Jetspeed;
   import org.apache.jetspeed.aggregator.Aggregator;
   import org.apache.jetspeed.components.portletregistry.PortletRegistryComponent;
  -import org.apache.jetspeed.container.PortletContainerFactory;
   import org.apache.jetspeed.container.window.PortletWindowAccessor;
  -import org.apache.jetspeed.cps.BaseCommonService;
  -import org.apache.jetspeed.cps.CPSInitializationException;
   import org.apache.jetspeed.engine.core.PortalControlParameter;
   import org.apache.jetspeed.exception.JetspeedException;
   import org.apache.jetspeed.om.page.Fragment;
  @@ -38,9 +34,9 @@
   import org.apache.jetspeed.profiler.Profiler;
   import org.apache.jetspeed.request.RequestContext;
   import org.apache.pluto.PortletContainer;
  -import org.apache.pluto.PortletContainerException;
   import org.apache.pluto.om.portlet.PortletDefinition;
   import org.apache.pluto.om.window.PortletWindow;
  +import org.picocontainer.Startable;
   
   /**
    * Basic Aggregator, nothing complicated. 
  @@ -48,7 +44,7 @@
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @version $Id$
    */
  -public class BasicAggregator extends BaseCommonService implements Aggregator
  +public class BasicAggregator implements Aggregator, Startable
   {
       private final static Log log = LogFactory.getLog(BasicAggregator.class);
       private final static String DEFAULT_STRATEGY = "strategy.default";
  @@ -58,57 +54,42 @@
       private final static String CONFIG_STRATEGY_SEQUENTIAL = "sequential";
       private final static String CONFIG_STRATEGY_PARALLEL = "parallel";
       private int strategy = STRATEGY_SEQUENTIAL;
  -
  -    /**
  -     * This is the early initialization method called by the
  -     * Turbine <code>Service</code> framework
  -     * @param conf The <code>ServletConfig</code>
  -     * @exception throws a <code>InitializationException</code> if the service
  -     * fails to initialize
  -     */
  -    public void init() throws CPSInitializationException
  +    
  +    private Profiler profiler;
  +    private PortletRegistryComponent registry;
  +    private PortletWindowAccessor windowAccessor;
  +    private PortletContainer portletContainer;
  +
  +    public BasicAggregator(Profiler profiler, 
  +                           PortletRegistryComponent registry, 
  +                           PortletWindowAccessor windowAccessor,
  +                           PortletContainer portletContainer,
  +                           int strategy)
       {
  -        if (isInitialized())
  -        {
  -            return;
  -        }
  -
  -        try
  -        {
  -            initConfiguration();
  -        }
  -        catch (Exception e)
  -        {
  -            log.error("Aggregator: Failed to load Service: " + e);
  -            e.printStackTrace();
  -        }
  -
  -        // initialization done
  -        setInit(true);
  -
  +        this.profiler = profiler;
  +        this.registry = registry;
  +        this.windowAccessor = windowAccessor;
  +        this.strategy = strategy;
  +        this.portletContainer = portletContainer;
       }
  -
  -    private void initConfiguration() throws CPSInitializationException
  +    
  +    public BasicAggregator(Profiler profiler, 
  +            PortletRegistryComponent registry, 
  +            PortletWindowAccessor windowAccessor,
  +            PortletContainer portletContainer)            
       {
  -        String defaultStrategy = getConfiguration().getString(DEFAULT_STRATEGY, CONFIG_STRATEGY_SEQUENTIAL);
  -        if (defaultStrategy.equals(CONFIG_STRATEGY_SEQUENTIAL))
  -        {
  -            strategy = STRATEGY_SEQUENTIAL;
  -        }
  -        else if (defaultStrategy.equals(CONFIG_STRATEGY_PARALLEL))
  -        {
  -            strategy = STRATEGY_PARALLEL;
  -        }
  +        this(profiler, registry, windowAccessor, portletContainer, STRATEGY_SEQUENTIAL);
       }
  -
  -    /**
  -     * This is the shutdown method called by the
  -     * Turbine <code>Service</code> framework
  -     */
  -    public void shutdown()
  +    
  +    public void start()
       {
       }
  -
  +    
  +    public void stop()
  +    {
  +        
  +    }
  +    
       /**
        * Builds the portlet set defined in the context into a portlet tree.
        *
  @@ -122,25 +103,14 @@
               throw new JetspeedException("Failed to find ProfileLocator in BasicAggregator.build");
           }
   
  -        Profiler profiler = (Profiler)Jetspeed.getComponentManager().getComponent(Profiler.class);
       
           Page page = profiler.getPage(locator);
           if (null == page)
           {
               throw new JetspeedException("Failed to find PSML Pin BasicAggregator.build");
           }
   
  -        PortletContainer container;
  -        try
  -        {
  -            container = PortletContainerFactory.getPortletContainer();
  -        }
  -        catch (PortletContainerException e)
  -        {
  -            throw new JetspeedException("Failed to get PortletContainer: " + e);
  -        }
  -
           Fragment root = page.getRootFragment();
  -        render(container, root, request);
  +        render(portletContainer, root, request);
           
           for (Iterator fit = root.getFragments().iterator(); fit.hasNext();)
           {
  @@ -151,7 +121,7 @@
                   // skip layouts for now
                   // continue;
               }
  -            render(container, fragment, request);
  +            render(portletContainer, fragment, request);
           }
       }
   
  @@ -174,17 +144,13 @@
               // Load Portlet from registry
               // 
               System.out.println("*** Getting portlet from registry: " + fragment.getName());
  -			PortletRegistryComponent regsitry = (PortletRegistryComponent) Jetspeed.getComponentManager().getComponent(PortletRegistryComponent.class);
  -            PortletDefinition portletDefinition = regsitry.getPortletDefinitionByUniqueName(fragment.getName());
  +            PortletDefinition portletDefinition = registry.getPortletDefinitionByUniqueName(fragment.getName());
               if (portletDefinition == null)
               {
                   throw new JetspeedException("Failed to load: " + fragment.getName() + "
from registry");
               }
  -            
  -            // TODO: make renderer a component, assemble window accessor in constructor
  -            PortletWindowAccessor windowAccess = (PortletWindowAccessor)Jetspeed.getComponentManager().getComponent(PortletWindowAccessor.class);
  -            
  -            PortletWindow portletWindow = windowAccess.getPortletWindow(fragment);
  +                        
  +            PortletWindow portletWindow = windowAccessor.getPortletWindow(fragment);
   
               HttpServletRequest servletRequest = request.getRequestForWindow(portletWindow);
               HttpServletResponse servletResponse = request.getResponseForWindow(portletWindow);
  
  
  
  1.1                  jakarta-jetspeed-2/portal/src/test/org/apache/jetspeed/container/TestPortletContainer.java
  
  Index: TestPortletContainer.java
  ===================================================================
  /*
   * Copyright 2000-2001,2004 The Apache Software Foundation.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   * 
   *      http://www.apache.org/licenses/LICENSE-2.0
   * 
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  package org.apache.jetspeed.container;
  
  import junit.framework.Test;
  
  import org.apache.jetspeed.components.AbstractComponentAwareTestCase;
  import org.apache.jetspeed.components.ComponentAwareTestSuite;
  import org.apache.pluto.PortletContainer;
  import org.picocontainer.MutablePicoContainer;
  
  /**
   * @author david
   *
   * To change the template for this generated type comment go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  public class TestPortletContainer extends AbstractComponentAwareTestCase 
  {
      private MutablePicoContainer container;
      private PortletContainer portletContainer;
      
      /**
       * Defines the testcase name for JUnit.
       *
       * @param name the testcase's name.
       */
      public TestPortletContainer(String name)
      {
          super(name);
      }
  
      /**
       * Start the tests.
       *
       * @param args the arguments. Not used
       */
      public static void main(String args[])
      {
          junit.awtui.TestRunner.main(new String[] { TestPortletContainer.class.getName()});
      }
  
      protected void setUp() throws Exception
      {
          super.setUp();
          container = (MutablePicoContainer) getContainer();
          portletContainer = (PortletContainer) container.getComponentInstance(PortletContainer.class);
       
      }
  
      /**
       * Creates the test suite.
       *
       * @return a test suite (<code>TestSuite</code>) that includes all methods
       *         starting with "test"
       */
      public static Test suite()
      {
          ComponentAwareTestSuite suite = new ComponentAwareTestSuite(TestPortletContainer.class);
          suite.setScript("org/apache/jetspeed/containers/portlet-container.groovy");
          return suite;
      }
  
      public void testBasic()
      {
          assertNotNull("portlet container is null", portletContainer);
      }
  }
  
  
  
  1.6       +2 -3      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Aggregator.java
  
  Index: Aggregator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/aggregator/Aggregator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Aggregator.java	8 Mar 2004 00:22:31 -0000	1.5
  +++ Aggregator.java	17 Mar 2004 01:50:13 -0000	1.6
  @@ -15,7 +15,6 @@
    */
   package org.apache.jetspeed.aggregator;
   
  -import org.apache.jetspeed.cps.CommonService;
   import org.apache.jetspeed.exception.JetspeedException;
   import org.apache.jetspeed.request.RequestContext;
   
  @@ -25,7 +24,7 @@
    * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
    * @version $Id$
    */
  -public interface Aggregator extends CommonService
  +public interface Aggregator 
   {
       public String SERVICE_NAME = "Aggregator";
       public String PORTLET_SERVICE_NAME = "PortletAggregator";
  
  
  
  1.5       +4 -3      jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
  
  Index: ActionValveImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ActionValveImpl.java	8 Mar 2004 00:30:04 -0000	1.4
  +++ ActionValveImpl.java	17 Mar 2004 01:50:13 -0000	1.5
  @@ -21,7 +21,7 @@
   
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
  -import org.apache.jetspeed.container.PortletContainerFactory;
  +import org.apache.jetspeed.Jetspeed;
   import org.apache.jetspeed.pipeline.PipelineException;
   import org.apache.jetspeed.pipeline.valve.AbstractValve;
   import org.apache.jetspeed.pipeline.valve.ActionValve;
  @@ -58,7 +58,8 @@
           PortletContainer container;
           try
           {
  -            container = PortletContainerFactory.getPortletContainer();
  +            // TODO: deprecate this when valves are components
  +            container = (PortletContainer)Jetspeed.getComponentManager().getComponent(PortletContainer.class);
               PortletWindow actionWindow = request.getActionWindow();
               if (actionWindow != null)
               {
  
  
  
  1.20      +9 -15     jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java
  
  Index: JetspeedEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/engine/JetspeedEngine.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- JetspeedEngine.java	11 Mar 2004 21:45:54 -0000	1.19
  +++ JetspeedEngine.java	17 Mar 2004 01:50:13 -0000	1.20
  @@ -31,7 +31,6 @@
   import org.apache.jetspeed.components.ComponentManager;
   import org.apache.jetspeed.components.datasource.DatasourceComponent;
   import org.apache.jetspeed.components.jndi.JNDIComponent;
  -import org.apache.jetspeed.container.PortletContainerFactory;
   import org.apache.jetspeed.container.services.JetspeedContainerServices;
   import org.apache.jetspeed.container.services.log.ContainerLogAdaptor;
   import org.apache.jetspeed.cps.CPSInitializationException;
  @@ -119,14 +118,6 @@
               initServices();
               log.info("Service initialization complete");            
   
  -            // 
  -            // create the container
  -            //
  -            log.info("Creating portlet container...");
  -            console.info("Creating portlet container...");
  -            PortletContainer container = PortletContainerFactory.getPortletContainer();
  -            log.info("Portlet container created sucessfully usin container class: " + container.getClass().getName());
  -
               //
               // create the pipelines
               //
  @@ -169,7 +160,7 @@
       {
           try
           {
  -            PortletContainer container = PortletContainerFactory.getPortletContainer();
  +            PortletContainer container = (PortletContainer)componentManager.getComponent(PortletContainer.class);
               JetspeedContainerServices environment = new JetspeedContainerServices();
               environment.addService(ContainerLogAdaptor.getService());
               environment.addService(FactoryManager.getService());
  @@ -198,13 +189,16 @@
       public void shutdown() throws JetspeedException
       {
           CommonPortletServices.getInstance().shutdownServices();
  -        componentManager.killContainer();
  -        // TODO: DST: can I hook into Component Manager shutdown here?
   
           try
           {
  -            PortletContainer container = PortletContainerFactory.getPortletContainer();
  -            container.shutdown();            
  +            PortletContainer container = (PortletContainer)componentManager.getComponent(PortletContainer.class);
  +            if (container != null)
  +            {
  +                container.shutdown();
  +            }
  +            
  +            componentManager.killContainer();            
           }
           catch (PortletContainerException e)
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message