Ensure segregation of deployments in the 2nd level cache
--------------------------------------------------------
Key: EJBTHREE-954
URL:
http://jira.jboss.com/jira/browse/EJBTHREE-954
Project: EJB 3.0
Issue Type: Feature Request
Components: Clustering
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Fix For: AS 4.2.0 GA
The JBoss Cache used for the clustered EJB3 entity 2nd level cache is shared across
deployments. As a result it is possible that different deployments will deploy the same
classes, in which case the contents of the bean caches will be mixed and cached queries
that don't specify a region will be mixed in the default region. In the case of bean
caching, this can lead to
1) classloader issues where the JGroups up_thread can't determine the correct
classloader to use to deserialize replication messagaes
2) the cache region that is inadvertently being shared can be inactivated if one of the
deployments is undeployed.
3) Inability to replicate the default query cache region due to potential classloader
problems a la #1 above.
These issues can be avoided if a unique hibernate.cache.region_prefix is provided for each
deployment. The provided prefix should be used as the first level of FQNs in the cache.
If the user doesn't specify this property, the EJB3 deployer should create one from
the name of the deployment package + the persistence unit name.
If the EJB3 deployer creates the region_prefix, it should replace any '.' (e.g.
xyz.jar) with an '_'. Otherwise org.hibernate.cache.TreeCache will convert the
'.' to '/' and that will then become a level in the FQN.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira