23
Tue, Apr
1 New Articles

Java Flies on V4R5

Java
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

I had the displeasure of working with AS/400 Java on OS/400 V3R7. Back then, I was using the Hursley port of Java. Hursley is the IBM lab in England that originally ported Sun’s Java Virtual Machine (JVM) C code to the AS/400. The Hursley port worked, but it ran like a dog. IBM rewrote the JVM for V4R1 to take advantage of the internals of OS/400. Still, I wasn’t doing any AS/400 Java demos—the JVM was still slow. With V4R2, the JVM started to run a little faster, and, by V4R3, OS/400’s JVM was able to support real-world Java applications. V4R4 removed many of any remaining performance issues, but, with V4R5, IBM has, once again, improved the JVM speed—this time by up to a whopping 65 percent. And that 65 percent improvement is on Java apps that are running on V4R5 on a stock V4R4 machine—not one of the new boxes that sport a 100 percent increase in MHz speed.

Java Toolbox for the AS/400

The Java Toolbox for the AS/400 (JT400) has also been enhanced with V4R5. JT400 has added a number of Java classes and packages that augment the development of Web applications and integration with legacy databases and programs. Classes of note are the ServiceProgramCall and FTP. Java packages of note are com.ibm.as400.util.html, com.ibm.as400.util.servlet, and com.ibm.as400.security. Also new with JT400 is a set of proxy classes that are used to reduce download time for Java applets.

JT400’s ServiceProgramCall class allows you to call an AS/400 service program from Java. ServiceProgramCall’s interface is much like its ProgramCall parent class except that you qualify the name of the module that you wish to invoke from a particular service program. JT400’s Program Call Markup Language (PCML) now also supports service programs.

The FTP class makes it ridiculously easy to use the Internet’s File Transfer Facility. The FTP class has methods (with names like connect, send, list, get, and put) that are extremely simplistic to use, so you’ll be able to automate the transfer of objects between TCP/IP computers within your Java programs.

Server-side Java is where it’s at with business applications nowadays, but sometimes the pseudo-GUI of HTML just isn’t good enough and a Java applet is required. The problem with Java applets is the time it takes to download the applet and its required jar files to the browser. The new jt400Proxy.jar file provides proxy classes that communicate with an AS/400-based proxy server.


New Java Packages

V4R5’s JT400 package of HTML classes, com.ibm.as400.util.html, provides Java classes that encapsulate the use of HTML. That way your Java code doesn’t have all that ugly embedded HTML code. The com.ibm.as400.util.servlet package has a set of classes that map SQL result sets automatically to HTML tables. My article, “Free and Easy with WebSQL,” published in the February 2000 issue of MC, provided a sample Java servlet application called WebSQL that used the com.ibm.as400.util.servlet package.

The com.ibm.as400.security package contains classes to make secured connections with the AS/400, authenticate any user’s identity on the AS/400, and associate the user with the underlying OS/400 thread.

The last JT400 enhancement that I want to mention is that somehow, someway, Rochester was able to reduce the jt400.jar file from 2.5 MB to 550 KB.

Just-In-Time

Sun, IBM, and others have been working hard to improve the execution speed of Java. One of the technologies that have been created to improve Java execution speeds is Just-In- Time (JIT) compilation. The JIT engine compiles heavily used sections of Java code in real time as the JVM is executing the interpreted Java byte code. The compiled section of code is gone after the Java class is removed from the JVM, and the JIT compilation repeats when the class is again instanced into the JVM.

But the AS/400 statically compiles Java classes into hidden service programs. And that static compilation is done automatically. So why is JIT important if AS/400 Java is fully compiled? The short answer is JavaServer Pages (JSPs). JSPs are essentially HTML with embedded Java code. In the JSP development environment, the JSP files are frequently modified, which, until V4R5, caused a static compilation. In this dynamic JSP development environment, the use of JIT compilation actually improves performance over statically compiled JSPs. The AS/400’s JIT compiler is almost as fast as the top optimization level (40) of the Create Java Program (CRTJVAPGM) command.

Side Order

I want to mention two other items about V4R5 Java: One, IBM will provide V4R5 support for Java 1.3 by the end of July (it intends to have Java 1.3 available via PTF for V4R4 by the second half of this year), and, two, with V4R5 you will be able to code stored procedures with Java.

Java keeps getting faster. Not only do you have the 65 percent performance boost, but with a hardware upgrade you can also factor in the 100 percent increase in MHz speed. Stack on top of the performance improvements the increased knowledge and available literature on coding Java applications for performance such as Alex Garrison’s “A Programmer’s Notebook: Making Servlets Run Faster” and Paul Remtema’s “Java Performance Tips” in the April and May 2000 issues of MC, respectively, and your Java apps begin to approach the speed of today’s RPG and COBOL applications.


Speed II

Don Denoncourt

Don Denoncourt is a freelance consultant. He can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..


MC Press books written by Don Denoncourt available now on the MC Press Bookstore.

Java Application Strategies for iSeries and AS/400 Java Application Strategies for iSeries and AS/400
Explore the realities of using Java to develop real-world OS/400 applications.
List Price $89.00

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 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:

  • SB Profound WP 5539More 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.

  • SB HelpSystems ROBOT Generic 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:

  • Magic MarkTRY 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.

  • SB HelpSystems ROBOT GenericForms 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.

  • SB HelpSystems ROBOT GenericIT 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.

  • SB HelpSystems ROBOT GenericCan 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:

  • FORTRA 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:

  • FORTRAManaging 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:

  • FORTRAThe 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:

  • FORTRAFor 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:

  • LANSA 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.

  • LANSAWhen 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:

  • LANSASupply 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

  • Profound Logic 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.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra 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: