MonitorFactory mf = getMonitorFactory();
XMLInputFactory xmlFactory = XMLInputFactory.newInstance("javax.xml.stream.XMLInputFactory", bootClassLoader);
Bootstrapper bootstrapper = new DefaultBootstrapper(mf, xmlFactory);
runtime = bootstrapper.createRuntime();
runtime.start();
systemComponent = runtime.getSystemComponent();
// register the runtime info provided by the host
// FIXME andyp@bea.com -- autowire appears to need an exact type match,
// hence the need to register this twice
systemComponent.registerJavaObject(RuntimeInfo.COMPONENT_NAME,
RuntimeInfo.class,
(WebappRuntimeInfo) getRuntimeInfo());
systemComponent.registerJavaObject(WebappRuntimeInfo.COMPONENT_NAME,
WebappRuntimeInfo.class,
(WebappRuntimeInfo) getRuntimeInfo());
// register the monitor factory provided by the host
systemComponent.registerJavaObject("MonitorFactory", MonitorFactory.class, mf);
systemComponent.start();
if (getSystemScdl() == null) {
throw new TuscanyInitException("Could not find system SCDL");
}
try {
// deploy the system scdl
Deployer deployer = bootstrapper.createDeployer();
tuscanySystem = deploySystemScdl(deployer,
systemComponent,
ComponentNames.TUSCANY_SYSTEM,
getSystemScdl(),
bootClassLoader);