KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > statetransfer > StateTransferCompatibilityTest


1 package org.jboss.cache.statetransfer;
2
3 public class StateTransferCompatibilityTest extends StateTransferTestBase
4 {
5
6    protected String JavaDoc getReplicationVersion()
7    {
8       return "2.0.0.GA";
9    }
10    
11
12    /**
13     * These tests ensure that http://jira.jboss.com/jira/browse/JBCACHE-738
14     * compatibility between non-delegating cacheloaders is maintained. In the tests
15     * below first cacheloader parameter is the state producer and the second cacheloader
16     * parameter is the state receiver. By having each cacheloader be a state receiver
17     * and a state producer we ensure complete cacheloader compatibility.
18     */

19    public void testCompatibilityBetweenFileAndJbdmCacheLoaders() throws Exception JavaDoc
20    {
21       initialStateTferWithLoaderTest("org.jboss.cache.loader.FileCacheLoader",
22               "org.jboss.cache.loader.jdbm.JdbmCacheLoader", false);
23    }
24
25    public void testCompatibilityBetweenFileAndJDBCCacheLoaders() throws Exception JavaDoc
26    {
27       initialStateTferWithLoaderTest("org.jboss.cache.loader.FileCacheLoader",
28               "org.jboss.cache.loader.JDBCCacheLoader", false);
29    }
30
31    public void testCompatibilityBetweenFileAndBdbjeCacheLoaders() throws Exception JavaDoc
32    {
33
34       initialStateTferWithLoaderTest("org.jboss.cache.loader.FileCacheLoader",
35               "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", false);
36    }
37
38    public void testCompatibilityBetweenJbdmAndJDBCCacheLoaders() throws Exception JavaDoc
39    {
40       initialStateTferWithLoaderTest("org.jboss.cache.loader.jdbm.JdbmCacheLoader",
41               "org.jboss.cache.loader.JDBCCacheLoader", false);
42    }
43
44    public void testCompatibilityBetweenJbdmAndBdbjeCacheLoaders() throws Exception JavaDoc
45    {
46       initialStateTferWithLoaderTest("org.jboss.cache.loader.jdbm.JdbmCacheLoader",
47               "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", false);
48    }
49
50    public void testCompatibilityBetweenJbdmAndFileCacheLoaders() throws Exception JavaDoc
51    {
52       initialStateTferWithLoaderTest("org.jboss.cache.loader.jdbm.JdbmCacheLoader",
53               "org.jboss.cache.loader.FileCacheLoader", false);
54    }
55
56    public void testCompatibilityBetweenJDBCAndBdjeCacheLoaders() throws Exception JavaDoc
57    {
58
59       initialStateTferWithLoaderTest("org.jboss.cache.loader.JDBCCacheLoader",
60               "org.jboss.cache.loader.bdbje.BdbjeCacheLoader", false);
61    }
62
63    public void testCompatibilityBetweenJDBCAndFileCacheLoaders() throws Exception JavaDoc
64    {
65
66       initialStateTferWithLoaderTest("org.jboss.cache.loader.JDBCCacheLoader",
67               "org.jboss.cache.loader.FileCacheLoader", false);
68    }
69
70    public void testCompatibilityBetweenJDBCAndJbdmCacheLoaders() throws Exception JavaDoc
71    {
72
73       initialStateTferWithLoaderTest("org.jboss.cache.loader.JDBCCacheLoader",
74               "org.jboss.cache.loader.jdbm.JdbmCacheLoader", false);
75    }
76
77    public void testCompatibilityBetweenBdbjeandJDBCCacheLoaders() throws Exception JavaDoc
78    {
79
80       initialStateTferWithLoaderTest("org.jboss.cache.loader.bdbje.BdbjeCacheLoader",
81               "org.jboss.cache.loader.JDBCCacheLoader", false);
82    }
83
84    public void testCompatibilityBetweenBdbjeandFileCacheLoaders() throws Exception JavaDoc
85    {
86
87       initialStateTferWithLoaderTest("org.jboss.cache.loader.bdbje.BdbjeCacheLoader",
88               "org.jboss.cache.loader.FileCacheLoader", false);
89    }
90
91    public void testCompatibilityBetweenBdbjeandJbdmCacheLoaders() throws Exception JavaDoc
92    {
93
94       initialStateTferWithLoaderTest("org.jboss.cache.loader.bdbje.BdbjeCacheLoader",
95               "org.jboss.cache.loader.jdbm.JdbmCacheLoader", false);
96    }
97
98    protected void initialStateTferWithLoaderTest(boolean asyncLoader) throws Exception JavaDoc
99    {
100       initialStateTferWithLoaderTest("org.jboss.cache.loader.FileCacheLoader",
101               "org.jboss.cache.loader.FileCacheLoader", asyncLoader);
102    }
103 }
104
Popular Tags