Migrate to Jakarta EE

   PlatformApplicable to all products in Temenos Journey Manager.  |   All Personas |  23.04 This feature was introduced in 23.04

Journey Manager runs on the WildFly application server, which now uses Jakarta EE instead of the Java EE. Jakarta EE is a new Java technology trend in the Enterprise Edition Frameworks that can be also seen in new releases of other Java-based products, such as Spring and Spring Security. However, Jakarta EE introduces breaking changes to existing source code, which is based on previous versions of Spring framework.

Therefore, in order to continue using WildFly, we've upgraded all our underlying artifacts to align them with Jakarta EE 10 standards. This also means that any Java source code using previous Java EE code will not run in Journey Manager version 23.04.0 and above. One reason for this is that the servlet package name has been changed from javax.servlet to jakarta.servlet. Therefore, all Groovy scripts, templates and 3rd party libraries shipped with Manager need to be replaced with their Jakarta EE alternatives.

Existing Journey Manager customers who wish to upgrade to Manager version 23.4.0+ need to upgrade their deployed applications by changing all Groovy scripts, which are normally used in services, security managers, SDK projects, and exported archives. This activity can be summarized below:

  • Change package imports to use new Jakarta EE artifacts, for example, import javax.servlet.http to import jakarta.servlet.http
  • Change constants, for example, javax.xml.ws.http.request.headers to jakarta.xml.ws.http.request.headers
Note

After you've upgraded Groovy scripts for Journey Manager 23.04.0+, they won't be anymore backward compatible to the previous versions of Journey Manager.

Upgrade SDK Project

To be able to use the latest Journey Manager release, you must upgrade your SDK projects.

To upgrade an SDK project:

  1. Download Journey SDK 23.04.0 or later.
    Note

    Journey SDKs prior to 23.04.0 are not compatible with Journey Manager 23.04.0.

  2. Copy the old project source code into the new downloaded SDK project.
  3. Port any existing project customization into the new project.
  4. Convert the existing Groovy scripts to use correct Jakarta package names in import statements and constant names. You can choose one of the following methods to convert the project:

Search and Replace Manually

  1. Search for javax in all Groovy script files of the project and check whether the import statement needs to be changed to the new value.
  2. If the project has exported Journey Manager entities, such as application package JAR files, service JAR files and so on, check whether these archives contain Groovy scripts and correct them as per the previous step.

Use Eclipse Transformer Tool

  1. Download the Eclipse Transformer tool (org.eclipse.transformer.cli-0.6.0-SNAPSHOT-distribution.jar).
  2. Extract the JAR into a new directory and open it. You should see the main jar utility org.eclipse.transformer.cli-0.6.0-SNAPSHOT.jar as well as a lib directory including all dependencies.
  3. Run the following command to convert the files:
    java -jar org.eclipse.transformer.cli-0.6.0.jar -o path/to/sdk-project path/to/upgraded-sdk-project

This will create a new path_to_upgraded-sdk-project directory containing a new version of the project with Groovy files upgraded to use the new Jakarta imports and constants. If the project contains exported archives of applications, services and so on, the tool will also change the content of these archives.

Upgrade Services and Security Managers

To be able to use the latest Journey Manager release, you must upgrade your existing Groovy services and Security Managers to make them compatible with Jakarta EE.

The upgrade involves irreversible database changes, so you should perform the following steps before you commence:

  1. Back up a database of an environment that you are upgrading.
  2. Upgrade the development, test, and staging environments first, test them thoroughly and only then upgrade the production environment.

To simplify the upgrade process, we provide a service that performs all required changes. Depending on a version of Manager you use, the version of this service is different. Let's look at this in more detail.

Jakarta Transformer Service

Manager 23.04 comes with the Jakarta Transformer service that you must manually run to perform the upgrade process.

To upgrade services and security managers:

  1. Locate the Jakarta Transformer service.
  2. Run the service in the dryRun mode to see what services and security managers will be changed but without actually changing them. Running the service in the list or dryRun modes invoke the service's Unit Test that helps you analyze the size of changes and pinpoint where changes need to be applied. If you prefer doing changes manually, this can also serve as a check list. For more information, see Jakarta Transformer service.
  3. After you are happy with the changes, run the service in the transform mode to persists them in the database.
  4. Open Groovy Console and paste the following Groovy script into the Groovy Script text area:
    import com.avoka.tm.svc.*;
    Map params = [:]
    params.action = (Object)“transform”
    def result = new GroovyServiceInvoker()
          .setServiceName(“Jakarta transformer”)
          .setVersion(“0.1.0”)
          .invoke(params)
    println(result)
  5. Select the Commit DB Changes checkbox to commit the changes to the database and click Execute Script.
  6. Check committed changes in the Execution Output text area and save this information in a file for future references, for example, if you will need to troubleshoot service errors after the migration process is done.
    Warning

    If you don't save the output and close the Groovy Console window, the change log will be lost.

Jakarta Transformer Scheduled Service

Manager 23.10 and later comes with the Jakarta Transformer scheduled service that you must set up as a scheduled job so it runs several times to perform the required upgrade.

To upgrade services and security managers:

  1. Check the Jakarta Transformer scheduled service configuration.
  2. Create a scheduled job to run the Jakarta Transformer scheduled service using the following parameters:
    • Name: jakarta transformer job
    • Description: jakarta transformer scheduled service
    • Service Definition: jakarta transformer schedule service - v1.0.0
    • Trigger Type: simple
    • Repeat: Repeat 10
    • Repeat Interval: 5 minutes
  3. Check the Jakarta Transformer scheduled service Groovy log to see if there are any errors.

This scheduled job will be deleted automatically once all repeats are done.

Next, learn about Temenos Journey Manager platform development.