HHH-10545 InfinispanRegionFactory inadvertently starts the default cache during stop()
This commit is contained in:
parent
38a6f08897
commit
b03947e4a5
|
@ -495,8 +495,7 @@ public class InfinispanRegionFactory implements RegionFactory {
|
||||||
|
|
||||||
protected void stopCacheRegions() {
|
protected void stopCacheRegions() {
|
||||||
log.debug( "Clear region references" );
|
log.debug( "Clear region references" );
|
||||||
getCacheCommandFactory( manager.getCache().getAdvancedCache() )
|
getCacheCommandFactory().clearRegions( regionNames );
|
||||||
.clearRegions( regionNames );
|
|
||||||
regionNames.clear();
|
regionNames.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -557,7 +556,7 @@ public class InfinispanRegionFactory implements RegionFactory {
|
||||||
|
|
||||||
private void startRegion(BaseRegion region, String regionName) {
|
private void startRegion(BaseRegion region, String regionName) {
|
||||||
regionNames.add( regionName );
|
regionNames.add( regionName );
|
||||||
getCacheCommandFactory( region.getCache() ).addRegion( regionName, region );
|
getCacheCommandFactory().addRegion( regionName, region );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void parseProperty(int prefixLoc, String key, String value) {
|
private void parseProperty(int prefixLoc, String key, String value) {
|
||||||
|
@ -689,8 +688,8 @@ public class InfinispanRegionFactory implements RegionFactory {
|
||||||
return createCacheWrapper( cache );
|
return createCacheWrapper( cache );
|
||||||
}
|
}
|
||||||
|
|
||||||
private CacheCommandFactory getCacheCommandFactory(AdvancedCache cache) {
|
private CacheCommandFactory getCacheCommandFactory() {
|
||||||
final GlobalComponentRegistry globalCr = cache.getComponentRegistry().getGlobalComponentRegistry();
|
final GlobalComponentRegistry globalCr = manager.getGlobalComponentRegistry();
|
||||||
|
|
||||||
final Map<Byte, ModuleCommandFactory> factories =
|
final Map<Byte, ModuleCommandFactory> factories =
|
||||||
(Map<Byte, ModuleCommandFactory>) globalCr.getComponent( "org.infinispan.modules.command.factories" );
|
(Map<Byte, ModuleCommandFactory>) globalCr.getComponent( "org.infinispan.modules.command.factories" );
|
||||||
|
|
Loading…
Reference in New Issue