I am working on enterprise software which require tomcat,JBOSS,Oracle and others.We are running them as service.I am having java service manager which takes care to start/stop,install/Uninstall of the following services i.e. JBOSS,tomcat,Java service manager is written in C++.we have a batch file which contains command to Install,Uninstall,Start and Stop.we are calling batch file and passing command to accomplice the task.java service manager is again a service which is started by other Manager service
It was working but recently we are getting issue randomly.For one of operation in our application we are stopping all the service and starting it again once operation is over.but JBOSS service is going in disable mode.Now we have to manually stop the java service which in turn started by manager service and than finally JBOSS is started by java service manager.
batch file is as follows.
:cmdJBOSSInstall
REM Install JBOSS service
CD %JBOSS_HOME%\bin
jbosssvc.exe -imwdc %JBOSS_SERVICE_NAME% "%JBOSS_HOME%\bin" "%SVCDISP%" "%SVCDESC%" service.bat
net start %JBOSS_SERVICE_NAME%
goto cmdEnd
:cmdJBOSSUnInstall
REM unintall JBOSS service
sc stop %JBOSS_SERVICE_NAME%
CD %JBOSS_HOME%\bin
jbosssvc.exe -u %JBOSS_SERVICE_NAME%
goto cmdEnd