OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.16k stars 598 forks source link

Full EJB support for InstantOn #25961

Open tjwatson opened 1 year ago

tjwatson commented 1 year ago

Description

For JavaEE and JakartaEE the ejb feature will be enabled for InstantOn support. We will start with EE 8 version ejb-3.2 support. This includes the following features:

When available, add links to required feature documents. Use "N/A" to mark particular documents which are not required by the feature.

General Instructions

The process steps occur roughly in the order as presented. Process steps occasionally overlap.

Each process step has a number of tasks which must be completed or must be marked as not applicable ("N/A").

Unless otherwise indicated, the tasks are the responsibility of the Feature Owner or a Delegate of the Feature Owner.

If you need assistance, reach out to the OpenLiberty/release-architect.

Important: Labels are used to trigger particular steps and must be added as indicated.


Prioritization (Complete Before Development Starts)

The (OpenLiberty/chief-architect) and area leads are responsible for prioritizing the features and determining which features are being actively worked on.

Prioritization

Design preliminaries determine whether a formal design, which will be provided by an Upcoming Feature Overview (UFO) document, must be created and reviewed. A formal design is required if the feature requires any of the following: UI, Serviceability, SVT, Performance testing, or non-trivial documentation/ID.

Design Preliminaries

Design

No Design

FAT Documentation

A feature must be prioritized before any implementation work may begin to be delivered (inaccessible/no-ship). However, a design focused approach should still be applied to features, and developers should think about the feature design prior to writing and delivering any code.
Besides being prioritized, a feature must also be socialized (or No Design Approved) before any beta code may be delivered. All new Liberty content must be inaccessible in our GA releases until it is Feature Complete by either marking it kind=noship or beta fencing it.
Code may not GA until this feature has obtained the "Design Approved" or "No Design Approved" label, along with all other tasks outlined in the GA section.

Feature Development Begins

Legal and Translation

In order to avoid last minute blockers and significant disruptions to the feature, the legal items need to be done as early in the feature process as possible, either in design or as early into the development as possible. Similarly, translation is to be done concurrently with development. Both MUST be completed before Beta or GA is requested.

Legal (Complete before Feature Complete Date)

Translation (Complete 1 week before Feature Complete Date)

Innovation (Complete 1 week before Feature Complete Date)

In order to facilitate early feedback from users, all new features and functionality should first be released as part of a beta release.

Beta Code

Beta Blog (Complete 1.5 weeks before beta eGA)

A feature is ready to GA after it is Feature Complete and has obtained all necessary Focal Point Approvals.

Feature Complete

Focal Point Approvals (Complete by Feature Complete Date)

These occur only after GA of this feature is requested (by adding a target:ga label). GA of this feature may not occur until all approvals are obtained.

All Features

Design Approved Features

Remove Beta Fencing (Complete by Feature Complete Date)

GA Blog (Complete by Feature Complete Date)

Post GA

tkburroughs commented 1 year ago

ejbRemote-3.2

From an EJB Container perspective, this is an extension to ejbLite-3.2 which is already enabled for InstantOn. I believe the main issue is going to be with how the remote EJB interfaces are bound into the ORB's NameService. Here are three designs I'd image could work with InstantOn:

  1. The ORB can be updated to start prior to checkpoint, but not bind to any ports until restore. Allow EJB Container to bind the remote EJBs into the NameService as normal prior to checkpoint. On restore, the ORB binds to the ports; no rebind into NameService needed; no changes required from EJB.
  2. The ORB could start normally during checkpoint; EJB Container would bind into the NameService.... but on Restore, the ORB would re-start in such a way that the EJB Container could just re-bind the remote interfaces without restarting the applications. The EJB Container is actually designed to support this, but unfortunately doesn't quite work. There is a build break defect that I'm working on to resolve this; once done, then no additional changes would be required from EJB Container, but likely changes needed to ORB
  3. Defer starting the ORB until restore. Probably easiest change for ORB components, but incurs more overhead during restore. EJB Container should require no changes (other than the build break fix I mentioned above), and would just dynamically bind the remote interfaces into the ORB whenever it starts... without restarting the applications.
tkburroughs commented 1 year ago

mdb-3.2

I recommend making no changes to EJB Container code; allow it to "start" MDBs normally prior to checkpoint. Then, change the activationSpecifications (JCA) to either not start the ActivationSpecs until restore, or start them in the "paused" state. This allows MDBs to "start", but not "activate" until restore.

MDBs "start" much like "Stateless" beans that are already enabled for ejbLite-3.2, so I don't expect there to be any concerns "starting" them. At the end of application start, the MDBs are then "activated", which also should be fine, as this really just puts them in a "pending" state where they wait for other resources to start, such as the "Queue" and the "ActivationSpec". By not fully starting the "ActivationSpec" until restore, then all of the processing for MDBs can still be completed during application start, prior to checkpoint.

The only concern I can see with this is that a Warning or Error may be logged indicating the MDB never activated... due to the large time gap between the EJB Container calling acitvateEndpoint and the ActivationSpec becoming available on restore. It is possible some minor change would be needed to avoid this warning; testing should uncover if this is a problem.

dazavala commented 5 months ago

Marked feature jca-1.7 as completed. InstantOn support for Jakarta Connectors, in addition to Message-Driven Jakarta Enterprise Beans, was delivered in epic https://github.com/OpenLiberty/open-liberty/issues/26039.