You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2012/02/07 23:13:45 UTC

svn commit: r1241661 - in /activemq/activemq-apollo/trunk: apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/ apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/ apollo-broker/src/main/scala/org/apache/activemq/apollo/br...

Author: chirino
Date: Tue Feb  7 22:13:44 2012
New Revision: 1241661

URL: http://svn.apache.org/viewvc?rev=1241661&view=rev
Log:
- Plugins can now associate state data with a virtual host
- Stores now support listing map keys based on a prefix.
- Simplify stomp test configs

Modified:
    activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala
    activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala
    activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/HelperTrait.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/DelayingStoreSupport.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/PersistentLongCounter.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/Store.scala
    activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala
    activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBStore.scala
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-bdb.xml
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-custom-dest-delimiters.xml
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-leveldb.xml
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-secure.xml
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl-secure.xml
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl.xml
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp.xml
    activemq/activemq-apollo/trunk/apollo-util/src/test/scala/org/apache/activemq/apollo/util/FunSuiteSupport.scala

Modified: activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBClient.scala Tue Feb  7 22:13:44 2012
@@ -27,6 +27,7 @@ import java.io.{InputStream, OutputStrea
 import com.sleepycat.je._
 import org.fusesource.hawtbuf.Buffer
 import FileSupport._
+import org.apache.activemq.apollo.broker.store.bdb.HelperTrait.to_database_entry
 
 object BDBClient extends Log {
   final val STORE_SCHEMA_PREFIX = "bdb_store:"
@@ -556,6 +557,18 @@ class BDBClient(store: BDBStore) {
     }
   }
 
+  def get_prefixed_map_entries(prefix:Buffer):Seq[(Buffer, Buffer)] = {
+    val rc = ListBuffer[(Buffer, Buffer)]()
+    with_ctx() { ctx=>
+      import ctx._
+      map_db.cursor_prefixed(tx, prefix) { (key, value) =>
+        rc += to_buffer(key) -> to_buffer(value)
+        true
+      }
+    }
+    rc
+  }
+
   def getLastQueueKey:Long = {
     with_ctx() { ctx=>
       import ctx._

Modified: activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/BDBStore.scala Tue Feb  7 22:13:44 2012
@@ -124,12 +124,19 @@ class BDBStore(var config:BDBStoreDTO) e
   }
 
 
-  def get(key: Buffer)(callback: (Option[Buffer]) => Unit) = {
+  def get_map_entry(key: Buffer)(callback: (Option[Buffer]) => Unit) = {
     read_executor {
       callback(client.get(key))
     }
   }
 
+  def get_prefixed_map_entries(prefix:Buffer)(callback: Seq[(Buffer, Buffer)]=>Unit) = {
+    read_executor {
+      callback(client.get_prefixed_map_entries(prefix))
+    }
+  }
+
+
   /**
    * Ges the last queue key identifier stored.
    */

Modified: activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/HelperTrait.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/HelperTrait.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/HelperTrait.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-bdb/src/main/scala/org/apache/activemq/apollo/broker/store/bdb/HelperTrait.scala Tue Feb  7 22:13:44 2012
@@ -17,7 +17,6 @@
 package org.apache.activemq.apollo.broker.store.bdb
 
 import java.util.Comparator
-import java.nio.ByteBuffer
 import com.sleepycat.je._
 import java.io.Serializable
 import org.apache.activemq.apollo.broker.store._
@@ -174,6 +173,16 @@ object HelperTrait {
       }
     }
 
+    def cursor_prefixed(tx:Transaction, prefix:Buffer)(func: (DatabaseEntry,DatabaseEntry) => Boolean): Unit = {
+      cursor_from(tx, prefix) { (key, value) =>
+        if( key.startsWith(prefix) ) {
+          func(key, value)
+        } else {
+          false
+        }
+      }
+    }
+
     def get(tx:Transaction, key:DatabaseEntry):Option[DatabaseEntry] = {
       val value = new DatabaseEntry()
       if( db.get(tx, key, value, LockMode.DEFAULT) == OperationStatus.SUCCESS ) {

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/VirtualHost.scala Tue Feb  7 22:13:44 2012
@@ -26,6 +26,7 @@ import security._
 import security.SecuredResource.VirtualHostKind
 import store._
 import java.lang.{Throwable, String}
+import java.util.concurrent.ConcurrentHashMap
 
 trait VirtualHostFactory {
   def create(broker:Broker, dto:VirtualHostDTO):VirtualHost
@@ -110,6 +111,31 @@ class VirtualHost(val broker: Broker, va
 
   var direct_buffer_allocator:DirectBufferAllocator = null
 
+  private val _plugin_state = new ConcurrentHashMap[Class[_],  Any]()
+  
+  /** 
+   * Plugins can associate state data with the virtual host instance
+   * using this method.  The factory will be used to create the state
+   * if it does not yet exist.
+   */
+  def plugin_state[T](factory: =>T, clazz:Class[T]):T = {
+    var state = _plugin_state.get(clazz).asInstanceOf[T]
+    if( state == null ) {
+      state = factory
+      if( state != null ) {
+        _plugin_state.put(clazz, state)
+      }
+    }
+    state
+  }
+
+  /**
+   * Used to clear out previously set plugin state.  
+   */
+  def clear_plugin_state[T](clazz:Class[T]):T = {
+    _plugin_state.remove(clazz).asInstanceOf[T]
+  }  
+  
   def resource_kind = VirtualHostKind
 
   @volatile

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/DelayingStoreSupport.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/DelayingStoreSupport.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/DelayingStoreSupport.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/DelayingStoreSupport.scala Tue Feb  7 22:13:44 2012
@@ -480,10 +480,6 @@ trait DelayingStoreSupport extends Store
       return
     }
     
-    
-    var fasap = 0
-    var fdelayed = 0
-    
     // Some UOWs may have been canceled.
     val uows = flush_source.getData.flatMap { uow=>
       if( uow.canceled ) {
@@ -491,11 +487,6 @@ trait DelayingStoreSupport extends Store
       } else {
         uow.state = UowFlushing
         assert( uow.have_locators )
-        if( uow.flush_asap ) {
-          fasap += 1
-        } else {
-          fdelayed +=1
-        }
         // It will not be possible to cancel the UOW anymore..
         uow.actions.foreach { case (_, action) =>
           action.enqueues.foreach { queue_entry=>

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/PersistentLongCounter.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/PersistentLongCounter.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/PersistentLongCounter.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/PersistentLongCounter.scala Tue Feb  7 22:13:44 2012
@@ -50,7 +50,7 @@ case class PersistentLongCounter(name:St
 
   def init(store:Store)(on_complete: =>Unit):Unit = {
     connect(store)
-    store.get(key) { value =>
+    store.get_map_entry(key) { value =>
       val c = value.map(decode(_)).getOrElse(0L)
       counter.set(c)
       limit.set(c+increment)

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/Store.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/Store.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/Store.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/store/Store.scala Tue Feb  7 22:13:44 2012
@@ -147,7 +147,12 @@ trait Store extends ServiceTrait {
   /**
    * Gets a value of a previously stored map entry.
    */
-  def get(key:Buffer)(callback:(Option[Buffer])=>Unit )
+  def get_map_entry(key:Buffer)(callback:(Option[Buffer])=>Unit )
+
+  /**
+   * Gets a value of a previously stored map entry.
+   */
+  def get_prefixed_map_entries(prefix:Buffer)(callback: Seq[(Buffer, Buffer)]=>Unit)
 
   /**
    * Loads the queue information for a given queue key.

Modified: activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBClient.scala Tue Feb  7 22:13:44 2012
@@ -39,6 +39,7 @@ import org.apache.activemq.apollo.broker
 import org.apache.activemq.apollo.broker.store.PBSupport
 import java.util.concurrent.atomic.AtomicReference
 import org.fusesource.hawtbuf.{AsciiBuffer, Buffer, AbstractVarIntSupport}
+import org.apache.activemq.apollo.broker.store.leveldb.HelperTrait.encode_key
 
 /**
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
@@ -981,6 +982,17 @@ class LevelDBClient(store: LevelDBStore)
       index.get(encode_key(map_prefix, key)).map(new Buffer(_))
     }
   }
+  
+  def get_prefixed_map_entries(prefix:Buffer):Seq[(Buffer, Buffer)] = {
+    val rc = ListBuffer[(Buffer, Buffer)]()
+    retry_using_index {
+      index.cursor_prefixed(encode_key(map_prefix, prefix)) { (key, value) =>
+        rc += new Buffer(key)->new Buffer(value)
+        true
+      }
+    }
+    rc
+  }  
 
   def get_last_queue_key:Long = {
     retry_using_index {

Modified: activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBStore.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBStore.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBStore.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-leveldb/src/main/scala/org/apache/activemq/apollo/broker/store/leveldb/leveldb/LevelDBStore.scala Tue Feb  7 22:13:44 2012
@@ -163,12 +163,18 @@ class LevelDBStore(val config:LevelDBSto
   }
 
 
-  def get(key: Buffer)(callback: (Option[Buffer]) => Unit) = {
+  def get_map_entry(key: Buffer)(callback: (Option[Buffer]) => Unit) = {
     read_executor {
       callback(client.get(key))
     }
   }
 
+  def get_prefixed_map_entries(prefix:Buffer)(callback: Seq[(Buffer, Buffer)]=>Unit) = {
+    read_executor {
+      callback(client.get_prefixed_map_entries(prefix))
+    }
+  }
+
   /**
    * Ges the last queue key identifier stored.
    */

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-bdb.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-bdb.xml?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-bdb.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-bdb.xml Tue Feb  7 22:13:44 2012
@@ -18,15 +18,15 @@
 <broker xmlns="http://activemq.apache.org/schema/activemq/apollo">
   <notes>Has a BDB store enabled.</notes>
 
-  <virtual_host id="default" purge_on_startup="true">
+  <virtual_host id="default">
     <host_name>localhost</host_name>
 
     <queue name="mirrored.**" mirrored="true"/>
 
-    <bdb_store directory="${basedir}/target/bdb-test-data"/>
+    <bdb_store directory="${testdatadir}"/>
   </virtual_host>
 
   <web_admin bind="http://127.0.0.1:0"/>
-  <connector id="tcp" protocol="stomp" bind="tcp://0.0.0.0:0"/>
+  <connector id="tcp" bind="tcp://0.0.0.0:0"/>
 
 </broker>
\ No newline at end of file

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-custom-dest-delimiters.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-custom-dest-delimiters.xml?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-custom-dest-delimiters.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-custom-dest-delimiters.xml Tue Feb  7 22:13:44 2012
@@ -18,14 +18,14 @@
 <broker xmlns="http://activemq.apache.org/schema/activemq/apollo">
   <notes>This broker configuration is what the unit tests in this module load up.</notes>
 
-  <virtual_host id="default" purge_on_startup="true" auto_create_queues="true">
+  <virtual_host id="default">
     <host_name>localhost</host_name>
 
     <queue name="mirrored.**" mirrored="true"/>
 
   </virtual_host>
 
-  <connector id="tcp" protocol="stomp" bind="tcp://0.0.0.0:0">
+  <connector id="tcp" bind="tcp://0.0.0.0:0">
     <stomp path_separator="/"/>
   </connector>
 

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-leveldb.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-leveldb.xml?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-leveldb.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-leveldb.xml Tue Feb  7 22:13:44 2012
@@ -18,15 +18,15 @@
 <broker xmlns="http://activemq.apache.org/schema/activemq/apollo">
   <notes>Has a LevelDB store enabled.</notes>
 
-  <virtual_host id="default" purge_on_startup="true">
+  <virtual_host id="default">
     <host_name>localhost</host_name>
 
     <queue name="mirrored.**" mirrored="true"/>
 
-    <leveldb_store directory="${basedir}/target/leveldb-test-data"/>
+    <leveldb_store directory="${testdatadir}"/>
   </virtual_host>
 
   <web_admin bind="http://127.0.0.1:0"/>
-  <connector id="tcp" protocol="stomp" bind="tcp://0.0.0.0:0"/>
+  <connector id="tcp" bind="tcp://0.0.0.0:0"/>
 
 </broker>
\ No newline at end of file

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-secure.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-secure.xml?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-secure.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-secure.xml Tue Feb  7 22:13:44 2012
@@ -33,11 +33,11 @@
   <access_rule allow="guest" action="connect"/>
   <access_rule allow="guest" action="create destroy send receive consume" kind="topic queue dsub" id_regex="test.*"/>
 
-  <virtual_host id="default" purge_on_startup="true">
+  <virtual_host id="default">
     <host_name>localhost</host_name>
   </virtual_host>
 
-  <connector id="tcp" protocol="stomp" bind="tcp://0.0.0.0:0">
+  <connector id="tcp" bind="tcp://0.0.0.0:0">
     <stomp add_user_header="JMSXUserID"/>
   </connector>
 

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl-secure.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl-secure.xml?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl-secure.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl-secure.xml Tue Feb  7 22:13:44 2012
@@ -20,11 +20,11 @@
   <authentication domain="StompSslSecurityTest"/>
   <access_rule allow="connect_group" action="connect"/>
 
-  <virtual_host id="default" purge_on_startup="true">
+  <virtual_host id="default">
     <host_name>localhost</host_name>
   </virtual_host>
 
   <key_storage file="${basedir}/src/test/resources/apollo.ks" password="password" key_password="password"/>
-  <connector id="ssl" protocol="stomp" bind="ssl://0.0.0.0:0" />
+  <connector id="ssl" bind="ssl://0.0.0.0:0" />
 
 </broker>
\ No newline at end of file

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl.xml?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp-ssl.xml Tue Feb  7 22:13:44 2012
@@ -18,11 +18,11 @@
 <broker xmlns="http://activemq.apache.org/schema/activemq/apollo">
 
     <notes>The config for the ssl stomp tests.</notes>
-    <virtual_host id="default" purge_on_startup="true" auto_create_queues="true">
+  <virtual_host id="default">
         <host_name>localhost</host_name>
     </virtual_host>
 
     <key_storage file="${basedir}/src/test/resources/apollo.ks" password="password" key_password="password"/>
-    <connector id="ssl" protocol="stomp" bind="ssl://0.0.0.0:0" />
+    <connector id="ssl" bind="ssl://0.0.0.0:0" />
 
 </broker>
\ No newline at end of file

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp.xml?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp.xml (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/resources/apollo-stomp.xml Tue Feb  7 22:13:44 2012
@@ -18,7 +18,7 @@
 <broker xmlns="http://activemq.apache.org/schema/activemq/apollo">
   <notes>This broker configuration is what the unit tests in this module load up.</notes>
 
-  <virtual_host id="default" purge_on_startup="true" auto_create_queues="true">
+  <virtual_host id="default">
     <host_name>localhost</host_name>
 
     <queue name="mirrored.**" mirrored="true"/>
@@ -26,6 +26,6 @@
 
   </virtual_host>
 
-  <connector id="tcp" protocol="stomp" bind="tcp://0.0.0.0:0"/>
+  <connector id="tcp" bind="tcp://0.0.0.0:0"/>
 
 </broker>
\ No newline at end of file

Modified: activemq/activemq-apollo/trunk/apollo-util/src/test/scala/org/apache/activemq/apollo/util/FunSuiteSupport.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-util/src/test/scala/org/apache/activemq/apollo/util/FunSuiteSupport.scala?rev=1241661&r1=1241660&r2=1241661&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-util/src/test/scala/org/apache/activemq/apollo/util/FunSuiteSupport.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-util/src/test/scala/org/apache/activemq/apollo/util/FunSuiteSupport.scala Tue Feb  7 22:13:44 2012
@@ -23,8 +23,8 @@ import java.io.File
 import java.lang.String
 import collection.immutable.Map
 import org.scalatest._
-import FileSupport._
 import java.util.concurrent.TimeUnit
+import FileSupport._
 
 /**
  * @version $Revision : 1.1 $
@@ -47,16 +47,12 @@ abstract class FunSuiteSupport extends F
   /**
    * Returns the base directory of the current project
    */
-  def basedir = {
-    new File(_basedir).getCanonicalFile
-  }
+  def basedir = new File(_basedir).getCanonicalFile
 
   /**
    * Returns ${basedir}/target/test-data
    */
-  def test_data_dir = {
-    new File(new File(_basedir, "target"), "test-data")
-  }
+  def test_data_dir = basedir / "target"/ "test-data"
 
   override protected def beforeAll(map: Map[String, Any]): Unit = {
     _basedir = map.get("basedir") match {
@@ -66,6 +62,8 @@ abstract class FunSuiteSupport extends F
         System.getProperty("basedir", _basedir)
     }
     System.setProperty("basedir", _basedir)
+    System.setProperty("testdatadir", test_data_dir.getCanonicalPath)
+    test_data_dir.recursive_delete
     super.beforeAll(map)
   }