mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-12 22:24:47 +00:00
Use the correct JGroups stacks.xml
Reduce use of "multiplexer" in names; use JGroups Small Javadoc changes git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@14353 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
parent
6796d3f7c3
commit
fb7a74ae63
@ -54,7 +54,7 @@ public class SharedCacheInstanceManager implements CacheInstanceManager {
|
|||||||
private static final Logger log = LoggerFactory.getLogger(SharedCacheInstanceManager.class);
|
private static final Logger log = LoggerFactory.getLogger(SharedCacheInstanceManager.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classpath or filesystem resource identifying containing JBoss Cache
|
* Classpath or filesystem resource containing JBoss Cache
|
||||||
* configuration settings the {@link Cache} should use.
|
* configuration settings the {@link Cache} should use.
|
||||||
*
|
*
|
||||||
* @see #DEFAULT_CACHE_RESOURCE
|
* @see #DEFAULT_CACHE_RESOURCE
|
||||||
@ -66,20 +66,18 @@ public class SharedCacheInstanceManager implements CacheInstanceManager {
|
|||||||
*/
|
*/
|
||||||
public static final String DEFAULT_CACHE_RESOURCE = "treecache.xml";
|
public static final String DEFAULT_CACHE_RESOURCE = "treecache.xml";
|
||||||
/**
|
/**
|
||||||
* Classpath or filesystem resource identifying containing JGroups protocol
|
* Classpath or filesystem resource containing JGroups protocol
|
||||||
* stack configurations the <code>org.jgroups.ChannelFactory</code>
|
* stack configurations the <code>org.jgroups.ChannelFactory</code>
|
||||||
* should use.
|
* should use.
|
||||||
*
|
*
|
||||||
* @see #DEF_MULTIPLEXER_RESOURCE
|
* @see #DEF_JGROUPS_RESOURCE
|
||||||
*/
|
*/
|
||||||
public static final String CHANNEL_FACTORY_RESOURCE_PROP = "hibernate.cache.region.jbc2.cfg.multiplexer.stacks";
|
public static final String CHANNEL_FACTORY_RESOURCE_PROP = "hibernate.cache.region.jbc2.cfg.jgroups.stacks";
|
||||||
/**
|
/**
|
||||||
* Default value for {@link #CHANNEL_FACTORY_RESOURCE_PROP}. Specifies
|
* Default value for {@link #CHANNEL_FACTORY_RESOURCE_PROP}. Specifies
|
||||||
* "stacks.xml", which can be found in the root of the JGroups jar file.
|
* the "jgroups-stacks.xml" file in this package.
|
||||||
* Thus, leaving this value at default means using the default protocol
|
|
||||||
* stack configs provided by JGroups.
|
|
||||||
*/
|
*/
|
||||||
public static final String DEF_MULTIPLEXER_RESOURCE = "stacks.xml";
|
public static final String DEF_JGROUPS_RESOURCE = "org/hibernate/cache/jbc2/builder/jgroups-stacks.xml";
|
||||||
|
|
||||||
private Cache cache;
|
private Cache cache;
|
||||||
private ChannelFactory channelFactory;
|
private ChannelFactory channelFactory;
|
||||||
@ -136,7 +134,7 @@ public void start(Settings settings, Properties properties) throws CacheExceptio
|
|||||||
if (cache == null) {
|
if (cache == null) {
|
||||||
|
|
||||||
if (channelFactory == null) {
|
if (channelFactory == null) {
|
||||||
String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_MULTIPLEXER_RESOURCE);
|
String muxStacks = PropertiesHelper.getString(CHANNEL_FACTORY_RESOURCE_PROP, properties, DEF_JGROUPS_RESOURCE);
|
||||||
if (muxStacks != null) {
|
if (muxStacks != null) {
|
||||||
channelFactory = new JChannelFactory();
|
channelFactory = new JChannelFactory();
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user