2 Replies Latest reply on Nov 23, 2006 12:46 AM by Srdjan Djuricic

    singleton ejb, loading classes from config.xml file?

    Srdjan Djuricic Newbie

      Hello,

      I have a question regarding design in EJB.

      Should I use a singleton in my MDB or in stateless session beans. I have a servlet that calls a stateless session bean that calls a message driven bean. In the message driven bean constructor I call a singleton to set the mdb class variable. This singleton class reads the configuration file and initializes some framework classes.

      Is this ok to do initialization of classes from a configuration files and thus have singletons? In this configuration file I basically have something like a map between the xml message tab and the request class for that message and well as the action processor

      Thanks,