IBM has supplied a program that can be used in an autostart job entry on the iSeries to start your WebSphere instance. So, just like any other job, you can create an entry in the subsystem description to start your instance when the subsystem is started. You can then add the STRSBS command to your system startup program (normally called QSTRUP and pointed to by system value QSTRUPPGM). The result is when your system is powered up the WebSphere susbsystem and its associated instance job(s) are started. The command you would place in your startup program would look something like this: STRBS SBS(QEJBAS5/QEJBAS5) It is good practice to follow all commands in your startup program with a MONMSG CPF0000 so that if the command fails, the execution of the program won't stop. To create an autostart job entry in the WebSphere subsystem, you need to create a job description that contains the command used to start the job and the autostart job entry itself. In the job description, the command used to start the job is placed in the Request Data parameter. The command would look like this: QSYS/CALL PGM(QEJBAS5/QEJBSTRSVR) PARM('-instance' '/QIBM/UserData/WebAs5/Base/yourinst
'); // -->
ancename' '-server' 'yourservername') In this command, yourinstancename is the name you have given to your WebSphere instance and yourservername is the WebSphere server name associated with that instance. For example, if you created the WebSphere instance using the default values in the crtwasinst command, the instance name becomes 'default' and the server name becomes 'server1'. Figure 1 shows the output from a DSPJOBD command for a sample job description, with some of the key parameters highlighted. Figure 1: The job description for a WebSphere autostart job entry In this example we have created a job description object named MYWAS in library MYLIB. Make sure the user profile that runs the system startup program (usually QPGMR) has authority to this object and library. The jobq that is specified in the jobd, in this case QEJBAS5/QEJBJOBQ, is attached to the WebSphere subsystem description. You can find the name of this jobq by using Option 6 from the DSPSBSD command for your WebSphere installation. The Message Logging values of 4 0 *SECVL assure that a job log gets created when the WebSphere job ends. This is not necessary, but it can be helpful during debug if the WebSphere instance does not get started correctly. The Routing data is QCMDI, and the Request data is as shown. The last parameter you must be sure to specify is to set Allow Multiple Threads to *YES. The WebSphere instance is a highly threaded job. Once you have created the job description, you just need to add an autostart job entry to the subsystem description that points to the job description. The command would look like this: ADDAJE SBSD(QEJBAS5/QEJBAS5) JOB(MYSERVER) JOBD(MYLIB/MYWAS) You can specify any name for the Job parameter, but it is a good idea to make it meaningful in terms of your WebSphere installation. I like to use the actual server name, such as SERVER1, because then the job name will be the same whether it gets started from the autostart job entry or from the QShell command. To verify that the autostart job entry got added, you can use Option 3 from DSPSBSD to view it. It will look like the one shown in Figure 2 below. Figure 2: Output from DSPSBSD Option 3 -----------------------------------
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| iSeries Security - Security Tools, Physical Security and System Security |
| About Us | Contact Us | For Advertisers | For Business Partners | Site Index | RSS |
|
|
|
|||||||