0
我需要在两台W2K8 Windows服务器上运行定位器和服务。通常我使用nssm通过调用nssm的相应java -jar
调用来运行基于Java的应用程序。但是Geode使用gfsh。在Windows上运行Apache Geode作为服务的推荐方式
最佳做法是什么?人们可以使用API产卵的实例并运行必要的启动命令:
commandService = CommandService.createLocalCommandService(cache);
CommandStatement showDeadLocksCmdStmt = commandService.createCommandStatement
("start locator ...");
if (showDeadlocksResult.hasIncomingFiles()) {
showDeadlocksResult.saveIncomingFiles(System.getProperty("user.dir") +
"/commandresults");
}
或者一个可以模仿的gfsh.bat
的行为,并为每个功能(定位器和服务器)的一个NSSM服务,运行在同一批次确实,并通过必要的命令:
java -Dgfsh=true -Dlog4j.configurationFile=classpath:log4j2-cli.xml -classpath C:\dev\apache-geode-1.1.1\lib\gfsh-dependencies.jar org.apache.geode.management.internal.cli.Launcher start locator ...
从this问题来看这样做gfsh
y被推荐