13
Fri, Dec
4 New Articles

The Java Capabilities of Domino

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

Many people are already aware of the incredible flexibility and rapid application development that Lotus Domino provides, and Java is a major factor in this scenario. Therefore, it’s time to make people aware of the powerful combination that Domino and Java provide in tandem.

The History of Domino and Java Integration

Domino has been enabled with Java support since Release 4.5. Access to the Notes back- end classes and the ability to run Java agents were added in Release 4.6, and the capability of running Java servlets was added in Release 4.6.1. On the AS/400 platform, Release
4.6.2 is required to get the servlet support because Release 4.6.1 was never offered for the AS/400.

Release 5.0 (R5) of Domino expanded almost every aspect of its Java support: more classes, Common Object Request Broker Architecture (CORBA) support, and the ability of applets to access Domino objects. This ability to access Domino objects from applets is very powerful. There are four base applets that ship with R5: the editor applet, the outline applet, the view applet, and the action bar applet.

Notes back-end classes are used to manipulate the Lotus Notes/Domino environment, which includes Notes databases, documents, forms, views, and agents. The Domino object interface is not language-specific. Either the Java or LotusScript APIs can be used to access the underlying objects.

Reasons to Use Java

Java is not just a programming language: It is a platform that can be used to create and deliver information over any network. Java is designed to be portable and architecture- neutral for any system implementing the Java Virtual Machine (JVM).

Java is an object-oriented language that is similar to C++. Java enables the development of new client/server functions in Internet applications, while enforcing a discipline that makes software management possible across almost any hardware platform.

As already stated, the biggest benefit of using Java is that it is platform- independent, just as Domino is. Java is a multithreaded language that allows you to take advantage of n-way processors (multiprocessors). Because Java is an object-oriented language, it provides rapid development and code reuse. This is very important in today’s


environment of fast product deployment. Java also does its own garbage collection, which is a huge plus for your developers.

Rather than use the JVM that ships with Domino, as most platforms do, the AS/400 uses its own integrated JVM. This provides better performance, as the JVM is integrated into the operating system. The AS/400’s integrated JVM has additional benefits: It has advanced garbage collection algorithms and provides the capability to compile Java programs into executables through the Java transformer. The Java transformer, included with the AS/400’s JVM, is responsible for optimizing platform-independent Java class files to take the greatest advantage of the AS/400’s processing architecture. You can create Java programs by using the Create Java Program (CRTJVAPGM) command.

Applications

A Java application, sometimes referred to as a standalone Java application, is a program written in Java that executes locally on a server or workstation. Java applications can be used to develop small utilities, front-end applications, and multi-tier clients and to complete data processing tools.

Applications run within a JVM, allowing them access to the services of the underlying system, which is typically subject to the authority of the user running the application. This means that Java classes loaded as part of an application can access the local file system, create and accept network connections with other systems, and perform other tasks that are permitted only to trusted code.

Java classes can also be created as agents in a Notes database and are executed like any other Domino agent. Java agents have full agent scheduling and triggering ability from both the client and the server. They can be run in either the foreground or the background, and they can be replicated. Java agents also have full agent security, such as signing and restricted/unrestricted execution. Because of their reliance on the Notes APIs, execution of the Domino object classes requires that Domino or Notes be installed on the machine upon which the Java agent is running.

Agents are quite different from applications. They can be thought of as batch processes that run within the context of a Domino server. Agents are used for a variety of reasons, such as retrieving documents, deleting old documents, and accessing DB2 UDB to update documents. R5 introduced the ability of the Domino Designer to edit and compile Java agents within the integrated development environment (IDE) itself, but interactive debugging is not yet supported.

Java applets are small programs that are downloaded to and executed on a Web browser or network computer. Since Domino Release 4.5, the Notes client has been able to run Java applets. With Release 4.6, you could insert a Java applet directly on a form so that the applet was included in each document created from the form, or you could insert an applet in a rich text field or document to include it only in that document. When a form or document containing a Java applet is displayed using a Web browser, the applet is under the control of the Web browser.

Until R5, applets could not easily communicate with the Domino server or contain integration capabilities. A new set of applets is now shipping with R5 to make development of Domino Web-enabled applications much easier: the outline applet, the editor applet, the view applet, and the action bar applet. These applets are customizable and programmable using the Domino Designer and are compliant with the Java Development Kit (JDK) Version 1.0.2. (They can be used in 3.x and 4.x browsers.)

Agents

Applets

Outline Applet


The outline applet lets you organize the structure of your application. The outline has two parts: the outline design, which lists the application design elements and links between elements, and the outline control (the outline embedded on a page), which allows users to navigate through the application.

Editor Applet

The editor applet allows users to define how a rich text field displays for editing in a browser. This applet supports bold, italics, underlining, single-level indent, ordered and unordered lists, color selection, limited size and font selection, and URL-link hot spots.

View Applet

The view applet is a view that has been embedded on a page or form. Once the view is embedded on the page or form, a user can sort views by column, scroll up and down by using the view scroll bars, and resize headers by dragging the edges of the column headers to change the column widths dynamically. The view applet also allows users to expand any number of twisties, which allow users to drill down and see information in multiple categories at once. Another new feature allows you to select multiple documents in the view and perform actions on those documents from the view.

Action Bar Applet

In R5, actions can also have subactions that you can access by clicking on the action buttons on the action bar. A drop-down menu containing subactions will then appear. Without the action bar applet, this drop-down capability would be nearly impossible for Web users to use.

Java servlets are platform-independent, server-side software components written in Java. Servlets run on a Java-enabled Web server. They dynamically extend the capabilities of the server because they provide services over the Web, using the request-response paradigm.

From a high-level perspective, the servlet process flows in the following way:

1. The client sends a request to the server.
2. The server sends the request for information to the servlet.
3. The servlet builds a response and passes it to the server. The response is dynamically built, and the contents of the response usually depend on the client’s request.
4. The server sends the response back to the client.

Because they run inside servers, servlets do not need a GUI; in this sense, servlets are “faceless” objects.

Servlets are persistent and can be reused to handle many requests in their lifetime. Unlike agents, which run within an existing session in a Notes context, servlets must initialize with Notes and obtain a session for their own use; this means that servlets are also responsible for their own authentication and access control.

Typically, servlets are used to examine the URL that triggered the retrieval of the current page, to do some application-specific processing—such as a relational database lookup—and to insert enterprise data into the page that goes back to the client.

For the AS/400, you need Domino Release 4.6.2 or later and OS/400 V4R3 or later to implement servlets.

Additional Java Support in Release 5.0.4

With the availability of Domino Release 5.0.4, you will have the capability of using either Domino’s HTTP stack or the WebSphere HTTP stack. This integration creates the ability to


Servlets

design a new breed of Domino applications. Domino provides the unique aspects of collaboration, and WebSphere provides transactional capabilities.

Currently, there are three different server editions in the WebSphere product family: Standard Edition, Advanced Edition, and Enterprise Edition. The Standard Edition will come installed with Domino Release 5.0.4 and provides base support for servlets and JavaServer Pages (JSPs). Advanced Edition builds on Standard Edition and adds support for Enterprise JavaBeans (EJBs). This environment allows you to write applications that take advantage of complex server features—such as two-phase commit transactions, which is particularly important when performing transactions against back-end data stores. Finally, Enterprise Edition adds CORBA support to the EJB functionality of Advanced Edition. CORBA support allows remote access, thereby enabling distributed computing with EJBs.

The Coffee Is Brewed

As you can see, there are many different ways to use Java in the Domino environment. There are many tools and articles that will help you on your journey with the Java capabilities of Domino. One such tool is the Lotus Domino Toolkit for Java/CORBA, a comprehensive source of samples, documentation, and software that help you create Java applets, applications, servlets, and agents for local and remote (CORBA) access to Domino data (www.lotus.com/developer). Good luck in the enrichment of your Domino applications with all of the Java capabilities that are currently available.


BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

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: