[hibernate-commits] Hibernate SVN: r17633 - in core/trunk/cache-jbosscache/src: main/resources/org/hibernate/cache/jbc/builder and 3 other directories.
hibernate-commits at lists.jboss.org
hibernate-commits at lists.jboss.org
Tue Oct 6 14:15:30 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-10-06 14:15:30 -0400 (Tue, 06 Oct 2009)
New Revision: 17633
Added:
core/trunk/cache-jbosscache/src/main/resources/org/hibernate/cache/jbc/builder/jbc-configs.xml
core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/JbcConfigsXmlValidityTestCase.java
Removed:
core/trunk/cache-jbosscache/src/main/resources/org/hibernate/cache/jbc/builder/jbc2-configs.xml
core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/Jbc2ConfigsXmlValidityTestCase.java
Modified:
core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/builder/MultiplexingCacheInstanceManager.java
core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/builder/SharedCacheInstanceManager.java
core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/functional/util/IsolatedCacheTestSetup.java
core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/util/CacheManagerTestSetup.java
Log:
[HHH-4475] Fix resource locations to reflect repackaging
Modified: core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/builder/MultiplexingCacheInstanceManager.java
===================================================================
--- core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/builder/MultiplexingCacheInstanceManager.java 2009-10-06 17:00:53 UTC (rev 17632)
+++ core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/builder/MultiplexingCacheInstanceManager.java 2009-10-06 18:15:30 UTC (rev 17633)
@@ -104,12 +104,12 @@
* Default value for {@link #CACHE_FACTORY_RESOURCE_PROP}. Specifies
* the "jbc2-configs.xml" file in this package.
*/
- public static final String DEF_CACHE_FACTORY_RESOURCE = "org/hibernate/cache/jbc2/builder/jbc2-configs.xml";
+ public static final String DEF_CACHE_FACTORY_RESOURCE = "org/hibernate/cache/jbc/builder/jbc-configs.xml";
/**
* Default value for {@link #CHANNEL_FACTORY_RESOURCE_PROP}. Specifies
* the "jgroups-stacks.xml" file in this package.
*/
- public static final String DEF_JGROUPS_RESOURCE = "org/hibernate/cache/jbc2/builder/jgroups-stacks.xml";
+ public static final String DEF_JGROUPS_RESOURCE = "org/hibernate/cache/jbc/builder/jgroups-stacks.xml";
/**
* Default value for {@link #ENTITY_CACHE_RESOURCE_PROP}.
*/
Modified: core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/builder/SharedCacheInstanceManager.java
===================================================================
--- core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/builder/SharedCacheInstanceManager.java 2009-10-06 17:00:53 UTC (rev 17632)
+++ core/trunk/cache-jbosscache/src/main/java/org/hibernate/cache/jbc/builder/SharedCacheInstanceManager.java 2009-10-06 18:15:30 UTC (rev 17633)
@@ -79,7 +79,7 @@
* Default value for {@link #CHANNEL_FACTORY_RESOURCE_PROP}. Specifies
* the "jgroups-stacks.xml" file in this package.
*/
- public static final String DEF_JGROUPS_RESOURCE = "org/hibernate/cache/jbc2/builder/jgroups-stacks.xml";
+ public static final String DEF_JGROUPS_RESOURCE = "org/hibernate/cache/jbc/builder/jgroups-stacks.xml";
private Cache cache;
private ChannelFactory channelFactory;
Copied: core/trunk/cache-jbosscache/src/main/resources/org/hibernate/cache/jbc/builder/jbc-configs.xml (from rev 17625, core/trunk/cache-jbosscache/src/main/resources/org/hibernate/cache/jbc/builder/jbc2-configs.xml)
===================================================================
(Binary files differ)
Deleted: core/trunk/cache-jbosscache/src/main/resources/org/hibernate/cache/jbc/builder/jbc2-configs.xml
===================================================================
(Binary files differ)
Deleted: core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/Jbc2ConfigsXmlValidityTestCase.java
===================================================================
--- core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/Jbc2ConfigsXmlValidityTestCase.java 2009-10-06 17:00:53 UTC (rev 17632)
+++ core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/Jbc2ConfigsXmlValidityTestCase.java 2009-10-06 18:15:30 UTC (rev 17633)
@@ -1,172 +0,0 @@
-/*
- * Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
- *
- * This copyrighted material is made available to anyone wishing to use, modify,
- * copy, or redistribute it subject to the terms and conditions of the GNU
- * Lesser General Public License, v. 2.1. This program is distributed in the
- * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
- * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details. You should have received a
- * copy of the GNU Lesser General Public License, v.2.1 along with this
- * distribution; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * Red Hat Author(s): Brian Stansberry
- */
-
-package org.hibernate.test.cache.jbc;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicReference;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.hibernate.test.util.CacheManagerTestSetup;
-import org.jboss.cache.Cache;
-import org.jboss.cache.CacheManager;
-
-/**
- * Tests the validity of the JBC configs in jbc2-configs.xml.
- *
- * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision: 1 $
- */
-public class Jbc2ConfigsXmlValidityTestCase extends AbstractJBossCacheTestCase
-{
- private static final AtomicReference<CacheManager> cacheManagerRef = new AtomicReference<CacheManager>();
-
- private static final Set<String> stdConfigs = new HashSet<String>();
-
- static
- {
- stdConfigs.add("optimistic-entity");
- stdConfigs.add("pessimistic-entity");
- stdConfigs.add("pessimistic-entity-repeatable");
- stdConfigs.add("optimistic-shared");
- stdConfigs.add("pessimistic-shared");
- stdConfigs.add("pessimistic-shared-repeatable");
- stdConfigs.add("local-query");
- stdConfigs.add("replicated-query");
- stdConfigs.add("timestamps-cache");
- }
-
- private CacheManager mgr;
- private String cacheName;
- private Cache cache;
-
- /**
- * Create a new Jbc2ConfigsXmlValidityTestCase.
- *
- * @param name
- */
- public Jbc2ConfigsXmlValidityTestCase(String name)
- {
- super(name);
- }
-
- public static Test suite() throws Exception {
- TestSuite suite = new TestSuite(Jbc2ConfigsXmlValidityTestCase.class);
- return new CacheManagerTestSetup(suite, cacheManagerRef);
- }
-
-
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
-
- this.mgr = cacheManagerRef.get();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- super.tearDown();
-
- if (cache != null)
- {
- try
- {
- mgr.releaseCache(this.cacheName);
- }
- catch (Exception ignored) {}
-
- cache = null;
- }
-
- mgr = null;
- }
-
- public void testOptimisticEntity() throws Exception
- {
- stdConfigTest("optimistic-entity");
- }
-
- public void testPessimisticEntity() throws Exception
- {
- stdConfigTest("pessimistic-entity");
- }
-
- public void testPessimisticEntityRepeatable() throws Exception
- {
- stdConfigTest("pessimistic-entity-repeatable");
- }
-
- public void testOptimisticShared() throws Exception
- {
- stdConfigTest("optimistic-shared");
- }
-
- public void testPessimisticShared() throws Exception
- {
- stdConfigTest("pessimistic-shared");
- }
-
- public void testPessimisticSharedRepeatable() throws Exception
- {
- stdConfigTest("pessimistic-shared-repeatable");
- }
-
- public void testLocalQuery() throws Exception
- {
- stdConfigTest("local-query");
- }
-
- public void testReplicatedQuery() throws Exception
- {
- stdConfigTest("replicated-query");
- }
-
- public void testTimestampsCache() throws Exception
- {
- stdConfigTest("timestamps-cache");
- }
-
- public void testAdditionalConfigs() throws Exception
- {
- Set<String> names = new HashSet<String>(this.mgr.getConfigurationNames());
- names.removeAll(stdConfigs);
- for (String name : names)
- {
- configTest(name);
- }
- }
-
- private void stdConfigTest(String configName) throws Exception
- {
- assertTrue(this.mgr.getConfigurationNames().contains(configName));
- configTest(configName);
- }
-
- private void configTest(String configName) throws Exception
- {
- this.cacheName = configName;
- this.cache = mgr.getCache(configName, true);
- this.cache.start();
- this.mgr.releaseCache(this.cacheName);
- this.cache = null;
- }
-}
Copied: core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/JbcConfigsXmlValidityTestCase.java (from rev 17625, core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/Jbc2ConfigsXmlValidityTestCase.java)
===================================================================
--- core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/JbcConfigsXmlValidityTestCase.java (rev 0)
+++ core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/JbcConfigsXmlValidityTestCase.java 2009-10-06 18:15:30 UTC (rev 17633)
@@ -0,0 +1,172 @@
+/*
+ * Copyright (c) 2007, Red Hat Middleware, LLC. All rights reserved.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, v. 2.1. This program is distributed in the
+ * hope that it will be useful, but WITHOUT A WARRANTY; without even the implied
+ * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details. You should have received a
+ * copy of the GNU Lesser General Public License, v.2.1 along with this
+ * distribution; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Red Hat Author(s): Brian Stansberry
+ */
+
+package org.hibernate.test.cache.jbc;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.hibernate.test.util.CacheManagerTestSetup;
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheManager;
+
+/**
+ * Tests the validity of the JBC configs in jbc2-configs.xml.
+ *
+ * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
+ * @version $Revision: 1 $
+ */
+public class JbcConfigsXmlValidityTestCase extends AbstractJBossCacheTestCase
+{
+ private static final AtomicReference<CacheManager> cacheManagerRef = new AtomicReference<CacheManager>();
+
+ private static final Set<String> stdConfigs = new HashSet<String>();
+
+ static
+ {
+ stdConfigs.add("optimistic-entity");
+ stdConfigs.add("pessimistic-entity");
+ stdConfigs.add("pessimistic-entity-repeatable");
+ stdConfigs.add("optimistic-shared");
+ stdConfigs.add("pessimistic-shared");
+ stdConfigs.add("pessimistic-shared-repeatable");
+ stdConfigs.add("local-query");
+ stdConfigs.add("replicated-query");
+ stdConfigs.add("timestamps-cache");
+ }
+
+ private CacheManager mgr;
+ private String cacheName;
+ private Cache cache;
+
+ /**
+ * Create a new JbcConfigsXmlValidityTestCase.
+ *
+ * @param name
+ */
+ public JbcConfigsXmlValidityTestCase(String name)
+ {
+ super(name);
+ }
+
+ public static Test suite() throws Exception {
+ TestSuite suite = new TestSuite(JbcConfigsXmlValidityTestCase.class);
+ return new CacheManagerTestSetup(suite, cacheManagerRef);
+ }
+
+
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ this.mgr = cacheManagerRef.get();
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ if (cache != null)
+ {
+ try
+ {
+ mgr.releaseCache(this.cacheName);
+ }
+ catch (Exception ignored) {}
+
+ cache = null;
+ }
+
+ mgr = null;
+ }
+
+ public void testOptimisticEntity() throws Exception
+ {
+ stdConfigTest("optimistic-entity");
+ }
+
+ public void testPessimisticEntity() throws Exception
+ {
+ stdConfigTest("pessimistic-entity");
+ }
+
+ public void testPessimisticEntityRepeatable() throws Exception
+ {
+ stdConfigTest("pessimistic-entity-repeatable");
+ }
+
+ public void testOptimisticShared() throws Exception
+ {
+ stdConfigTest("optimistic-shared");
+ }
+
+ public void testPessimisticShared() throws Exception
+ {
+ stdConfigTest("pessimistic-shared");
+ }
+
+ public void testPessimisticSharedRepeatable() throws Exception
+ {
+ stdConfigTest("pessimistic-shared-repeatable");
+ }
+
+ public void testLocalQuery() throws Exception
+ {
+ stdConfigTest("local-query");
+ }
+
+ public void testReplicatedQuery() throws Exception
+ {
+ stdConfigTest("replicated-query");
+ }
+
+ public void testTimestampsCache() throws Exception
+ {
+ stdConfigTest("timestamps-cache");
+ }
+
+ public void testAdditionalConfigs() throws Exception
+ {
+ Set<String> names = new HashSet<String>(this.mgr.getConfigurationNames());
+ names.removeAll(stdConfigs);
+ for (String name : names)
+ {
+ configTest(name);
+ }
+ }
+
+ private void stdConfigTest(String configName) throws Exception
+ {
+ assertTrue(this.mgr.getConfigurationNames().contains(configName));
+ configTest(configName);
+ }
+
+ private void configTest(String configName) throws Exception
+ {
+ this.cacheName = configName;
+ this.cache = mgr.getCache(configName, true);
+ this.cache.start();
+ this.mgr.releaseCache(this.cacheName);
+ this.cache = null;
+ }
+}
Modified: core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/functional/util/IsolatedCacheTestSetup.java
===================================================================
--- core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/functional/util/IsolatedCacheTestSetup.java 2009-10-06 17:00:53 UTC (rev 17632)
+++ core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/cache/jbc/functional/util/IsolatedCacheTestSetup.java 2009-10-06 18:15:30 UTC (rev 17633)
@@ -18,6 +18,7 @@
import junit.framework.Test;
+import org.hibernate.cache.jbc.builder.MultiplexingCacheInstanceManager;
import org.hibernate.test.util.SelectedClassnameClassLoader;
import org.hibernate.test.util.SelectedClassnameClassLoaderTestSetup;
@@ -31,8 +32,8 @@
public class IsolatedCacheTestSetup extends SelectedClassnameClassLoaderTestSetup
{
- public static final String DEF_CACHE_FACTORY_RESOURCE = "org/hibernate/cache/jbc/builder/jbc2-configs.xml";
- public static final String DEF_JGROUPS_RESOURCE = "org/hibernate/cache/jbc/builder/jgroups-stacks.xml";
+ public static final String DEF_CACHE_FACTORY_RESOURCE = MultiplexingCacheInstanceManager.DEF_CACHE_FACTORY_RESOURCE;
+ public static final String DEF_JGROUPS_RESOURCE = MultiplexingCacheInstanceManager.DEF_JGROUPS_RESOURCE;
private String[] isolatedClasses;
private String cacheConfig;
Modified: core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/util/CacheManagerTestSetup.java
===================================================================
--- core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/util/CacheManagerTestSetup.java 2009-10-06 17:00:53 UTC (rev 17632)
+++ core/trunk/cache-jbosscache/src/test/java/org/hibernate/test/util/CacheManagerTestSetup.java 2009-10-06 18:15:30 UTC (rev 17633)
@@ -21,6 +21,7 @@
import junit.extensions.TestSetup;
import junit.framework.Test;
+import org.hibernate.cache.jbc.builder.MultiplexingCacheInstanceManager;
import org.jboss.cache.CacheManager;
import org.jboss.cache.CacheManagerImpl;
import org.jgroups.ChannelFactory;
@@ -36,8 +37,8 @@
*/
public class CacheManagerTestSetup extends TestSetup
{
- public static final String DEF_CACHE_FACTORY_RESOURCE = "org/hibernate/cache/jbc/builder/jbc2-configs.xml";
- public static final String DEF_JGROUPS_RESOURCE = "org/hibernate/cache/jbc/builder/jgroups-stacks.xml";
+ public static final String DEF_CACHE_FACTORY_RESOURCE = MultiplexingCacheInstanceManager.DEF_CACHE_FACTORY_RESOURCE;
+ public static final String DEF_JGROUPS_RESOURCE = MultiplexingCacheInstanceManager.DEF_JGROUPS_RESOURCE;
private final String jbcConfig;
private final String jgConfig;
More information about the hibernate-commits
mailing list