String script = context.getInitParameter(CONTAINER_COMPOSER_CONFIGURATION);
PicoContainer picoConfiguration = null;
if ( script != null ){
Reader scriptReader = new InputStreamReader(context.getResourceAsStream(script));
String builderClassName = getBuilderClassName(script);
ScriptedContainerBuilderFactory scriptedContainerBuilderFactory = new ScriptedContainerBuilderFactory(scriptReader, builderClassName, Thread.currentThread().getContextClassLoader());
picoConfiguration = buildContainer(scriptedContainerBuilderFactory.getContainerBuilder());
}
ComponentAdapter componentAdapter = null;
if ( picoConfiguration != null ){
Parameter[] parameters = new Parameter[]{ new ConstantParameter(picoConfiguration) };
componentAdapter = nanoContainer.registerComponentImplementation(containerComposerClassName, containerComposerClassName, parameters);