1 Reply Latest reply on Jun 25, 2002 3:45 AM by lasterra

    EJB session facade design pattern

    sk4567

      Hi,
      I am using a session facade architecture in my application.In my session bean business method...is it OK to use sql queries to retreive data from tables whcih are to be used for the business logic..or is it advisable to use only finder methods ...Which would require less overhead in terms of network overhead time etc...would the finder methods be more suitable?
      The other aspect is since if I require a data from a table in the database just for display and I am not doing any other transactions with that table ..does it make sense to make an Entity bean justt for one transaction...
      would it not call for a lot of extra overhead (in term of man hours).Moreover, if the number and size of tables are very large this would increase even more.
      Please advise..as iam confused so as to what the optimum design pattern would be.

        • 1. Re: EJB session facade design pattern
          lasterra

          ummm. A lot of questions. If you search in this forum you'll get the answer.

          In general, for read-only querys, SQL in the session façade is faster than finder methods. But if you always get the same records of the tables, the entity cache will be faster than repeat the same SQL statement, becouse this data is cached.

          HTH.