3 Replies Latest reply on Dec 16, 2009 3:43 PM by Pramod Nair

    JBoss EAP 5.0 Multiple Instance as a Windows Services

    Pramod Nair Novice

      I am trying to install jboss-as  multiple instance as windows service. I am using jboss-native to install these multiple instances as multiple windows services. For first instance I used service.bat and installed as a service. It was successful. Then i copied service.bat into service2.bat. Made the following changes:

       

      :cmdStart
      REM Executed on service start
      del .r2.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 > .r2.lock
      jbosssvc.exe -p 1 "Starting %SVCDISP%" > run2.log
      call "%SVCPATH%\run.bat" -c ports-01 -Djboss.service.binding.set="ports-01" < .r2.lock >> run2.log 2>&1
      jbosssvc.exe -p 1 "Shutdown %SVCDISP% service" >> run2.log
      del .r2.lock

      goto cmdEnd

       

      I changed name of .log and .lock files.

      The service got installed. But when I try to start the service I got an error -->  "Some services stop automatically if they have no work to do, for example the Performance Log"

       

      When i try to run " service2.bat start" the jboss server starts OK. Any idea why I am not able to start the second windows service. Somewhere I read you can't rename "service.bat". Is that true?

       

      Help please...