Author: mwringe
Date: 2009-08-27 23:30:29 -0400 (Thu, 27 Aug 2009)
New Revision: 108
Modified:
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainerFactory.java
components/wci/trunk/wci/src/main/resources/conf/configuration.xml
Log:
Update the factory to return a servletcontainer from the exo kernel.
Modified:
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainerFactory.java
===================================================================
---
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainerFactory.java 2009-08-27
22:44:34 UTC (rev 107)
+++
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainerFactory.java 2009-08-28
03:30:29 UTC (rev 108)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.gatein.wci.impl;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
import org.gatein.wci.ServletContainer;
import org.gatein.wci.ServletContainerFactory;
import org.gatein.wci.spi.ServletContainerContext;
@@ -51,7 +53,9 @@
*/
public ServletContainer getServletContainer()
{
- return container;
+ //return container;
+ ExoContainer exoContainer = ExoContainerContext.getCurrentContainer();
+ return (ServletContainer)exoContainer.getComponentInstance(ServletContainer.class);
}
/**
Modified: components/wci/trunk/wci/src/main/resources/conf/configuration.xml
===================================================================
--- components/wci/trunk/wci/src/main/resources/conf/configuration.xml 2009-08-27 22:44:34
UTC (rev 107)
+++ components/wci/trunk/wci/src/main/resources/conf/configuration.xml 2009-08-28 03:30:29
UTC (rev 108)
@@ -7,14 +7,6 @@
<component>
<key>org.gatein.wci.ServletContainer</key>
<type>org.gatein.wci.impl.generic.DefaultServletContainerWrapper</type>
-<!-- <component-plugins>
- <component-plugin>
- <name>PortletListener</name>
- <set-method>addWebAppListener</set-method>
- <type>org.jboss.portal.torii.temp.PortletDeployer</type>
- <description>ListenerForPortlet</description>
- </component-plugin>
- </component-plugins> -->
</component>
<component>
@@ -22,9 +14,4 @@
<type>org.gatein.wci.impl.generic.GenericServletContainerContext</type>
</component>
-<!-- <component>
- <key>org.gatein.wci.spi.ServletContainerContext</key>
- <type>org.gatein.wci.impl.tomcat.TC6ServletContainerContext</type>
- </componenet> -->
-
</configuration>
Show replies by date