public static void main(String[] args) {
		if (args.length != 1) {
			System.out.println("Usage: CacheServer <config-file-path>");
			System.exit(1);
		}

		/*
		 * Ensure absolute path is handled
		 */
		String path = args[0];
		if (!path.startsWith("file:")) {
			path = "file:" + path;
		}

		if (!portAvailable(port)) {
			System.out.println("Cache Server port " + port + " is not available. Is another instance running?");
			System.exit(1);
		}
		logger.info("Starting Cache Server");
		@SuppressWarnings("resource")
		FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(path);
		context.registerShutdownHook();
		Cache cache = context.getBean(Cache.class);
		ManagementService ms = ManagementService.getExistingManagementService(cache);
		CacheServerMXBean cacheServerManager = ms.getLocalCacheServerMXBean(port);
		if (!cacheServerManager.isRunning()) {
			System.out.println("failed to start cache server ");
			System.exit(1);
		}
		System.out.println("cache server running");
	}
A simple driver class to run a Gemfire cache server.

@author David Turanski
spring-xd-gemfire-server/src/main/java/org/springframework/xd/gemfire/server/CacheServer.java