Description of problem: Whenever the customer is adding size properties of infinispan second level cache, in his persistence-unit, it ends up not being discovered in JON. BZ1239024 was open against JON, but concluded that the issue was in EAP. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. deploy hibernate4 from quickstart : jboss-eap-6.3.0-quickstarts.zip 2 .Notice the PU is there 3. Add the following properties in persistence.xml ============================================================================== <property name="hibernate.cache.region_prefix" value="database_cache_postgres_webtng"/> <!-- Dimensionamento circa ad 1GB di heap necessario per il numero totale di oggetti riportato --> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_core.eviction.max_entries" value="22969" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_misc.eviction.max_entries" value="66605" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_binary.eviction.max_entries" value="232" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_readonly.eviction.max_entries" value="2832" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_eden.eviction.max_entries" value="5726" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_wms.eviction.max_entries" value="358534" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_wms_query.eviction.max_entries" value="26221" /> <!-- Valori espressi in millisecondi: 5min = 300000; 15 min = 900000; 1 h = 3600000 --> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_readonly.expiration.lifespan" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_core.expiration.lifespan" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_misc.expiration.lifespan" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_binary.expiration.lifespan" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_eden.expiration.lifespan" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_wms.expiration.lifespan" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_wms_query.expiration.lifespan" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_readonly.expiration.max_idle" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_core.expiration.max_idle" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_misc.expiration.max_idle" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_binary.expiration.max_idle" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_eden.expiration.max_idle" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_wms.expiration.max_idle" value="900000" /> <property name="hibernate.cache.infinispan.database_cache_postgres_webtng.wp_wms_query.expiration.max_idle" value="900000" /> ============================================================================== 4. Redeploy the app 5. Notice the PU is no longer available Actual results: The PU is not available Expected results: The PU should be available Additional info:
Hello, Apologies for the delay: I tried myself,and the issue is still there, later on, Dave++ found out that the App doesn't sent PU information on purpose, when region_prefix is property is used. https://issues.jboss.org/browse/AS7-4441 This is a code snippet from org.jboss.as.jpa.processor.PersistenceUnitServiceHandler private static void addManagementConsole(final DeploymentUnit deploymentUnit, final PersistenceUnitMetadata pu, final PersistenceProviderAdaptor adaptor) { ManagementAdaptor managementAdaptor = adaptor.getManagementAdaptor(); // workaround for AS7-4441, if a custom hibernate.cache.region_prefix is specified, don't show the persistence // unit in management console. if (managementAdaptor != null && adaptor.doesScopedPersistenceUnitNameIdentifyCacheRegionName(pu)) { That issue seems to be solved and it's about jmx-console, but the same behaviour is still happening, as test on EAP-6.3.0 and JON-3.3.0 The PU wont show up in EAP and JON . Only by setting these: <property name="hibernate.cache.use_second_level_cache" value="true"/> <property name="hibernate.cache.region_prefix" value="myprefix"/> <property name="hibernate.cache.infinispan.myprefix.MyEntity.cfg" value="MyEntity-Cache"/> <property name="hibernate.cache.infinispan.myprefix.MyEntity.expiration.max_idle" value= "65123"/> <property name="hibernate.cache.infinispan.myprefix.MyEntity.eviction.max_entries" value= "10000"/> <property name="hibernate.cache.infinispan.myprefix.MyEntity.expiration.lifespan" value= "50000"/> <property name="hibernate.cache.infinispan.myprefix.MyEntity.expiration.max_idle" value= "50000"/> according to this kcs: https://access.redhat.com/solutions/440683 Although, the PU is deployed correctly, and works as expected. Cheers
Scott Marlow <scott.marlow> updated the status of jira WFLY-5478 to Closed
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
Verified with EAP 6.4.8.CP.CR2 If you use hibernate.cache.region_prefix you also have to set jboss.as.jpa.scopedname on the same value.
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.