Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-779

Refactor EventBusService as a @RequestScoped service, and have it own the guava EventBus as a field.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: core-1.4.0
    • Fix Version/s: core-1.8.0
    • Component/s: Core
    • Labels:
      None

      Description

      Originally this ticket was raised as a bug to the effect that "EventBus should not re-register services on open/close; this is not thread-safe."

      Subsequent analysis shows that isn't actually the case; the current design is thread-safe.

      How it works is that, although EventBusServiceDefault is application-scoped, the guava EventBus itself is obtained from the PersistenceSession, ie is in effect for the session.

      It would however be preferrable to convert EventBusService(Default) into a request-scoped, and then having it simply new up the guava EventBus each time. The only real issue is the ordering of the service injection; the domain services do a reverse callback to the EventBusService in the setterXxx() / injectXxx()
      ; there might be ordering issues.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                danhaywood Dan Haywood
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: