public static final String CONTAINER_COMPOSER_CONFIGURATION = CONTAINER_COMPOSER + ".configuration";
public void contextInitialized(ServletContextEvent event) {
ServletContext context = event.getServletContext();
try {
ContainerBuilder containerBuilder = createContainerBuilder(context);
ObjectReference builderRef = new ApplicationScopeObjectReference(context, BUILDER);
builderRef.set(containerBuilder);
ObjectReference containerRef = new ApplicationScopeObjectReference(context, APPLICATION_CONTAINER);
containerBuilder.buildContainer(containerRef, new SimpleReference(), context, false);
} catch (Exception e) {
// Not all servlet containers print the nested exception. Do it here.
event.getServletContext().log(e.getMessage(), e);
throw new PicoCompositionException(e);
}