-
1. Re: Jboss as a service
rohit.macherla Mar 3, 2010 10:27 AM (in response to rasa)1 of 1 people found this helpfulHi Rasa,
Though I have not tried making JBoss startup as a service. I know that there are a few scripts that can take care of this functionality.
You may use the scripts:
jboss_init_redhat.sh
jboss_init_hpux.sh
jboss_init_suse.sh
for making JBoss start as a service. These scripts are present in the JBOSS_HOME/bin/
Hope it helps.
-
2. Re: Jboss as a service
rasa Mar 4, 2010 12:02 AM (in response to rohit.macherla)Hi Rohit,
I am starting jboss by using following commnad
nohup ./run.sh -Djboss.bind.address=211.1.1.172 &
and from bin dir when i execute
sh jboss_init_redhat.sh stop
It is giving following messages
JBOSS_CMD_START = cd /usr1/jboss/jboss-4.2.3.GA/bin; /usr1/jboss/jboss-4.2.3.GA/bin/run.sh -c default
No JBossas is currently runningI thik it is not getting the bind address. Either that have to be hardcoded in the script or i have to pass it as an argument. Let me try all this.
Thanks for your guidance.
-
3. Re: Jboss as a service
rasa Mar 4, 2010 6:20 AM (in response to rasa)Yes the issue is solved.
1) Make a file with the name jboss, if more than one instance is there then make jboss1, jboss2 etc and copy the belwo content in to that file. Change the file path, jnp port , binding address etc
start(){
echo "Starting jboss.."
su -l -c 'nohup /usr1/jboss/jboss-4.2.3.GA/bin/run.sh -Djboss.bind.address=211.1.1.172 &' - jboss
}
stop(){
echo "Stopping jboss ...."
su -l -c 'nohup /usr1/jboss/jboss-4.2.3.GA/bin/shutdown.sh --server 211.1.1.172:1099 &' - jboss
}
restart(){
stop
# give stuff some time to stop before we restart
sleep 60
# protect against any services that can't stop before we restart (warning this kills all Java instances running as 'jboss' user)
# if the 'su -l ...' command fails try:
start
}Thanks and Regards
Rasa