Best Practices
I am not going to go in to detail on how you should organize your scripts, but I will give you some examples of what worked for us.
1) Create parent libraries
Each project should provide configuration information to a parent “class” and that’s it. The actual method calls to add each configuration object (i.e. Datasource, Queue) should be in the parent class file and used among all projects
2) Automate parameter discovery
Try to script as many start parameters as possible, so each developer can run the scripts without frustration. Have your scripts find the parent classes and working directories themselves.
3) Create configuration parameter objects
When we want to upgrade our Websphere configuration (i.e. to move from Listener ports to Activation Specs) we just create a new parameter object, so we just have to change one line to switch from each version.
4) Put everything in the script
Including JVM parameters, Security, and classpath appends
5) The script cleans then adds
The first thing your script should do is erase any configuration data that *might* be there. If there is no configuration data yet, then it should silently fail and move on.
6) Log
Create a log object and log the start and end of each method call (i.e. createDatasource method). This will greatly help you with debugging.
7) Assume there is no documentation or examples from IBM
..because there ain’t.