Author: mstruk
Date: 2009-11-29 15:06:11 -0500 (Sun, 29 Nov 2009)
New Revision: 851
Modified:
portal/branches/mc-integration/component/web/pom.xml
portal/branches/mc-integration/component/web/src/main/java/org/exoplatform/web/GenericHttpListener.java
Log:
mc-int bootstrap in GenericHttpListener
Modified: portal/branches/mc-integration/component/web/pom.xml
===================================================================
--- portal/branches/mc-integration/component/web/pom.xml 2009-11-29 20:02:27 UTC (rev
850)
+++ portal/branches/mc-integration/component/web/pom.xml 2009-11-29 20:06:11 UTC (rev
851)
@@ -37,6 +37,12 @@
<dependencies>
<dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${org.exoplatform.kernel.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.exoplatform.core</groupId>
<artifactId>exo.core.component.organization.api</artifactId>
<version>${org.exoplatform.core.version}</version>
Modified:
portal/branches/mc-integration/component/web/src/main/java/org/exoplatform/web/GenericHttpListener.java
===================================================================
---
portal/branches/mc-integration/component/web/src/main/java/org/exoplatform/web/GenericHttpListener.java 2009-11-29
20:02:27 UTC (rev 850)
+++
portal/branches/mc-integration/component/web/src/main/java/org/exoplatform/web/GenericHttpListener.java 2009-11-29
20:06:11 UTC (rev 851)
@@ -24,6 +24,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.RootContainer;
import org.exoplatform.container.RootContainer.PortalContainerPostInitTask;
+import org.exoplatform.container.util.EnvSpecific;
import org.exoplatform.container.web.AbstractHttpSessionListener;
import org.exoplatform.services.listener.ListenerService;
import org.exoplatform.services.log.ExoLogger;
@@ -180,7 +181,17 @@
}
}
};
- RootContainer.getInstance().addInitTask(event.getServletContext(), task);
+ ServletContext ctx = event.getServletContext();
+ try
+ {
+ EnvSpecific.initThreadEnv(ctx);
+ RootContainer.getInstance().addInitTask(event.getServletContext(), task);
+ }
+ finally
+ {
+ EnvSpecific.cleanupThreadEnv(ctx);
+ }
+
}
/**