Friday, August 10, 2012

Running JBOSS as service in Windows or Running JBOSS in background

Hi,

I am trying to run JBOSS as service in Windows 2008 machine, I will post the updates below.

I am following the below link for reference.

https://community.jboss.org/wiki/RunJBossAsAServiceOnWindows


  • Downloaded wrapper-windows-x86-32-3.5.15-st from http://wrapper.tanukisoftware.org/doc/english/jmx.html
  • Copied it to required server and unzipped it. 
  • Copied Wrapper DLL and JAR from unzipped folder/lib to JBOSS/Lib, and exe from bin folder of Wrapper to bin folder of JBOSS as specified in above link 
  • Created folder structure as follows %JBOSS_HOME%\server\YOURCONFIG\wrapper
  • Verify if %JBOSS_HOME% is set or not using echo %JBOSS_HOME% in command prompt 
  • If %JBOSS_HOME% is not set, Set JBOSS_HOME as C:\jboss-4.2.3.GA\jboss-4.2.3.GA in environment variables.
  • Verify echo %JBOSS_HOME% after setting environment variable and it should display jboss path. 
  • Create wrapper.conf file in wrapper.conf file inside %JBOSS_HOME%\server\YOURCONFIG\wrapper
  • Copy following lines and place it in wrapper.conf file and change java path in first line accordingly. 
wrapper.java.command=C:/Program Files/Java/jdk1.6.0_33/bin/java

wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

wrapper.java.classpath.1=%JBOSS_HOME%/lib/wrapper.jar
wrapper.java.classpath.2=%JAVA_HOME%/bin/java/lib/tools.jar
wrapper.java.classpath.3=./run.jar

wrapper.java.library.path.1=%JBOSS_HOME%/lib

# these are the JAVA_OPTS
wrapper.java.additional.1=-server
# enviroment variables - define the ones that match your desired environment
wrapper.java.additional.2=-Denviromnment.variable=value
# memory parameters - define the ones that match your desired environment
wrapper.java.additional.3=-Xms64m
wrapper.java.additional.4=-Xmx96m
# If you need serialization suppport 
wrapper.java.additional.5=-Dsession.serialization.jboss=true

wrapper.app.parameter.1=org.jboss.Main
# Parameters to be passed to the application (Jboss) 
# Define server name (configuration) - If you need a config that is different than the "default" or need to run multiple configs
wrapper.app.parameter.2=-c YOURCONFIG
# Define listening IP - If you have more than one IP or want to indicate to listen on a specific IP
wrapper.app.parameter.3=-b aaa.bbb.ccc.ddd
# wrapper log location
wrapper.logfile=%JBOSS_HOME%/server/YOURCONFIG/log/wrapper.log

# You must not change below parameters without first uninstall the service
# service name
wrapper.ntservice.name=JbossYOURCONFIG
# service display name
wrapper.ntservice.displayname=JBoss Server YOURCONFIG

  • After placing need to register with  http://wrapper.tanukisoftware.com site to get free trail of 30 days. 
  • After registration licence key will be sent to your mail and with that you need to generate wrapper-licence.conf file and you need to append this text to wrapper.conf
My licence generated:

#encoding=UTF-8
wrapper.license.type=NODE
wrapper.license.id=
201208110011 wrapper.license.licensee=
TSILA-201208110010 wrapper.license.host_id=02004c4f4f50 wrapper.license.features=pro, 64bit, trial wrapper.license.upgrade_term.begin_date=2012-08-11 wrapper.license.upgrade_term.end_date=2012-09-11 wrapper.license.lease_term.begin_date=2012-08-11 wrapper.license.lease_term.end_date=2012-09-11 wrapper.license.key.1=a05f-5081-6baa-5bf5 wrapper.license.key.2=9f43-6b1c-a56a-7f2e wrapper.license.key.3=5d6c-5eb6-b1e4-3641 wrapper.license.key.4=141d-9373-5478-5e62

  • The following lines are not required as we are not passing any parameters to JBOSS server 
#wrapper.app.parameter.2=-c YOURCONFIG
#wrapper.app.parameter.3=-b aaa.bbb.ccc.ddd
  • To test JBOSS run the following in command prompt
cd %JBOSS_HOME%\bin\
wrapper.exe -c %JBOSS_HOME%\server\YOURCONFIG\wrapper\wrapper.conf
  • If every thing is running fine then install it using 
cd %JBOSS_HOME%\bin\
wrapper.exe -i %JBOSS_HOME%\server\YOURCONFIG\wrapper\wrapper.conf
Thanks !!! :) :)

No comments:

Post a Comment

Other Posts