如何将作为服务运行的JBoss AS 6绑定到0.0.0.0?

时间:2011-08-24 07:26:48

标签: java windows service jboss jboss6.x

在JBoss AS 6启动脚本中,我可以在JBoss AS 5中设置-b 0.0.0.0参数吗?新版本从临时文件.r.lock

读取输入
:cmdStart
REM Executed on service start
del .r.lock 2>&1 | findstr /C:"being used" > nul
if not errorlevel 1 (
  echo Could not continue. Locking file already in use.
  goto cmdEnd
)
echo Y > .r.lock
jbosssvc.exe -p 1 "Starting %SVCDISP%" > run.log
call run.bat < .r.lock >> run.log 2>&1
jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> run.log
del .r.lock
goto cmdEnd

1 个答案:

答案 0 :(得分:1)

我想你应该修改这些行:

call run.bat < .r.lock >> run.log 2>&1

这样的事情:

call run.bat -b 0.0.0.0 < .r.lock >> run.log 2>&1

您可以在JBoss Docs中阅读更多内容(适用于JBoss EAP 5.1,但我认为它应该类似):Run the Application Server as a Service