In the first part of this TechTip, I showed you how to install and set up the open-source application server JBoss on System i. I also covered the steps necessary to deploy the sample EJB3Trail application. This time, I will walk you through the process of integrating the JBoss instance with i5/OS work management to provide better performance and manageability of the EJB3 applications.
The i5/OS work management is far superior to that of any other operating system with which I'm familiar in terms of its ability to assign various workloads into separate subsystems with dedicated system resources. A subsystem is a predefined operating environment entity that the system uses to coordinate the work flow and resource use. In addition, a memory pool can be used to further separate the workloads. A memory pool is a division of main storage, and it can be assigned to a subsystem so that the jobs running in a given subsystem do not have to compete for memory access with jobs in other subsystems.
Now, I will use these fundamental concepts to create a shared memory pool and a separate subsystem for the JBoss application server.
Setting Up a Shared Memory Pool
The i5/OS supports both shared and private memory pools. The shared pools are more flexible, because they allow sharing of unused memory between pools and they can also use the Expert Cache. The Expert Cache is a disk cache tuner that can reduce the time to process disk I/O. The i5/OS contains 64 predefined shared pools that can be allocated to subsystems. You can use either the graphical iSeries Navigator or the CL commands to configure a shared pool. To save space (and time?), I use CL commands in the course of this TechTip.
You can use the Work with Shared Pools (WRKSHRPOOL) command to configure the shared pool for JBoss. The command displays the names and status of the shared pools. The first four pools on the list are predefined by IBM, so you need to choose one of the other pools labeled *SHRPOOL1 through *SHRPOOL60. Locate the specific pool you want to configure, say *SHRPOOL2. You need to set three parameters:
Defined Size (M)—This is the amount of main storage, in megabytes, defined, for the pool. The memory requirement depends on the application. A good starting point would be 1.5–2 GB of memory for a good-sized application server. Then, monitor the paging rates to see if the memory size is adequate for your environment.
Maximum Active—This identifies the maximum number of threads that can use the processor concurrently. Set this parameter to 500.
Paging Option—The paging option determines whether the system should dynamically adjust the paging characteristics of the pool for optimum performance. Set it to *CALC to enable Expert Cache tuning.
Alternatively, you could execute the following Change Shared Pools (CHGSHRPOOL) command:
The MAXACT parameter specifies that only one job from the job queue can be active at any time. This ensures that only one JBoss instance can be started from this job queue.
I use the Create Class (CRTCLS) command to create a class object that specifies the processing attributes for the jobs that use that class:
The Run Priority parameter is set to 20, which is as high as the priority of interactive jobs.
I then use the Add Routing Entry (ADDRTGE) command to create a routing entry for the subsystem. A subsystem can have more than one routing entry; however, each job uses a single routing entry. Subsystems select which routing entry to use based on the comparison value in the routing entry and the routing data string in the job. Routing entries assign a pool and a class to a job while it is being started. In this case, I want the subsystem to invoke the command processor (QCMD) to run any submitted command. Here's the command to add the necessary routing entry:
The Sequence Number (SEQNBR) parameter is set to 9999, which is the maximum, catch-all value. Routing entries are searched in ascending sequence number order. So sequence 9999 is processed only if there is no match for any lower sequence number. The Comparison Data (CMPVAL) parameter specifies the string that is used to compare with the routing data to determine which routing entry is applied. The *ANY value means that any routing data is considered a match.
To have the JBoss application server start automatically after the subsystem is started, I attach an autostart job entry to the subsystem. First, however, I need to create a job description for the autostart job. An autostart job description contains all the runtime environment parameters needed to run the job. I use the Create Job Description (CRTJOBD) command to accomplish this task:
The User parameter specifies the name of the user profile associated with this job description. The Request Data (RQSDTA) parameter is the actual command string that i5/OS should execute. In this case, the Submit Job (SBMJOB) command is used to invoke the QShell processor. A QShell script name is passed as an input parameter to the QShell processor. (The content of this script is explained in the next section.) The Job Queue (JOBQ) parameter is used to point to a job queue associated with the subsystem, in which the job is to be executed. Finally, the Allow Multiple Threads (ALWMLTTHD) parameter set to *YES specifies that the job can run with multiple user threads. This is required, because JBoss is a multithreaded Java application.
The runServer.sh QShell script is used to set up the run-time environment for JBoss and to invoke the script to start the application server. The source of the script is listed below:
At [1] in the code above, the path to the JBoss executable code is appended to the CLASSPATH environment variable. At [2], the JAVA_HOME variable is set so that the 32-bit IBM J9 JVM is enabled (see part 1 of this tip for more details). At [3], the run.sh script is invoked to start the application server.
Once the necessary job description is defined, I can use the Add Autostart Job Entry (ADDAJE) command to attach an autostart job entry to the JBoss subsystem:
Jarek Miszczyk is the Senior Software Engineer, ISV Solutions Enablement, IBM Rochester. He can be reached by email at This email address is being protected from spambots. You need JavaScript enabled to view it..
Jarek Miszczyk is a Lead Technical Consultant for System x Virtualization and Cloud Computing at the IBMSTG Global ISV Enablement organization. He is located in Rochester, Minnesota. He can be reached by email at This email address is being protected from spambots. You need JavaScript enabled to view it..
This book provides an amazingly comprehensive introduction to the concepts while at the same time delivering enough technical detail to make you productive very quickly.
Today, it's all about input and output. Getting data into the IBM i from non-traditional sources and then displaying it back out again in varied formats. But where can you go to learn all that you need to know about this critical skill?
Too valuable to be classified as merely excellent certification material, this book should also rightly take its place on DB2 DBA bookshelves as a solid day-to-day DB2 reference.
Whether you want to obtain an IBM certified DB2 professional certification or simply become well-rounded in the fundamental concepts of DB2 and general database theory, this is your book.
Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:
More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.
IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:
TRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now! Request Now.
Forms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.
IT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.
Can you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:
Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:
Managing messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:
The thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:
For over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:
Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
When it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:
Supply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:
The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from.
>> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit
Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.
IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:
LATEST COMMENTS
MC Press Online