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被推薦