Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've written a script to automate the process of starting, stopping, and restarting WAS7 from the command line. Nothing starts automatically on one of our staging servers, so I have to start everything: deployment manager, node agent, app server, and Web server. The script I wrote seems to work pretty well.

A coworker of mine recommended that I structure my commands differently. I'm wondering if there's a good, valid reason for doing so.

First, my variables:

WAS_HOME="/opt/IBM/WebSphere/AppServer"
WAS_PROFILE_NAME="AppSrv01"
WAS_APP_SERVER="server1"
WAS_WEB_SERVER="webserver1"

How I had the start commands:

"${WAS_HOME}/bin/startManager.sh"
"${WAS_HOME}/bin/startNode.sh" -profileName $WAS_PROFILE_NAME
"${WAS_HOME}/bin/startServer.sh" -profileName $WAS_PROFILE_NAME $WAS_APP_SERVER
"${WAS_HOME}/bin/startServer.sh" -profileName $WAS_PROFILE_NAME $WAS_WEB_SERVER

I was told that I should do it like this, instead:

WAS_DMGR="Dmgr01" # Added variable

"${WAS_HOME}/profiles/${WAS_PROFILE_NAME}/bin/startNode.sh"
"${WAS_HOME}/profiles/${WAS_DMGR}/bin/startManager.sh"
"${WAS_HOME}/profiles/${WAS_PROFILE_NAME}/bin/startServer.sh" $WAS_APP_SERVER
"${WAS_HOME}/profiles/${WAS_PROFILE_NAME}/bin/startServer.sh" $WAS_WEB_SERVER

How is the second way of starting up everything for WebSphere any better or more correct than the first, original, way?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

This is dependent on the default profile being set since you run two profiles on the same machine. It appears Dmgr01 is the default so the first startManager call works fine. The server scripts sets the profilename so they work fine as well.

I think the first way of doing it is just as good as the second.

If you look at the code for the start*-scripts in Profile\bin you find they basically just set some variable and then call the AppServer\bin scripts.

share|improve this answer
1  
As Pathduck said, the profile start scripts call the AppServer\bin ones. So technically your script should technically be faster. But you won't actually notice this millisecond. I haven't tested it, but I guess it doesn't matter what you start first, the Deployment Manager or the Node. I would start the deployment manager first. So both scripts are as good as the other one. –  Peter Schuetze Aug 9 '10 at 18:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.