Version 9

    Project Info

     

    The CDI integration module is an extension to Errai leverages the portable extension SPI, that's part of the CDI specification. It allows you to use CDI components as as service implementation and invoke on them from a GWT application.

     

     

     

     

    Architecture & Design

    Service Discovery

     

    • Provide injection points for Errai Components
    • Discover Errai annotations during CDI bootstrap
    • Provide service proxies

     

    Screen shot 2010-06-10 at 11.07.44 AM.png

    Invocation Handling

    • Encapsulated in invocation proxy
    • Lookup bean reference (instance)
    • Context & Scope managed by CDI

     

    Screen shot 2010-06-10 at 11.05.39 AM.png

    Programming Model & Use Cases

     

    The integration layer targets three main use cases:

     

    • Pub/Sub with CDI components
    • Exposing CDI components by RPC interface
    • Integration with the CDI event subsystem

     

     

    Pub/Sub

     

    • Most low level use cases
    • (Errai Bus, Pub/Sub)
    • Similar to MessageDriven Bean
    • (actual maps to it)
    • Service implementation fully managed by CDI container
    • Message Bus instance injected

     

    Screen shot 2010-06-10 at 11.11.38 AM.png

     

     

    RPC Interfaces

     

     

    • Exposes a typed interface
    • Similar to EJB Session beans (maps to it)
    • RPC style, type safe client API

     

    Screen shot 2010-06-10 at 11.11.47 AM.png

     

     

    Eventing

     

     

    • Bi-directional event exchange
    • Discriminate on:
      - Event Type
      - Qualifier Annotations
    • Exposes high level CDI client API
    • Integrate with default and custom CDI events

     

     

     

    Screen shot 2010-06-10 at 11.11.55 AM.png