2015-02-23 156 views
0

如何使用Apache將JBoss 7(特別是jboss-as-7.1.1.Final)配置爲Windows服務Commons Daemon(prunsrv.exe)?使用Apache Commons Daemon(prunsrv.exe)安裝jboss-as-7.1.1.Final作爲Windows服務

具體而言,我不知道prunsrv.exe或prunmgr.exe GUI的正確JBoss選項。

如果您有prunsrv.exe參數來將獨立服務器安裝爲Windows服務(例如創建JBoss 7 Windows服務的批處理文件),那將是完美的。或者,您的prunmgr GUI設置也會很好。

回答

0

有可用的運行ProcRun指令,以防您需要更多的細節。當我用prunsrv我使用了一個服務創建行類似如下:

prunsrv.exe install JBossEAP6 --DisplayName="JBoss EAP 6" --Description "JBoss Enterprise Application Platform 6" --LogLevel=INFO --LogPath="C:\Program Files\EAP-6.1.1\jboss-eap-6.1\standalone\log" --LogPrefix=service --StdOutput=auto --StdError=auto --StartMode=exe --StartImage=cmd.exe --StartPath="C:\Program Files\EAP-6.1.1\jboss-eap-6.1\bin" ++StartParams="/c \"set NOPAUSE=Y ^&^& run.bat\"" --StopMode=exe --StopImage=cmd.exe --StopPath="C:\Program Files\EAP-6.1.1\jboss-eap-6.1\bin" ++StopParams="/c jboss-cli.bat --controller=localhost:9999 --connect --command=:shutdown" 

這並不期待已安裝在Windows中的JBoss在:C:\ Program Files文件\ EAP-6.1.1 \ jboss的-EAP -6.1

你需要確保你的run.bat有正確的設置,我已經設置了具備以下條件:

for /D %%i in ("C:\Program Files\EAP-6.1.1\jboss-eap-6.1\standalone\tmp\vfs\*") 
do RD /S /Q "%%i" 
cd %JBOSS_HOME%\bin\ 
standalone.bat -c standalone-full.xml -b 0.0.0.0 -bmanagement <localIP> 

這讓我工作的Windows服務,之後本身也清理。