When you say EJB3, are these objects EJB3/JPA entities?
I'm still in the design phase, so I don't know exactly what this objects I want to share will end up being. I know their general structure and the information they will hold.
From some search around it seems like making them entities would allow some good results, but I'm concerned about the performance issues.
Anyway, as I'm still designing, I'm very open to any inputs you might have.
Is making them entities preferable over, say, having them serializable and managed by JBoss Cache or similar frameworks? What about using the JNDI to expose them? (but then there are all the synchronization issues that arise...)
There are many tradeoffs that you need to consider, which are specific to your app's requirements.
If the objects are EJB3 entities, they will already be cached in the 2nd-level cache. JBoss's EJB3 JPA implementation uses Hibernate, which in turn uses JBoss Cache.
Thanks for the reply manik.
What if I wanted to have the shared objects as POJOs? Can I use JBoss Cache or other frameworks to share them and coordinate their access?