Configure and Update a Local JRE

For optimal performance with a Boomi Integration Runtime, it is important to use a local copy of a Java Runtime Environment (JRE) or Java Development Kit (JDK). By default, Boomi will install a copy of JRE 8 or JDK 11 to the atom install directory. For Atoms, this is not an issue because the atom directory is usually on a drive local to the server. Yet, for a clustered runtime - i.e. Molecule or Atom Cloud - the atom directory is located on a file share. Performance improvements can be made by moving a copy of the JRE/JDK from the file share to a local disk.
In general, there are two steps involved in configuring a local copy of Java: 1) Create a local JRE/JDK and 2) define the JRE/JDK that the Integration Runtime should use. Once those steps are complete, the article will review the steps involved when updating the local Java version.
Configure Local Java
By default, Boomi will install a JDK (Java 11) within
# Move directory syntax for Linux
mv
# Bash Example
mv /boomi/share/molecule_name/jre /boomi/local
Configure pref_jre.cfg
The next step to configuring the version of Java is to update the pref_jre.cfg file which determines the Java location being used. Navigate and edit
Figure 1. Example pref_jre.cfg file contents for a Linux-based Molecule install.
Example directory syntax
# Linux Example
/mnt/boomi/cloud/jre
# Windows Example
C:\Program Files\Java\jre8
C:\Program Files\jdk\jre
Two additional Properties need to be set when updating the version of Java for an Atom Cloud or Molecule with Forked Executions. Java Class Path Prepend and Java Library Path should both be set within Advanced Properties. The value should be set to the location of the local JRE or JDK, which will be the same value as in the pref_jre.cfg.
Update Local Java Copy
The Java updater within the Boomi UI will only update the Java version on the file share. Therefore, the local Java version needs to be manually updated on each node. When updating the version of Java, the local node will need to be stopped, the local Java directory will need to be updated with the desired Java version, and the node can then be started back up. The most recent version supported by Boomi can be downloaded using https://platform.boomi.com/atom/molecule_upgrade64.sh, for Molecule, or https://platform.boomi.com/atom/cloud_upgrade64.sh, for Atom Clouds. The sh file can be executed and will install the currently supported version of Java in
Below are two Linux example scripts for updating the local version of Java with either the Boomi Java Update script or with a specific version of Amazon Corretto. Update them as needed to suit your business needs.
#!/bin/bash
# Example using Boomi Update Java Script with Linux
atom_dir="set_the_atom_dir"
dir_containing_local_jre_dir="set_the_dir_that_contains_the_local_jre"
# Move to tmp and download updater. This example is for a molecule. Update as needed.
cd /tmp
wget https://platform.boomi.com/atom/molecule_upgrade64.sh
chmod +x molecule_upgrade64.sh
./molecule_upgrade64.sh -q -console VprefJreLocation=current -dir $atom_dir
Stop runtime
$atom_dir/bin/atom stop
# The updater will create a new jre directory in the atom directory. # Move the current JDK to a backup folder # and move the new JDK within the atom directory to the local jre directory.
echo "Removing old jre_backup..."
rm -rf $dir_containing_local_jre_dir/jre_backup
echo "Moving current jre to jre_backup..."
mv $dir_containing_local_jre_dir/jre $dir_containing_local_jre_dir/jre_backup
# Move to update Java version on the fil share into the local Java directory
echo "Moving new jre..."
mkdir -p $dir_containing_local_jre_dir
mv $atom_dir/jre $dir_containing_local_jre_dir
# Start the node back up
$atom_dir/bin/atom start
#!/bin/bash
# Example using Amazon Corretto Link with Linux
dir_containing_local_jre_dir="set_the_dir_that_contains_the_local_jre"
# Move to tmp and download Amazon Corrector JDK. Update as needed. Select the desired version.
cd /tmp
wget https://corretto.aws/downloads/resources/11.0.21.9.1/amazon-corretto-11.0.21.9.1-linux-x64.tar.gz
tar -xvf amazon-corretto-11.0.21.9.1-linux-x64.tar.gz
# Stop runtime
$atom_dir/bin/atom stop
# Move the current JDK to a backup folder
# and move the new JDK to the local jre directory.
echo "Removing old jre_backup..."
rm -rf $dir_containing_local_jre_dir/jre_backup
echo "Moving current jre to jre_backup..."
mv $dir_containing_local_jre_dir/jre $dir_containing_local_jre_dir/jre_backup
# Move to contents of the extracted folder into the local Java directory
echo "Moving new jre..."
mkdir -p $dir_containing_local_jre_dir
mv /tmp/amazon-corretto-11.0.21.9.1-linux-x64/* $dir_containing_local_jre_dir
# Start the node back up
$atom_dir/bin/atom start