} else {
portletLogger.info("Using inject implementation " + injectorProvider.getValue());
}
//
Injector injector = injectorProvider.get();
if (injector instanceof SpringInjector) {
SpringInjector springInjector = (SpringInjector)injector;
Object parent = context.getAttribute("org.springframework.web.context.WebApplicationContext.ROOT");
if (parent != null) {
springInjector.setParent(parent);
}
}
//
ResourceResolver resolver = new ResourceResolver() {
public URL resolve(String uri) {
try {
return context.getResource(uri);
}
catch (MalformedURLException e) {
return null;
}
}
};
//
ModuleContextImpl module = (ModuleContextImpl)context.getAttribute("juzu.module");
if (module == null) {
context.setAttribute("juzu.module", module = new ModuleContextImpl(portletLogger, bridgeContext, resolver));
}
//
Bridge bridge;
if (injector.isProvided()) {
bridge = new ProvidedBridge(bridgeContext, bridgeConfig, server, resolver, injector);
} else {
bridge = new ApplicationBridge(module, bridgeContext, bridgeConfig, server, resolver, injector);
}