0 Replies Latest reply on Jul 3, 2005 4:21 AM by yoav abrahami

    Design Issue (and can I use EJB 3 - is it stable)?

    yoav abrahami Newbie

      I am about to start working with JBoss as an Application Server.
      I need to write a system that services a number of applications, giving all the applications read access to BO (Business Objects), and one application write access.
      The application that has write access to the BO should also be able to work with off-line copies of the BO, save those to XML, and compare XML repository with what is in the database.

      My BO are complex objects, mapped to existing database, to numerous tables.

      I have seen that I can accoplish what I want using:

      plain EJB 2 - requires a lot of coding of the one-to-one and one-to-many relations between the objects, dependencies, ect. Requires writing for each entity bean another POJO class to handle off-line work (work outside the application server). I get out of the box concurrency, transactions and caching of the entity beans.

      Hybernate (with EJB 2) - simplefies mapping of complex objects, allows the use of the same class in the AS and off-line (outside of the AS). however (as I understand) I loss the memory caching of the objects (each request for an object will load it from database, even for frequetly used objects). Also, child objects of BO are POJOs and transfared by serialization between application, which is less efficient then EJB entity beans that are passed as remote interfaces (or local interfaces between applications on the same server).

      EJB 3 - seem to be the perfect fit - provides the advantages of both Hybernate and EJB 2. I get usage of POJOs, complex mapping of objects to the database, object caching and use of the same class in the AS and off-line. However, EJB 3 is still in beta phase. Can I relay on EJB 3 for production application?