System.exit(ExitCodes.FAILED);
throw new IllegalStateException(); // not reached
}
final MarshallerFactory factory = Marshalling.getMarshallerFactory("river", DomainServerMain.class.getClassLoader());
final Unmarshaller unmarshaller;
final ByteInput byteInput;
final AsyncFuture<ServiceContainer> containerFuture;
try {
Module.registerURLStreamHandlerFactoryModule(Module.getBootModuleLoader().loadModule(ModuleIdentifier.create("org.jboss.vfs")));
final MarshallingConfiguration configuration = new MarshallingConfiguration();
configuration.setVersion(2);
configuration.setClassResolver(new SimpleClassResolver(DomainServerMain.class.getClassLoader()));
unmarshaller = factory.createUnmarshaller(configuration);
byteInput = Marshalling.createByteInput(initialInput);
unmarshaller.start(byteInput);
final ServerTask task = unmarshaller.readObject(ServerTask.class);
unmarshaller.finish();
containerFuture = task.run(Arrays.<ServiceActivator>asList(new ServiceActivator() {
@Override
public void activate(final ServiceActivatorContext serviceActivatorContext) {
// TODO activate host controller client service
}