try {
// register the server with the repository
Repository repository = RepositoryHelper.narrow(
orb.resolve_initial_references( ORBConstants.SERVER_REPOSITORY_NAME ));
ServerDef server = new ServerDef(applicationName, name, classpath, args, vmargs);
serverId = repository.registerServer(server);
// activate the server
Activator activator = ActivatorHelper.narrow(
orb.resolve_initial_references( ORBConstants.SERVER_ACTIVATOR_NAME ));