1 Reply Latest reply on Aug 11, 2005 4:58 AM by epbernard

    Entities & Criteria

    yuriy_zubarev

      Greetings,

      We are designing a new system and considering using EJB3 for it. One of the issues we are trying to resolve is how to pass search criteria from presentation layer to EJB layer. On the previous project we used OJB and Criteria class from OJB. It worked like a charm: presentation layer would populate Criteria object based on user's selection on a wep page and pass it to EJB where it was used as it was without any modifications. It was very convenient and uniformed. Now what does EJB3 have to offer? Presentation layer constructing EJB QL? This doesn't seem right. Presentation layer passing a Map of fields/values to be used in querying database to EJB and the EJB using it to construct EJB QL? I remember doing the same with Maps and JDBC/SQL 4 years ago and it was quite messy and not elegant at all.

      Any thoughts?

      Regards,
      Yuriy