Running JBoss as Windows Service

If you want to start JBoss Application Server as Windows Service (which basically frees you from every time starting/stopping the server manually, and if you have started JBoss using run.bat in JBoss's bin directory, then after log-off of current user, server goes down too.)


We too had the same in our project, so we started looking over net is it possible and how to do it, these are the links which helped us the best -


The official JBoss Community Link -
http://www.jboss.org/jbossweb/install/service.html


But one problem with above link was I could not find service executable jbosssvc.exe and other important batch script files, which are necessary to perform as given steps there.
Here is one more link where you can get required files directly downloaded as zip file. (but not recommended)
http://longsystemit.com/javablog/?p=12


Above links are sufficient to go forward and do as said in above links, but I will put the screen-shots, in order to make your journey way-easy.


The official way of downloading the required files is from---> 
Download JBoss Native Connectors zip package from - 
http://www.jboss.org/jbossweb/downloads/jboss-native-2-0-6




Or as per your OS, downloaded file would change.


Open downloaded zip file (jboss-native-2.0.6-windows-x86-ssl.zip) and navigate to bin directory and extract following files to Jboss's bin directory i.e. 


META-INF, 
service.bat,
README-service.txt, 
jbosswebw.exe, 
jbossweb.exe, 
jbosssvc.exe.




So your JBoss bin directory would look like this...




Then open service.bat using notepad, and edit following highlighted entries, 
(Here I have opened it using Notepad++, never mind...)




Then through command prompt navigate/cd'ing to JBoss bin directory and execute command



>service.bat install


It would say JBoss Service is installed successfully,





Now go to services.msc and check out if JBoss service is created with whatever name you have given.
If service is not installed, there can be many reasons, like either JBoss native is broke, Some jbosssvc.exe dependency is not satisfied or probably jbosssvc.exe is not able to access run.bat, stop.bat files, etc.
But troubleshooting can be really painful, because I have done that, so I know.



If you want to uninstall this service, execute this command - 
>service.bat uninstall




So Open-Source rocks... enjoy...

Comments

Popular posts from this blog

How to install / Configure Mantis For Apache-PHP-PostgreSQL combination

Modified ExtJS LOVCombo (List of Values) ux plugin - with select all, deselect all, text filter, bubble up and bubble down of selection

TriggerField with two triggers, TwinTriggerField with tooltips