0 Replies Latest reply on Nov 13, 2006 11:51 AM by ahachmann

    Singleton or Application Scope


      I need to build an EJB that collects data during the Servers Lifetime.
      This EJB will be invoked each time a client is invoking a Webservice so that I can collect some Statistics. So there shall only be one Instance in the pool for the reason that EJB forbids to use static fields. (is this definition by the way?)

      Next Problem is, that this EJB shall be timed. There is a method that measures the heap each minute. Now having 5 Beans in the pool, the heap will be measured 5 times. This is not what i want.

      Which would be the best way to set up such an EJB?