0 Replies Latest reply on Apr 12, 2010 5:55 AM by Lefteris Koutsoloukas

    Best way to acquire pojo cache references in MDBs

    Lefteris Koutsoloukas Newbie

      Hello everyone,

       

      I need to use PojoCache inside various Message Driven Beans in my application.

      What is the best way to acquire the reference to the pojo cache inside the MDB?

       

      Is it ok if inside every onMessage() i acquire a reference through a  PojoCacheFactory.createCache(configFile, toStart);

      Is this creating a new instance every time or is it returning a singleton?

      Is this killing performance/memory or not?

       

      Is is possible to configure a cache instance somewhere and bind it to JNDI?

       

      What if I deploy it with the Jboss microcontainer method, how do I get a reference to it?

       

      Thanks in advance

       

      Lefteris