Community

Best way to acquire pojo cache references in MDBs

created by Lefteris Koutsoloukas in JBoss Cache - View the full discussion

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

Reply to this message by going to Community

Start a new discussion in JBoss Cache at Community