6 Replies Latest reply on Aug 15, 2005 2:22 PM by Henrik Johansson

    App Data Loading in EJB 3.0

    Henrik Johansson Newbie

      Hi,

      I posted this question in the J2EE Design Patterns forum part yesterday but seem to get no reaction. Maybe this is a more suitable place for asking this?

      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=67687


      I'm new to EJB and especially EJB 3.0 (but then, who isn't?). I am to develop a portable EJB 3.0 application with a web front-end and my question is:

      What is the best practise of loading static data from property files (.properties, .xml, ...) as well as from a database. Should this be done using a stateless session bean? It would be preferrable to avoid unnecessary trips to files and db. The data should be initialized in the bussines tier but should also be reachable / usable by the web tier.

      I have checked out the DataLoader of the DVD Store Demo Application (http://www.jboss.com/docs/demos) and that looks pretty interesting. Is this a good approach? Would it for example be proper for this class to store values in fields once retreived through the DVDManagerBean, or does this break things like scalability?


      I'm looking for a nice way of reading configuration data for the application and then to store this in a specific class. Has there come up any new best practises regarding this with the new EJB 3.0 standard? Has it come up with any new posibilities? (I do not want to use MBeans or JMXServices due to portability issues.) What posibilities does caching bring, and how?

      /Henrik