Archive for March 26, 2008

Shell Script to Start and Stop JBoss

I was looking for a script to start and stop JBoss server on the Linux environment, but didn’t find anything that useful. I did find one for starting and stopping lighttpd server for our Rails applications and have been using it effectively. Even though I am not a shell script expert, I thought I will modify the script a bit and make use of it for JBoss. The main change that I had to make was to make the script wait until the server starts or stops. To make sure the server has successfully started, I had to tail the log file for one line until the last line contained the text “JBoss (MX MicroKernel) …….. Started”. To make sure the server stopped successfully I had to ensure the process was terminated completely. If you are in need of such a script, here it is.

Download JBoss start/stop Script

Some items you have to change in the script to work for your environment.

  • PIDFILE - File containing the process id. Change it to a location where you want to have this file.
  • STARTJBOSS - Command to start JBoss. Scan through this command in entire and make sure you have added the parameters necessary for your environment, set the minimum and maximum JVM heap, and also the server you want to start. You can get this information from the server log when you run JBoss using the run.sh script. The script assumes you have Java executable in the path.
  • LOGFILE - The server’s log file. Change it to a location where you want to have this file.

Additionally you might want to change line 32 to the right version of JBoss you are using. Make sure this line reflects exactly what you see in the server log at the end when JBoss completes starting the server. If it doesn’t match, this script will go in infinite loop.

An additional benefit I got after writing this script was to have our automated build scripts using Ant to deploy the applications on any box using the SSHExec tasks. Really cool and time saving.

Disclaimer - The script herein provided to you is “AS IS” without any warranties of any kind. The script has not been thoroughly tested under all conditions. I, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.

Blink this Shell Script to Start and Stop JBoss at blinklist.com    Bookmark Shell Script to Start and Stop JBoss at blogmarks    Bookmark Shell Script to Start and Stop JBoss at del.icio.us    Digg Shell Script to Start and Stop JBoss at Digg.com    Fark Shell Script to Start and Stop JBoss at Fark.com    Bookmark Shell Script to Start and Stop JBoss at Furl.net    Bookmark Shell Script to Start and Stop JBoss at NewsVine    Bookmark Shell Script to Start and Stop JBoss at reddit.com    Bookmark Shell Script to Start and Stop JBoss at Simpy.com    Bookmark Shell Script to Start and Stop JBoss at Spurl.net    Bookmark Shell Script to Start and Stop JBoss with wists    Bookmark Shell Script to Start and Stop JBoss at YahooMyWeb

Comments (2)      Cosmos

Foundation Stone #46 - Swim Against the Current

A river when it is a river is never stagnant. It keeps flowing. Until it reaches a pool or a greater river which then flows and reaches the ocean. A river flows until it reaches a point where water is stagnant. The definition of stagnant as I search, gives me,

  • dead(a): not circulating or flowing; “dead air”; “dead water”; “stagnant water”
  • not growing or changing; without force or vitality

If you look at it from a career perspective, it is easy to get into being stagnant. One doesn’t need to do anything beyond what he is expected. The person will be in the flow but at a point will become stagnant, in more business terms a commodity. You are no more worth than millions of others who are in the pool. Standing out or being uniquely recognized and becoming successful is to swim against the commodity pool. As you keep moving against, you will raise to a lesser commodity pool.

Gangotri GlacierTaking the same analogy of a river, if I have to take the example of river Ganges, it has many tributaries flowing through many cities North East India until it reaches the Ganges Delta and flows into the Bay of Bengal, north eastern part of the Indian Ocean. But the source of Ganges is a 19 mile stretch glacier in the Himalayas called the Gangotri glacier. The origin of yet another major river in India called Cauvery is Talakavery, which is a spring. The source of any river is unique and distinct.

To reach success and growth in career is to swim against the current, to constantly grow and change and not be stagnant. Growth is not possible until one exerts additional effort to do things beyond what is expected. When one tries to do things beyond what is expected, there will be hurdles and blocks as in the current that pushes the water in the river. Sure, swimming against the current is difficult, but when you make it you get towards a point, a unique identity and are in a pool of lesser commodity.

So what did you do/learn beyond what is expected out of you?

Blink this Foundation Stone #46 - Swim Against the Current at blinklist.com    Bookmark Foundation Stone #46 - Swim Against the Current at blogmarks    Bookmark Foundation Stone #46 - Swim Against the Current at del.icio.us    Digg Foundation Stone #46 - Swim Against the Current at Digg.com    Fark Foundation Stone #46 - Swim Against the Current at Fark.com    Bookmark Foundation Stone #46 - Swim Against the Current at Furl.net    Bookmark Foundation Stone #46 - Swim Against the Current at NewsVine    Bookmark Foundation Stone #46 - Swim Against the Current at reddit.com    Bookmark Foundation Stone #46 - Swim Against the Current at Simpy.com    Bookmark Foundation Stone #46 - Swim Against the Current at Spurl.net    Bookmark Foundation Stone #46 - Swim Against the Current with wists    Bookmark Foundation Stone #46 - Swim Against the Current at YahooMyWeb

Comments      Cosmos


Creative Commons License  This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.