An useful script
I develop T24 component and my browser is hosted in Jboss. The problem in Jboss is that if I change something in a routine or in a version or enquiry I have to restart the "jbase_agent"s. If not the changes won't take place in the browser immediately.
For this i have to use several unix commands to kill the agents. To simplify this i created a simple script. You need to compile this as a Program in your jbase server environment and run. This program is self explanatory.
PROGRAM JK2
$INCLUDE T24.BP I_COMMON
$INCLUDE T24.BP I_EQUATE
CRT "INPUT PORT NO"
INPUT Y.PORT
IF Y.PORT NE "" THEN
Y.EXC.CMD = "SH ps -ef | grep ":Y.PORT:" | grep -v grep | awk '{print $2}' | xargs kill"
EXECUTE Y.EXC.CMD
Y.EXC.CMD = "SH nohup jbase_agent -p ":Y.PORT:" &"
EXECUTE Y.EXC.CMD
END ELSE
CRT "INVALID PORT NO"
END
STOP
This program will kill all the running jbase_agent processes and start a new one in the background. This will save some time during the development.
Comments
Post a Comment