Fork me on GitHub

Utilising the EJB plug-in in conjunction with the JNDI plug-in, allows OfficeFloor to orchestrate EJB's.

As the JNDI plug-in allows invoking methods on JNDI retrieved objects (i.e. EJB's) and the EJB plug-in runs OfficeFloor under container management as an EJB, the two plug-ins can be used together along with OfficeFloor's graphical configuration to orchestrate EJB's.

The resulting execution would be:

  1. Client code requests the OfficeFloorEjb from the Application Server
  2. Application Server creates the OfficeFloorEJB within the appropriate contexts
  3. OfficeFloorEjb is invoked by client code (Application Server ensures appropriate context for running)
  4. OfficeFloorEjb invokes the appropriate Work for its configured OfficeFloor (and waits for Work to complete)
  5. Within the OfficeFloor Work execution, various EJB's are looked up and their methods executed (i.e. the EJB orchestration)
  6. Work completes and control is returned to the client code (after Application Server completes context functions such as commit transactions)

Changes to the OfficeFloor's graphical configuration would allow different EJB's to be invoked and there by achieving the EJB orchestration.