Programming EJB 3 in an EJB 2.1 environment with CUBA


News: Programming EJB 3 in an EJB 2.1 environment with CUBA

  1. CUBA is a very small and easy to use open source development toolkit for the design of Java components which can be run as 2.1 or 3.0 EJBs, as AXIS web services or in a stand-alone J2SE application. CUBA has just released its version 2.0.0 with an API and component model equivalent to the EJB 3.0 SessionBean model.

    When using CUBA in an EJB 3 environment, the framework just acts as an ultra-thin compatibility layer to avoid dependencies of a JavaEE 5 runtime environment. In an EJB 2.1 environment, CUBA transparently adds the new features like dependency injection or around-invocations. In AXIS- and J2SE-environments, the components are run in CUBA's own mini-container which provides all container services like transactions, resource management, and lookup service. The framework therefore helps to ease different problems by a single, simple solution.

     - Smooth migration from EJB 2.1 to EJB 3
     - Efficient component testing without application server
     - Reuse of components in various runtime environments without code changes

    CUBA 2.0.0 does not yet support the new Java Persistence API which hasn't reached a stable state by now. However, the delivery archive includes integration examples for the open source O/R mappers OJB 1.0, PriDE 2.3, and Hibernate 3.1. The upcoming Persistence API will also be supported by just integrating compliant existing persistence managers rather than re-implementing that wheel. So this will definitely come very soon.

    CUBA is available for Java 5 and JDK 1.4. The JDK 1.4 version is a pure subset which was reduced by Java annotation support. Components based on this release must use XML deployment descriptors while the full CUBA version supports both descriptors and code annotations.
  2. Boy, it is very cold in this house.

  3. Yes indeed! Sometimes I have the impression that people just don't believe that it is actually possible what the posting says. But it is! All in one 150k library, including code and adapter generators.