EJB programming & troubleshooting: Persistent memory area used from StateLessSessionBean

  1. Hi,
    I'm developing an application using StateLessSessionBean and I whish to have a persistent memory area where store and retrieve informations about users who has execute an initial step of the procedure (login).
    I have defined a static class variable inside an abstract class extended by all my EJB and it's work, but I tink isn't the good way to do it.
    Define a static class variable inside a SLSB is how define a state for a stateless EJB?
    Moreover deployment on Borland 4.5.1 warning me that the static class variable should be also final!
    Someone can help me?
    Roberto Bonsignori
  2. I would persist the state in DB or a flat file
  3. If its required only for the time ur app is running ; I might as well put it in a singleton ;or else I will go for a database persistence.
  4. Singleton..... as long as there is only one VM its fine