Author: bstansberry(a)jboss.com
Date: 2008-02-28 14:41:20 -0500 (Thu, 28 Feb 2008)
New Revision: 14380
Modified:
core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/CacheTestCaseBase.java
Log:
Remove genericized method signature
Make the region prefix easily overridable
Modified:
core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/CacheTestCaseBase.java
===================================================================
---
core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/CacheTestCaseBase.java 2008-02-28
19:40:46 UTC (rev 14379)
+++
core/trunk/cache-jbosscache2/src/test/java/org/hibernate/test/cache/jbc2/functional/CacheTestCaseBase.java 2008-02-28
19:41:20 UTC (rev 14380)
@@ -60,7 +60,10 @@
public void configure(Configuration cfg) {
super.configure(cfg);
- cfg.setProperty(Environment.CACHE_REGION_PREFIX, "test");
+ if (getRegionPrefix() != null) {
+ cfg.setProperty(Environment.CACHE_REGION_PREFIX, getRegionPrefix());
+ }
+
cfg.setProperty(Environment.USE_SECOND_LEVEL_CACHE, "true");
cfg.setProperty(Environment.GENERATE_STATISTICS, "true");
cfg.setProperty(Environment.USE_STRUCTURED_CACHE, "true");
@@ -75,6 +78,10 @@
cfg.setProperty( Environment.TRANSACTION_STRATEGY,
transactionFactory.getName() );
configureCacheFactory(cfg);
+ }
+
+ protected String getRegionPrefix() {
+ return "test";
}
public String getCacheConcurrencyStrategy() {
@@ -88,7 +95,7 @@
*/
protected abstract void configureCacheFactory(Configuration cfg);
- protected abstract Class<? extends RegionFactory> getCacheRegionFactory();
+ protected abstract Class getCacheRegionFactory();
protected abstract boolean getUseQueryCache();