Home > AS/400 Tips > WebSphere Strategies for iSeries professionals > Automatically start a WebSphere instance
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WEBSPHERE STRATEGIES FOR ISERIES PROFESSIONALS

Automatically start a WebSphere instance


Dan Reusche
07.07.2005
Rating: -5.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


A WebSphere instance on the iSeries runs as a job in a subsystem, like any other job on the system. However, the normal method used to start the WebSphere instance is different, requiring that you use the startServer command from the QShell environment. But what if you want to start your WebSphere instance automatically when the system is first IPL'ed? This article will show you how to make that happen.

The examples in this article are based on WebSphere Base version 5.0.2 for the iSeries. Depending on the version of WebSphere you are running, the library and subsystem names may be different.

[TABLE]
[IMAGE]

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


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
WebSphere Strategies for iSeries professionals
Application modernization strategies for System i
Application modernization in the i world
Natively supported Web applications for Power running i
Enterprise open source basics
Basic security considerations for a Domino/WebSphere system
Simplifying data access using Java Standard Tag Library
Integrating Microsoft ActiveX components with WebSphere
Choices for running Web workloads on iSeries
Virtual hosting for iSeries Web applications
Automate WebSphere configuration backups on the iSeries (i5)

Web Development
Migrating from RPG to EGL on IBM i
Groovy programming on IBM i
Running PHP open source applications: NOBODY needs authority
Zend Web software teams up with IBM System i
The best technologies and tools for System i programmers in 2009
Seven IBM i project lessons learned in 2008
AS/400 lessons from the past, present, and future: A holiday tale
Application modernization strategies for System i
RPG application modernization for i5
Web skills crucial to iSeries programmer professional development

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
WebSphere Development Studio Client (WDSC)  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


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

-----------------------------------
About the author: Dan Reusche is a senior systems administrator at Think Federal Credit Union in Rochester, Minn. He has worked with the IBM AS/400 and iSeries platform since 1988, when he worked at the IBM Rochester Development Lab and support of AS/400 systems used within IBM. You may contact him at dreusche@chartermi.net.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts