Discussions

EJB design: pls help with a good design pattern

  1. pls help with a good design pattern (3 messages)

    I am designing a java class (API) that keeps track of number of times certain evets happen in EJB container. Primary concern is this collected data should not be persistent(for efficiency purposes). And this collected data will be sweeped by polling modules periodically.
    If more than one instance of an EJB is updating this collector instance there are sync problems, so I wish I can utilize container managed concurrency.... Is this possible without persistence, or is there any singleton object than can reside inside a container... or you would say JMS store, oh no.. just simple programmable thing.

    Thanks,
    Srini
  2. Why not just synchronize the update methods?

    Tom
  3. pls help with a good design pattern[ Go to top ]

    Do u mean sysnchronising the updates !! what about performance then ??

    MaX
  4. Thanks Tom,
     That helps, I donot earlier that we can use synchronized in EJB. Confused with what to use and what not to in the container...
    bye
    srini