* @param servletContext the servlet context.
*/
private void initContainer(ServletContext servletContext) {
// Retrieve the driver configuration from servlet context.
DriverConfiguration driverConfig = (DriverConfiguration)
servletContext.getAttribute(DRIVER_CONFIG_KEY);
try {
// Create portal context.
if (LOG.isDebugEnabled()) {
LOG.debug("Creating portal context ["
+ driverConfig.getPortalName() + "/"
+ driverConfig.getPortalVersion() + "]...");
}
PortalContextImpl portalContext =
new PortalContextImpl(driverConfig);
// Create container services.
if (LOG.isDebugEnabled()) {
LOG.debug("Creating container services...");
}
ContainerServicesImpl containerServices =
new ContainerServicesImpl(portalContext, driverConfig);
// Create portlet container.
if (LOG.isDebugEnabled()) {
LOG.debug("Creating portlet container...");
}
PortletContainerFactory factory =
PortletContainerFactory.getInstance();
PortletContainer container = factory.createContainer(
driverConfig.getContainerName(),
containerServices,
containerServices);
// Initialize portlet container.
if (LOG.isDebugEnabled()) {