Author: trang_vu
Date: 2011-08-17 00:54:32 -0400 (Wed, 17 Aug 2011)
New Revision: 4761
Added:
jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1634/readme.txt
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1634/JCR-1634.patch
Log:
JCR-1634: Find a way to have a name for MBeans of JBossCaches used by the JCR
Fix description
* Set MBeans name of JBossCache explicitly.
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2011-08-17
04:02:33 UTC (rev 4760)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2011-08-17
04:54:32 UTC (rev 4761)
@@ -16,6 +16,7 @@
*/
package org.exoplatform.services.jcr.impl.core.lock.jbosscache;
+import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.management.annotations.Managed;
import org.exoplatform.management.annotations.ManagedDescription;
@@ -63,6 +64,7 @@
import org.jboss.cache.Node;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
+import org.jboss.cache.jmx.JmxRegistrationManager;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.loader.CacheLoaderManager;
import org.jboss.cache.lock.TimeoutException;
@@ -168,9 +170,12 @@
*/
private Map<String, CacheableSessionLockManager> sessionLockManagers;
+ private final JmxRegistrationManager jmxManager;
+
/**
* Constructor.
*
+ * @param ctx The container context
* @param dataManager - workspace persistent data manager
* @param config - workspace entry
* @param context InitialContextInitializer, needed to reload context after JBoss
cache creation
@@ -178,32 +183,33 @@
* the transaction service
* @throws RepositoryConfigurationException
*/
- public CacheableLockManagerImpl(WorkspacePersistentDataManager dataManager,
WorkspaceEntry config,
+ public CacheableLockManagerImpl(ExoContainerContext ctx,
WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
InitialContextInitializer context, TransactionService transactionService,
ConfigurationManager cfm,
LockRemoverHolder lockRemoverHolder) throws RepositoryConfigurationException,
RepositoryException
{
- this(dataManager, config, context, transactionService.getTransactionManager(), cfm,
lockRemoverHolder);
+ this(ctx, dataManager, config, context, transactionService.getTransactionManager(),
cfm, lockRemoverHolder);
}
/**
* Constructor.
*
+ * @param ctx The container context
* @param dataManager - workspace persistent data manager
* @param config - workspace entry
* @param context InitialContextInitializer, needed to reload context after JBoss
cache creation
* @throws RepositoryConfigurationException
*/
- public CacheableLockManagerImpl(WorkspacePersistentDataManager dataManager,
WorkspaceEntry config,
+ public CacheableLockManagerImpl(ExoContainerContext ctx,
WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
InitialContextInitializer context, ConfigurationManager cfm, LockRemoverHolder
lockRemoverHolder)
throws RepositoryConfigurationException, RepositoryException
{
- this(dataManager, config, context, (TransactionManager)null, cfm,
lockRemoverHolder);
-
+ this(ctx, dataManager, config, context, (TransactionManager)null, cfm,
lockRemoverHolder);
}
/**
* Constructor.
*
+ * @param ctx The container context
* @param dataManager - workspace persistent data manager
* @param config - workspace entry
* @param context InitialContextInitializer, needed to reload context after JBoss
cache creation
@@ -211,7 +217,7 @@
* the transaction manager
* @throws RepositoryConfigurationException
*/
- public CacheableLockManagerImpl(WorkspacePersistentDataManager dataManager,
WorkspaceEntry config,
+ public CacheableLockManagerImpl(ExoContainerContext ctx,
WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
InitialContextInitializer context, TransactionManager transactionManager,
ConfigurationManager cfm,
LockRemoverHolder lockRemoverHolder) throws RepositoryConfigurationException,
RepositoryException
{
@@ -260,6 +266,11 @@
// Add the cache loader needed to prevent TimeoutException
addCacheLoader();
cache.start();
+ this.jmxManager = ExoJBossCacheFactory.getJmxRegistrationManager(ctx, cache,
"LOCK_CACHE");
+ if (jmxManager != null)
+ {
+ jmxManager.registerAllMBeans();
+ }
createStructuredNode(lockRoot);
@@ -786,6 +797,10 @@
sessionLockManagers.clear();
cache.stop();
+ if (jmxManager != null)
+ {
+ jmxManager.unregisterAllMBeans();
+ }
}
/**
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2011-08-17
04:02:33 UTC (rev 4760)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2011-08-17
04:54:32 UTC (rev 4761)
@@ -18,9 +18,10 @@
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.index.Term;
+import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.WildcardQuery;
-import org.apache.lucene.search.BooleanClause.Occur;
+import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.document.DocumentReaderService;
import org.exoplatform.services.jcr.config.QueryHandlerEntry;
@@ -134,10 +135,14 @@
protected LuceneVirtualTableResolver virtualTableResolver;
protected IndexerChangesFilter changesFilter;
+
+ private final ExoContainerContext ctx;
/**
* Creates a new <code>SearchManager</code>.
*
+ * @param ctx
+ * The eXo Container context in which the SearchManager is registered
* @param config
* the search configuration.
* @param nsReg
@@ -159,12 +164,12 @@
* @throws RepositoryConfigurationException
*/
- public SearchManager(QueryHandlerEntry config, NamespaceRegistryImpl nsReg,
NodeTypeDataManager ntReg,
+ public SearchManager(ExoContainerContext ctx, QueryHandlerEntry config,
NamespaceRegistryImpl nsReg, NodeTypeDataManager ntReg,
WorkspacePersistentDataManager itemMgr, SystemSearchManagerHolder
parentSearchManager,
DocumentReaderService extractor, ConfigurationManager cfm, final
RepositoryIndexSearcherHolder indexSearcherHolder)
throws RepositoryException, RepositoryConfigurationException
{
-
+ this.ctx = ctx;
this.extractor = extractor;
indexSearcherHolder.addIndexSearcher(this);
this.config = config;
@@ -625,6 +630,14 @@
}
/**
+ * @return the ctx
+ */
+ public ExoContainerContext getExoContainerContext()
+ {
+ return ctx;
+ }
+
+ /**
* Initialize changes filter.
* @throws RepositoryException
* @throws RepositoryConfigurationException
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java 2011-08-17
04:02:33 UTC (rev 4760)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java 2011-08-17
04:54:32 UTC (rev 4761)
@@ -16,6 +16,7 @@
*/
package org.exoplatform.services.jcr.impl.core.query;
+import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.document.DocumentReaderService;
import org.exoplatform.services.jcr.config.QueryHandlerEntry;
@@ -56,11 +57,11 @@
public static final String INDEX_DIR_SUFFIX = "system";
- public SystemSearchManager(QueryHandlerEntry config, NamespaceRegistryImpl nsReg,
NodeTypeDataManager ntReg,
+ public SystemSearchManager(ExoContainerContext ctx, QueryHandlerEntry config,
NamespaceRegistryImpl nsReg, NodeTypeDataManager ntReg,
WorkspacePersistentDataManager itemMgr, DocumentReaderService service,
ConfigurationManager cfm,
RepositoryIndexSearcherHolder indexSearcherHolder) throws RepositoryException,
RepositoryConfigurationException
{
- super(config, nsReg, ntReg, itemMgr, null, service, cfm, indexSearcherHolder);
+ super(ctx, config, nsReg, ntReg, itemMgr, null, service, cfm,
indexSearcherHolder);
}
@Override
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2011-08-17
04:02:33 UTC (rev 4760)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java 2011-08-17
04:54:32 UTC (rev 4761)
@@ -38,6 +38,7 @@
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig;
import
org.jboss.cache.config.CacheLoaderConfig.IndividualCacheLoaderConfig.SingletonStoreConfig;
+import org.jboss.cache.jmx.JmxRegistrationManager;
import java.io.IOException;
import java.io.Serializable;
@@ -60,6 +61,8 @@
private final Cache<Serializable, Object> cache;
+ private final JmxRegistrationManager jmxManager;
+
public static final String LISTWRAPPER = "$lists".intern();
/**
@@ -117,6 +120,11 @@
this.cache.getConfiguration().setCacheLoaderConfig(cacheLoaderConfig);
this.cache.create();
this.cache.start();
+ this.jmxManager =
ExoJBossCacheFactory.getJmxRegistrationManager(searchManager.getExoContainerContext(),
cache, "INDEX_CACHE");
+ if (jmxManager != null)
+ {
+ jmxManager.registerAllMBeans();
+ }
// start will invoke cache listener which will notify handler that mode is changed
IndexerIoMode ioMode =
((CacheSPI)cache).getRPCManager().isCoordinator() ? IndexerIoMode.READ_WRITE :
IndexerIoMode.READ_ONLY;
@@ -178,4 +186,23 @@
log.warn("Exception occure when errorLog writed. Error log is not complete.
" + ioe, ioe);
}
}
+
+ /**
+ * @see java.lang.Object#finalize()
+ */
+ @Override
+ protected void finalize() throws Throwable
+ {
+ try
+ {
+ if (jmxManager != null)
+ {
+ jmxManager.unregisterAllMBeans();
+ }
+ }
+ finally
+ {
+ super.finalize();
+ }
+ }
}
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2011-08-17
04:02:33 UTC (rev 4760)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2011-08-17
04:54:32 UTC (rev 4761)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache;
+import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.jcr.access.AccessControlList;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
@@ -49,6 +50,8 @@
import org.jboss.cache.Node;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
+import org.jboss.cache.jmx.JmxRegistrationManager;
+import org.picocontainer.Startable;
import java.io.IOException;
import java.io.Serializable;
@@ -98,7 +101,7 @@
* @author <a href="mailto:peter.nedonosko@exoplatform.com">Peter
Nedonosko</a>
* @version $Id: JBossCacheWorkspaceStorageCache.java 13869 2008-05-05 08:40:10Z
pnedonosko $
*/
-public class JBossCacheWorkspaceStorageCache implements WorkspaceStorageCache
+public class JBossCacheWorkspaceStorageCache implements WorkspaceStorageCache, Startable
{
private static final Log LOG =
ExoLogger.getLogger("exo.jcr.component.core.JBossCacheWorkspaceStorageCache");
@@ -143,6 +146,8 @@
protected final Fqn<String> childPropsList;
+ private JmxRegistrationManager jmxManager;
+
/**
* Node order comparator for getChildNodes().
*/
@@ -266,12 +271,13 @@
/**
* Cache constructor with eXo TransactionService support.
*
+ * @param ctx The container context
* @param wsConfig WorkspaceEntry workspace config
* @param transactionService TransactionService external transaction service
* @throws RepositoryException if error of initialization
* @throws RepositoryConfigurationException if error of configuration
*/
- public JBossCacheWorkspaceStorageCache(WorkspaceEntry wsConfig, TransactionService
transactionService,
+ public JBossCacheWorkspaceStorageCache(ExoContainerContext ctx, WorkspaceEntry
wsConfig, TransactionService transactionService,
ConfigurationManager cfm) throws RepositoryException,
RepositoryConfigurationException
{
if (wsConfig.getCache() == null)
@@ -317,9 +323,17 @@
LOG.info("Using BufferedJBossCache compatible with Expiration
algorithm.");
}
+ if (ctx != null)
+ {
+ this.jmxManager = ExoJBossCacheFactory.getJmxRegistrationManager(ctx,
parentCache, "JCR_CACHE");
+ if (jmxManager != null)
+ {
+ jmxManager.registerAllMBeans();
+ }
+ }
// if expiration is used, set appropriate factory with with timeout set via
configuration (or default one 15minutes)
this.cache =
- new BufferedJBossCache(factory.createCache(wsConfig.getCache()), useExpiration,
wsConfig.getCache()
+ new BufferedJBossCache(parentCache, useExpiration, wsConfig.getCache()
.getParameterTime(JBOSSCACHE_EXPIRATION, JBOSSCACHE_EXPIRATION_DEFAULT));
this.itemsRoot = Fqn.fromElements(ITEMS);
@@ -341,19 +355,52 @@
}
/**
+ * Cache constructor with eXo TransactionService support.
+ *
+ * @param wsConfig WorkspaceEntry workspace config
+ * @param transactionService TransactionService external transaction service
+ * @throws RepositoryException if error of initialization
+ * @throws RepositoryConfigurationException if error of configuration
+ */
+ public JBossCacheWorkspaceStorageCache(WorkspaceEntry wsConfig, TransactionService
transactionService,
+ ConfigurationManager cfm) throws RepositoryException,
RepositoryConfigurationException
+ {
+ this(null, wsConfig, transactionService, cfm);
+ }
+
+ /**
* Cache constructor with JBossCache JTA transaction support.
*
+ * @param ctx The container context
* @param wsConfig WorkspaceEntry workspace config
* @throws RepositoryException if error of initialization
* @throws RepositoryConfigurationException if error of configuration
*/
- public JBossCacheWorkspaceStorageCache(WorkspaceEntry wsConfig, ConfigurationManager
cfm)
+ public JBossCacheWorkspaceStorageCache(ExoContainerContext ctx, WorkspaceEntry
wsConfig, ConfigurationManager cfm)
throws RepositoryException, RepositoryConfigurationException
{
- this(wsConfig, null, cfm);
+ this(ctx, wsConfig, null, cfm);
}
/**
+ * {@inheritDoc}
+ */
+ public void start()
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void stop()
+ {
+ if (jmxManager != null)
+ {
+ jmxManager.unregisterAllMBeans();
+ }
+ }
+
+ /**
* Checks if node with give FQN not exists and creates resident node.
* @param fqn
*/
Modified:
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
===================================================================
---
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2011-08-17
04:02:33 UTC (rev 4760)
+++
jcr/branches/1.12.x/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java 2011-08-17
04:54:32 UTC (rev 4761)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.jbosscache;
+import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
@@ -27,11 +28,13 @@
import org.jboss.cache.Cache;
import org.jboss.cache.CacheFactory;
import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.jmx.JmxRegistrationManager;
import org.jgroups.JChannelFactory;
import java.io.IOException;
import java.io.InputStream;
+import javax.management.ObjectName;
import javax.transaction.TransactionManager;
/**
@@ -181,4 +184,29 @@
}
return cache;
}
+
+ /**
+ * Gives the {@link JmxRegistrationManager} instance corresponding to the given
context
+ */
+ public static JmxRegistrationManager getJmxRegistrationManager(ExoContainerContext
ctx, Cache<?, ?> parentCache,
+ String cacheType)
+ {
+ try
+ {
+ ObjectName containerObjectName = ctx.getContainer().getScopingObjectName();
+ final String objectNameBase = containerObjectName.toString() +
",cache-type=" + cacheType;
+ return new JmxRegistrationManager(ctx.getContainer().getMBeanServer(),
parentCache, objectNameBase)
+ {
+ public String getObjectName(String resourceName)
+ {
+ return objectNameBase + JMX_RESOURCE_KEY + resourceName;
+ }
+ };
+ }
+ catch (Exception e)
+ {
+ log.error("Could not create the JMX Manager", e);
+ }
+ return null;
+ }
}
Modified: jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1634/JCR-1634.patch
===================================================================
--- jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1634/JCR-1634.patch 2011-08-17 04:02:33 UTC
(rev 4760)
+++ jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1634/JCR-1634.patch 2011-08-17 04:54:32 UTC
(rev 4761)
@@ -1,6 +1,6 @@
Index:
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
----
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java (revision
4445)
+---
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java (revision
4760)
+++
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java (working
copy)
@@ -16,6 +16,7 @@
*/
@@ -104,7 +104,7 @@
/**
Index:
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
----
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java (revision
4445)
+---
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java (revision
4760)
+++
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java (working
copy)
@@ -18,9 +18,10 @@
@@ -165,7 +165,7 @@
* @throws RepositoryConfigurationException
Index:
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java
===================================================================
----
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java (revision
4445)
+---
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java (revision
4760)
+++
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SystemSearchManager.java (working
copy)
@@ -16,6 +16,7 @@
*/
@@ -191,7 +191,7 @@
@Override
Index:
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java
===================================================================
----
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java (revision
4445)
+---
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java (revision
4760)
+++
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/jbosscache/JBossCacheIndexChangesFilter.java (working
copy)
@@ -38,6 +38,7 @@
import org.jboss.cache.config.CacheLoaderConfig;
@@ -248,7 +248,7 @@
}
Index:
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
----
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java (revision
4445)
+---
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java (revision
4760)
+++
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java (working
copy)
@@ -18,6 +18,7 @@
*/
@@ -258,7 +258,7 @@
import org.exoplatform.container.configuration.ConfigurationManager;
import org.exoplatform.services.jcr.access.AccessControlList;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
-@@ -46,6 +47,8 @@
+@@ -49,6 +50,8 @@
import org.jboss.cache.Node;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
@@ -267,7 +267,7 @@
import java.io.IOException;
import java.io.Serializable;
-@@ -95,7 +98,7 @@
+@@ -98,7 +101,7 @@
* @author <a href="mailto:peter.nedonosko@exoplatform.com">Peter
Nedonosko</a>
* @version $Id: JBossCacheWorkspaceStorageCache.java 13869 2008-05-05 08:40:10Z
pnedonosko $
*/
@@ -276,7 +276,7 @@
{
private static final Log LOG =
ExoLogger.getLogger("exo.jcr.component.core.JBossCacheWorkspaceStorageCache");
-@@ -140,6 +143,8 @@
+@@ -143,6 +146,8 @@
protected final Fqn<String> childPropsList;
@@ -285,7 +285,7 @@
/**
* Node order comparator for getChildNodes().
*/
-@@ -263,12 +268,13 @@
+@@ -266,12 +271,13 @@
/**
* Cache constructor with eXo TransactionService support.
*
@@ -300,7 +300,7 @@
ConfigurationManager cfm) throws RepositoryException,
RepositoryConfigurationException
{
if (wsConfig.getCache() == null)
-@@ -314,9 +320,17 @@
+@@ -317,9 +323,17 @@
LOG.info("Using BufferedJBossCache compatible with Expiration
algorithm.");
}
@@ -319,7 +319,7 @@
.getParameterTime(JBOSSCACHE_EXPIRATION, JBOSSCACHE_EXPIRATION_DEFAULT));
this.itemsRoot = Fqn.fromElements(ITEMS);
-@@ -338,19 +352,52 @@
+@@ -341,19 +355,52 @@
}
/**
@@ -376,7 +376,7 @@
*/
Index:
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java
===================================================================
----
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java (revision
4445)
+---
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java (revision
4760)
+++
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/jbosscache/ExoJBossCacheFactory.java (working
copy)
@@ -18,6 +18,7 @@
*/
Added: jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1634/readme.txt
===================================================================
--- jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1634/readme.txt (rev
0)
+++ jcr/branches/1.12.x/patch/1.12.10-GA/JCR-1634/readme.txt 2011-08-17 04:54:32 UTC (rev
4761)
@@ -0,0 +1,69 @@
+Summary
+
+ * Status: Find a way to have a name for MBeans of JBossCaches used by the JCR
+ * CCP Issue: CCP-1032, Product Jira Issue: JCR-1634.
+ * Complexity: medium
+
+The Proposal
+Problem description
+
+What is the problem to fix?
+
+ * Find a way to have a name for MBeans of JBossCaches used by the JCR
+
+Fix description
+
+How is the problem fixed?
+
+ * Set MBeans name of JBossCache explicitly
+
+Patch file: JCR-1634.patch
+
+Tests to perform
+
+Reproduction test
+PROBLEM:
+
+ * When monitoring the JCR with a JMX Tool (like VisualVM)
+ * The JBossCaches used by the JCR have generated names, and no informations about
what they are managing.
+
+EXPECTED:
+
+ * A name stable between two start up
+ * An indication of the content managed by the cache
+
+Tests performed at DevLevel
+* Functional testing jcr-core project
+
+Tests performed at QA/Support Level
+*
+Documentation changes
+
+Documentation changes:
+* No
+Configuration changes
+
+Configuration changes:
+* No
+
+Will previous configuration continue to work?
+* Yes
+Risks and impacts
+
+Can this bug fix have any side effects on current client projects?
+
+ * No
+
+Is there a performance risk/cost?
+* No
+Validation (PM/Support/QA)
+
+PM Comment
+* Patch approved.
+
+Support Comment
+*
+
+QA Feedbacks
+*
+