return loginContext.doLogin();
}
public final void start() throws Exception {
log.debug("About to setup Chromattic life cycle " + domainName);
ChromatticBuilder builder = ChromatticBuilder.create();
//
ClassLoader cl = Thread.currentThread().getContextClassLoader();
for (String className : entityClassNames) {
String fqn = className.trim();
log.debug("Adding class " + fqn + " to life cycle " + domainName);
Class<?> entityClass = cl.loadClass(fqn);
builder.add(entityClass);
}
// Set up boot context
PortalSessionLifeCycle.bootContext.set(this);
//
try {
for (Map.Entry<String, String> optionEntry : optionMap.entrySet()) {
ChromatticBuilder.Option<?> option = RECOGNIZED_OPTIONS.get(optionEntry.getKey());
if (option != null) {
log.debug("Setting Chromattic option " + optionEntry);
setOption(builder, option, optionEntry.getValue());
}
}
// Set it now, so we are sure that it will be the correct life cycle
builder.setOptionValue(ChromatticBuilder.SESSION_LIFECYCLE_CLASSNAME, PortalSessionLifeCycle.class.getName());
//
log.debug("Building Chromattic " + domainName);
realChromattic = builder.build();
chromattic = new ChromatticImpl(this);
} catch (Exception e) {
log.error("Could not start Chromattic " + domainName, e);
} finally {
PortalSessionLifeCycle.bootContext.set(null);