[jboss-cvs] JBossAS SVN: r68215 - in trunk/testsuite/src/main/org/jboss/test/cluster: testutil and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 12 20:15:15 EST 2007


Author: bstansberry at jboss.com
Date: 2007-12-12 20:15:15 -0500 (Wed, 12 Dec 2007)
New Revision: 68215

Added:
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/JBossCacheManagerConfigurationUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/web/MockEngine.java
   trunk/testsuite/src/main/org/jboss/test/cluster/web/MockHost.java
Modified:
   trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionCountUnitTestCase.java
   trunk/testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java
Log:
[JBAS-4961] Default for JBossCacheManager useJK is whether jvmRoute is set

Added: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/JBossCacheManagerConfigurationUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/JBossCacheManagerConfigurationUnitTestCase.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/JBossCacheManagerConfigurationUnitTestCase.java	2007-12-13 01:15:15 UTC (rev 68215)
@@ -0,0 +1,189 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.cluster.defaultcfg.simpleweb.test;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.jboss.cache.Fqn;
+import org.jboss.cache.pojo.PojoCache;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.javaee.spec.EmptyMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.metadata.web.jboss.PassivationConfig;
+import org.jboss.metadata.web.jboss.ReplicationConfig;
+import org.jboss.metadata.web.jboss.ReplicationGranularity;
+import org.jboss.metadata.web.jboss.ReplicationTrigger;
+import org.jboss.test.cluster.testutil.SessionTestUtil;
+import org.jboss.web.tomcat.service.session.JBossCacheManager;
+
+/**
+ * Unit tests of session count management.
+ * 
+ * @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
+ * @version $Revision: 67050 $
+ */
+public class JBossCacheManagerConfigurationUnitTestCase extends TestCase
+{
+   private static final Logger log = Logger.getLogger(JBossCacheManagerConfigurationUnitTestCase.class);
+   
+   private static long testCount = System.currentTimeMillis();
+   
+   private Set<PojoCache> caches = new HashSet<PojoCache>();
+   private String tempDir;
+   
+   /**
+    * Create a new SessionCountUnitTestCase.
+    * 
+    * @param name
+    */
+   public JBossCacheManagerConfigurationUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   @Override
+   protected void tearDown() throws Exception
+   {
+      super.tearDown();
+      
+      for (PojoCache cache : caches)
+      { 
+         // Try to clean up so we avoid loading sessions 
+         // from storage in later tests
+         try
+         {
+            log.info("Removing /JSESSION from " + cache.getCache().getLocalAddress());
+            cache.getCache().removeNode(Fqn.fromString("/JSESSION"));
+         }
+         catch (Exception e)
+         {
+            log.error("Cache " + cache.getCache().getLocalAddress() + ": " + e.getMessage(), e);
+         }
+         
+         try
+         {
+            cache.stop();
+            cache.destroy();
+         }
+         catch (Exception e)
+         {
+            log.error("Cache " + cache.getCache().getLocalAddress() + ": " + e.getMessage(), e);
+         }
+      }
+      
+      caches.clear();
+      
+      if (tempDir != null)
+      {
+         File dir = new File(tempDir);
+         if (dir.exists())
+            dir.delete();
+         if (dir.exists())
+            dir.deleteOnExit();
+      }
+   }
+   
+   public void testUseJK() throws Exception
+   {
+      log.info("Enter testUseJK");
+      
+      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, null, false, false, null);
+      caches.add(jbcm.getPojoCache());
+      
+      JBossWebMetaData webMetaData = createWebMetaData(null, null, null, null, null);
+      jbcm.init("test.war", webMetaData);      
+      jbcm.start();
+
+      assertFalse("With no config, not using JK", jbcm.getUseJK());
+      
+      cleanupManager(jbcm);
+      
+      jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, null, false, false, null);
+      caches.add(jbcm.getPojoCache());
+      
+      webMetaData = createWebMetaData(null, null, null, null, Boolean.TRUE);
+      jbcm.init("test.war", webMetaData);      
+      jbcm.start();
+
+      assertTrue("With no jvmRoute but a config, using JK", jbcm.getUseJK());
+      
+      cleanupManager(jbcm);
+      
+      jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, null, false, false, "test");
+      caches.add(jbcm.getPojoCache());
+      
+      webMetaData = createWebMetaData(null, null, null, null, null);
+      jbcm.init("test.war", webMetaData);      
+      jbcm.start();
+
+      assertTrue("With jvmRoute set, using JK", jbcm.getUseJK());
+      
+      cleanupManager(jbcm);
+      
+      jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, null, false, false, "test");
+      caches.add(jbcm.getPojoCache());
+      
+      webMetaData = createWebMetaData(null, null, null, null, Boolean.FALSE);
+      jbcm.init("test.war", webMetaData);      
+      jbcm.start();
+
+      assertFalse("With a jvmRoute but config=false, not using JK", jbcm.getUseJK());
+      
+      cleanupManager(jbcm);
+      
+   }
+   
+   private void cleanupManager(JBossCacheManager mgr) throws Exception
+   {
+      PojoCache cache = mgr.getPojoCache();
+      mgr.stop();
+      cache.stop();
+      cache.destroy();
+   }
+   
+   private JBossWebMetaData createWebMetaData(Integer maxSessions, 
+                                              Boolean passivation,
+                                              Integer maxIdle, 
+                                              Integer minIdle,
+                                              Boolean useJK)
+   {
+      JBossWebMetaData webMetaData = new JBossWebMetaData();
+      webMetaData.setDistributable(new EmptyMetaData());
+      webMetaData.setMaxActiveSessions(maxSessions);
+      PassivationConfig pcfg = new PassivationConfig();
+      pcfg.setUseSessionPassivation(passivation);
+      pcfg.setPassivationMaxIdleTime(maxIdle);
+      pcfg.setPassivationMinIdleTime(minIdle);
+      webMetaData.setPassivationConfig(pcfg);
+      ReplicationConfig repCfg = new ReplicationConfig();
+      repCfg.setReplicationGranularity(ReplicationGranularity.SESSION);
+      repCfg.setReplicationTrigger(ReplicationTrigger.SET_AND_NON_PRIMITIVE_GET);
+      repCfg.setUseJK(useJK);
+      webMetaData.setReplicationConfig(repCfg);
+      return webMetaData;
+   }
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/JBossCacheManagerConfigurationUnitTestCase.java
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionCountUnitTestCase.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionCountUnitTestCase.java	2007-12-13 01:06:01 UTC (rev 68214)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/defaultcfg/simpleweb/test/SessionCountUnitTestCase.java	2007-12-13 01:15:15 UTC (rev 68215)
@@ -159,7 +159,7 @@
    {
       log.info("Enter testStandaloneMaxSessions");
       
-      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, null, false, false);
+      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, null, false, false, null);
       caches.add(jbcm.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(2);
@@ -201,7 +201,7 @@
    {
       log.info("Enter testStandaloneMaxSessionsWithMaxIdle");
       
-      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, tempDir, false, false);
+      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, tempDir, false, false, null);
       caches.add(jbcm.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(1, true, 1, -1);
@@ -254,7 +254,7 @@
    {
       log.info("Enter testStandaloneMaxSessionsWithMinIdle");
       
-      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, tempDir, false, false);
+      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 5, true, tempDir, false, false, null);
       caches.add(jbcm.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(1, true, 3, 1);
@@ -306,7 +306,7 @@
    {
       log.info("Enter testReplicatedMaxSessions");
       
-      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, null, false, false);
+      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, null, false, false, null);
       caches.add(jbcm0.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(1);
@@ -318,7 +318,7 @@
       assertEquals("Correct max active count", 1, jbcm0.getMaxActiveAllowed());
       assertEquals("Correct max inactive interval", 1, jbcm0.getMaxInactiveInterval());
       
-      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, null, false, false);
+      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, null, false, false, null);
       caches.add(jbcm1.getPojoCache());
       
       jbcm1.init("test.war", webMetaData);
@@ -362,7 +362,7 @@
    {
       log.info("Enter testReplicatedMaxSessionsWithMaxIdle");
       
-      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, false, false);
+      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, false, false, null);
       caches.add(jbcm0.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(1, true, 1, -1);
@@ -375,7 +375,7 @@
       assertEquals("Correct max idle time", 1, jbcm0.getPassivationMaxIdleTime());
       assertEquals("Correct min idle time", -1, jbcm0.getPassivationMinIdleTime());
       
-      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, false, false);
+      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, false, false, null);
       caches.add(jbcm1.getPojoCache());
       
       jbcm1.init("test.war", webMetaData);
@@ -420,7 +420,7 @@
    {
       log.info("Enter testReplicatedMaxSessionsWithMinIdle");
       
-      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, false, false);
+      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, false, false, null);
       caches.add(jbcm0.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(1, true, 3, 1);
@@ -433,7 +433,7 @@
       assertEquals("Correct max idle time", 3, jbcm0.getPassivationMaxIdleTime());
       assertEquals("Correct min idle time", 1, jbcm0.getPassivationMinIdleTime());
       
-      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, false, false);
+      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, false, false, null);
       caches.add(jbcm1.getPojoCache());
       
       jbcm1.init("test.war", webMetaData);
@@ -479,7 +479,7 @@
    {
       log.info("Enter testTotalReplication");
       
-      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, true, false);
+      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, true, false, null);
       caches.add(jbcm0.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(1, true, 3, 1);
@@ -492,7 +492,7 @@
       assertEquals("Correct max idle time", 3, jbcm0.getPassivationMaxIdleTime());
       assertEquals("Correct min idle time", 1, jbcm0.getPassivationMinIdleTime());
       
-      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, true, false);
+      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, true, false, null);
       caches.add(jbcm1.getPojoCache());
       
       jbcm1.init("test.war", webMetaData);
@@ -538,7 +538,7 @@
    {
       log.info("Enter testRegionBasedMarshalling");
       
-      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, false, true);
+      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, false, true, null);
       caches.add(jbcm0.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(1, true, 3, 1);
@@ -551,7 +551,7 @@
       assertEquals("Correct max idle time", 3, jbcm0.getPassivationMaxIdleTime());
       assertEquals("Correct min idle time", 1, jbcm0.getPassivationMinIdleTime());
       
-      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, false, true);
+      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, false, true, null);
       caches.add(jbcm1.getPojoCache());
       
       jbcm1.init("test.war", webMetaData);
@@ -597,7 +597,7 @@
    {
       log.info("Enter testTotalReplicationWithMarshalling");
       
-      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, true, true);
+      JBossCacheManager jbcm0 = SessionTestUtil.createManager("test" + ++testCount, 1, false, tempDir, true, true, null);
       caches.add(jbcm0.getPojoCache());
       
       JBossWebMetaData webMetaData = createWebMetaData(1, true, 3, 1);
@@ -610,7 +610,7 @@
       assertEquals("Correct max idle time", 3, jbcm0.getPassivationMaxIdleTime());
       assertEquals("Correct min idle time", 1, jbcm0.getPassivationMinIdleTime());
       
-      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, true, true);
+      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 1, false, tempDir, true, true, null);
       caches.add(jbcm1.getPojoCache());
       
       jbcm1.init("test.war", webMetaData);
@@ -669,7 +669,7 @@
    private void standaloneWarRedeployTest(boolean restartCache)
          throws Exception
    {
-      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 300, true, tempDir, false, false);
+      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 300, true, tempDir, false, false, null);
       PojoCache cache = jbcm.getPojoCache();
       caches.add(cache);
       
@@ -718,12 +718,12 @@
          cache.destroy();
          caches.remove(cache);
          
-         jbcm = SessionTestUtil.createManager("test" + testCount, 5, true, tempDir, false, false);
+         jbcm = SessionTestUtil.createManager("test" + testCount, 5, true, tempDir, false, false, null);
          caches.add(jbcm.getPojoCache());
       }
       else
       {
-         jbcm = SessionTestUtil.createManager("test" + testCount, 5, cache);
+         jbcm = SessionTestUtil.createManager("test" + testCount, 5, cache, null);
       }
       jbcm.init("test.war", webMetaData);
       
@@ -767,7 +767,7 @@
                                           boolean marshalling)
          throws Exception
    {
-      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 300, false, tempDir, totalReplication, marshalling);
+      JBossCacheManager jbcm = SessionTestUtil.createManager("test" + ++testCount, 300, false, tempDir, totalReplication, marshalling, null);
       PojoCache cache = jbcm.getPojoCache();
       caches.add(cache);
       
@@ -781,7 +781,7 @@
       assertEquals("Correct max idle time", 3, jbcm.getPassivationMaxIdleTime());
       assertEquals("Correct min idle time", 1, jbcm.getPassivationMinIdleTime());
       
-      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 300, false, tempDir, totalReplication, marshalling);
+      JBossCacheManager jbcm1 = SessionTestUtil.createManager("test" + testCount, 300, false, tempDir, totalReplication, marshalling, null);
       PojoCache cache1 = jbcm1.getPojoCache();
       caches.add(cache1);
       
@@ -850,12 +850,12 @@
          cache.destroy();
          caches.remove(cache);
          
-         jbcm = SessionTestUtil.createManager("test" + testCount, 300, false, tempDir, totalReplication, marshalling);
+         jbcm = SessionTestUtil.createManager("test" + testCount, 300, false, tempDir, totalReplication, marshalling, null);
          caches.add(jbcm.getPojoCache());
       }
       else
       {
-         jbcm = SessionTestUtil.createManager("test" + testCount, 300, cache);
+         jbcm = SessionTestUtil.createManager("test" + testCount, 300, cache, null);
       }
       jbcm.init("test.war", webMetaData);
       

Modified: trunk/testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java	2007-12-13 01:06:01 UTC (rev 68214)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/testutil/SessionTestUtil.java	2007-12-13 01:15:15 UTC (rev 68215)
@@ -43,6 +43,8 @@
 import org.jboss.metadata.web.jboss.SnapshotMode;
 import org.jboss.test.cluster.web.CacheHelper;
 import org.jboss.test.cluster.web.MockContainer;
+import org.jboss.test.cluster.web.MockEngine;
+import org.jboss.test.cluster.web.MockHost;
 import org.jboss.web.tomcat.service.session.JBossCacheManager;
 
 /**
@@ -58,23 +60,28 @@
    
    public static JBossCacheManager createManager(String warName, int maxInactiveInterval, 
                                                  boolean local, String passivationDir, 
-                                                 boolean totalReplication, boolean marshalling)
+                                                 boolean totalReplication, boolean marshalling, 
+                                                 String jvmRoute)
    {
       PojoCache cache = createCache(local, passivationDir, totalReplication, marshalling, true);
-      return createManager(warName, maxInactiveInterval, cache);
+      return createManager(warName, maxInactiveInterval, cache, jvmRoute);
    }
    
    public static JBossCacheManager createManager(String warName, 
                                                  int maxInactiveInterval, 
-                                                 PojoCache cache)
+                                                 PojoCache cache, 
+                                                 String jvmRoute)
    {
       JBossCacheManager jbcm = new JBossCacheManager(cache);
       
-      MockContainer parent = new MockContainer();
-      parent.setName("localhost");
+      MockEngine engine = new MockEngine();
+      engine.setJvmRoute(jvmRoute);
+      MockHost host = new MockHost();
+      engine.addChild(host);
+      host.setName("localhost");
       StandardContext container = new StandardContext();
       container.setName(warName);
-      parent.addChild(container);
+      host.addChild(container);
       jbcm.setContainer(container);
       jbcm.setMaxInactiveInterval(maxInactiveInterval);
       

Added: trunk/testsuite/src/main/org/jboss/test/cluster/web/MockEngine.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/MockEngine.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/MockEngine.java	2007-12-13 01:15:15 UTC (rev 68215)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.cluster.web;
+
+import org.apache.catalina.Engine;
+import org.apache.catalina.Service;
+
+/**
+ * @author Brian Stansberry
+ *
+ */
+public class MockEngine extends MockContainer implements Engine
+{
+   private static final long serialVersionUID = 1L;
+   
+   private Service service;
+   private String defaultHost = "localhost";
+   private String jvmRoute;
+   
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Engine#getDefaultHost()
+    */
+   public String getDefaultHost()
+   {
+      return defaultHost;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Engine#getJvmRoute()
+    */
+   public String getJvmRoute()
+   {
+      return jvmRoute;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Engine#getService()
+    */
+   public Service getService()
+   {
+      return service;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Engine#setDefaultHost(java.lang.String)
+    */
+   public void setDefaultHost(String arg0)
+   {
+      this.defaultHost = arg0;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Engine#setJvmRoute(java.lang.String)
+    */
+   public void setJvmRoute(String arg0)
+   {
+      this.jvmRoute = arg0;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Engine#setService(org.apache.catalina.Service)
+    */
+   public void setService(Service arg0)
+   {
+      this.service = arg0;
+   }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/cluster/web/MockEngine.java
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/testsuite/src/main/org/jboss/test/cluster/web/MockHost.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/cluster/web/MockHost.java	                        (rev 0)
+++ trunk/testsuite/src/main/org/jboss/test/cluster/web/MockHost.java	2007-12-13 01:15:15 UTC (rev 68215)
@@ -0,0 +1,180 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY 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 along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.test.cluster.web;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.Host;
+
+/**
+ * @author Brian Stansberry
+ *
+ */
+public class MockHost extends MockContainer implements Host
+{
+   private static final long serialVersionUID = 1L;
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#addAlias(java.lang.String)
+    */
+   public void addAlias(String arg0)
+   {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#findAliases()
+    */
+   public String[] findAliases()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#getAppBase()
+    */
+   public String getAppBase()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#getAutoDeploy()
+    */
+   public boolean getAutoDeploy()
+   {
+      // TODO Auto-generated method stub
+      return false;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#getConfigClass()
+    */
+   public String getConfigClass()
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#getDeployOnStartup()
+    */
+   public boolean getDeployOnStartup()
+   {
+      // TODO Auto-generated method stub
+      return false;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#getXmlNamespaceAware()
+    */
+   public boolean getXmlNamespaceAware()
+   {
+      // TODO Auto-generated method stub
+      return false;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#getXmlValidation()
+    */
+   public boolean getXmlValidation()
+   {
+      // TODO Auto-generated method stub
+      return false;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#map(java.lang.String)
+    */
+   public Context map(String arg0)
+   {
+      // TODO Auto-generated method stub
+      return null;
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#removeAlias(java.lang.String)
+    */
+   public void removeAlias(String arg0)
+   {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#setAppBase(java.lang.String)
+    */
+   public void setAppBase(String arg0)
+   {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#setAutoDeploy(boolean)
+    */
+   public void setAutoDeploy(boolean arg0)
+   {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#setConfigClass(java.lang.String)
+    */
+   public void setConfigClass(String arg0)
+   {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#setDeployOnStartup(boolean)
+    */
+   public void setDeployOnStartup(boolean arg0)
+   {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#setXmlNamespaceAware(boolean)
+    */
+   public void setXmlNamespaceAware(boolean arg0)
+   {
+      // TODO Auto-generated method stub
+
+   }
+
+   /* (non-Javadoc)
+    * @see org.apache.catalina.Host#setXmlValidation(boolean)
+    */
+   public void setXmlValidation(boolean arg0)
+   {
+      // TODO Auto-generated method stub
+
+   }
+
+}


Property changes on: trunk/testsuite/src/main/org/jboss/test/cluster/web/MockHost.java
___________________________________________________________________
Name: svn:executable
   + *




More information about the jboss-cvs-commits mailing list