[jboss-user] [JBossCache] - Sharing object with READ_COMMITED?
do-not-reply at jboss.com
Thu Mar 13 20:12:27 EDT 2008
Hi to all,
I'm working on my first project using EJB 3.0 and I'm facing some difficulties.
Long story short, I basically want to share an object across several (stateless and mdb) bean instances; the object is costly (as in minutes might be required) to build and for this reason I would like to just build it once and keep a single instance in memory. The object is kind of like a tree, where read and updates can be performed. I could end up having several of this costly objects laying around (with different internal data).
What I would like is some sort of mechanism similar to READ_COMMITED for databases (reads at any time as long as there are no writes going on) to manage the concurrency access to the object.
I understand EJB's specs state that developers should not manage the synchronization of objects, especially resources.
I'm using JBoss 4.2.2, so I'm taking a look at JBoss Cache 1.4.x, but I can't quite figure out the right approach to the problem.
Could somebody please show me a high overview of how JBoss Cache could be used in this context?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136494#4136494
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4136494
More information about the jboss-user