// Create a component
Component component = new Component();
component.getServers().add(Protocol.HTTP, config.piperackPort);
// Create an application
PiperackApplication application = new PiperackApplication(config, runtime);
// Attach the application to the component and start it
component.getDefaultHost().attach(application);
component.start();
while (true) {
try {
Thread.sleep(10000);
} catch (InterruptedException e) {
// nop
}
// It doesn't seem like this should be necessary!
if (application.stopped()) {
System.exit(0);
}
application.expirePipelines();
}
}