activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r961067 [5/5] - in /activemq/sandbox/activemq-apollo-actor: activemq-broker/src/main/java/org/apache/activemq/apollo/ activemq-broker/src/main/java/org/apache/activemq/apollo/broker/ activemq-broker/src/test/java/org/apache/activemq/broker/...
Date Wed, 07 Jul 2010 03:39:04 GMT
Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/VirtualHost.java
Wed Jul  7 03:39:03 2010
@@ -27,12 +27,11 @@ import org.apache.activemq.apollo.broker
 import org.apache.activemq.apollo.broker.path.PathFilter;
 import org.apache.activemq.broker.store.Store;
 import org.apache.activemq.broker.store.StoreFactory;
-import org.apache.activemq.dispatch.internal.RunnableCountDownLatch;
-import org.apache.activemq.queue.IQueue;
 import org.apache.activemq.util.IOHelper;
 import org.apache.activemq.util.buffer.AsciiBuffer;
 import org.fusesource.hawtdispatch.Dispatch;
 import org.fusesource.hawtdispatch.DispatchQueue;
+import org.fusesource.hawtdispatch.internal.util.RunnableCountDownLatch;
 
 /**
  * @author chirino
@@ -132,17 +131,18 @@ public class VirtualHost implements Serv
         queueStore.loadQueues();
 
         // Create Queue instances
-        for (IQueue<Long, MessageDelivery> iQueue : queueStore.getSharedQueues()) {
-            Queue queue = new Queue(iQueue);
-            Domain domain = router.getDomain(Router.QUEUE_DOMAIN);
-            Destination dest = new Destination.SingleDestination(Router.QUEUE_DOMAIN, iQueue.getDescriptor().getQueueName());
-            queue.setDestination(dest);
-            domain.bind(dest.getName(), queue);
-            queues.put(dest.getName(), queue);
-        }
-        for (Queue queue : queues.values()) {
-            queue.start();
-        }
+//        TODO:
+//        for (IQueue<Long, MessageDelivery> iQueue : queueStore.getSharedQueues())
{
+//            Queue queue = new Queue(iQueue);
+//            Domain domain = router.getDomain(Router.QUEUE_DOMAIN);
+//            Destination dest = new Destination.SingleDestination(Router.QUEUE_DOMAIN, iQueue.getDescriptor().getQueueName());
+//            queue.setDestination(dest);
+//            domain.bind(dest.getName(), queue);
+//            queues.put(dest.getName(), queue);
+//        }
+//        for (Queue queue : queues.values()) {
+//            queue.start();
+//        }
 
         //Recover transactions:
         txnManager = new TransactionManager(this);
@@ -173,12 +173,13 @@ public class VirtualHost implements Serv
         }
         done.await();
 
-        ArrayList<IQueue<Long, MessageDelivery>> durableQueues = new ArrayList<IQueue<Long,MessageDelivery>>(queueStore.getDurableQueues());
-        done = new RunnableCountDownLatch(durableQueues.size());
-        for (IQueue<Long, MessageDelivery> queue : durableQueues) {
-            queue.shutdown(done);
-        }
-        done.await();
+// TODO:
+//        ArrayList<IQueue<Long, MessageDelivery>> durableQueues = new ArrayList<IQueue<Long,MessageDelivery>>(queueStore.getDurableQueues());
+//        done = new RunnableCountDownLatch(durableQueues.size());
+//        for (IQueue<Long, MessageDelivery> queue : durableQueues) {
+//            queue.shutdown(done);
+//        }
+//        done.await();
         
         database.stop();
         started = false;
@@ -191,20 +192,21 @@ public class VirtualHost implements Serv
         }
 
         Queue queue = queues.get(dest);
-        // If the queue doesn't exist create it:
-        if (queue == null) {
-            IQueue<Long, MessageDelivery> iQueue = queueStore.createSharedQueue(dest.getName().toString());
-            queue = new Queue(iQueue);
-            queue.setDestination(dest);
-            Domain domain = router.getDomain(dest.getDomain());
-            domain.bind(dest.getName(), queue);
-            queues.put(dest.getName(), queue);
-
-            for (QueueLifecyleListener l : queueLifecyleListeners) {
-                l.onCreate(queue);
-            }
-        }
-        queue.start();
+//        TODO:
+//        // If the queue doesn't exist create it:
+//        if (queue == null) {
+//            IQueue<Long, MessageDelivery> iQueue = queueStore.createSharedQueue(dest.getName().toString());
+//            queue = new Queue(iQueue);
+//            queue.setDestination(dest);
+//            Domain domain = router.getDomain(dest.getDomain());
+//            domain.bind(dest.getName(), queue);
+//            queues.put(dest.getName(), queue);
+//
+//            for (QueueLifecyleListener l : queueLifecyleListeners) {
+//                l.onCreate(queue);
+//            }
+//        }
+//        queue.start();
         return queue;
     }
 
@@ -239,16 +241,19 @@ public class VirtualHost implements Serv
             if (consumer.isDurable()) {
                 DurableSubscription dsub = durableSubs.get(consumer.getSubscriptionName());
                 if (dsub == null) {
-                    IQueue<Long, MessageDelivery> queue = queueStore.createDurableQueue(consumer.getSubscriptionName());
-                    queue.start();
-                    dsub = new DurableSubscription(this, destination, consumer.getSelectorExpression(),
queue);
-                    durableSubs.put(consumer.getSubscriptionName(), dsub);
+//                    TODO:
+//                    IQueue<Long, MessageDelivery> queue = queueStore.createDurableQueue(consumer.getSubscriptionName());
+//                    queue.start();
+//                    dsub = new DurableSubscription(this, destination, consumer.getSelectorExpression(),
queue);
+//                    durableSubs.put(consumer.getSubscriptionName(), dsub);
                 }
                 return dsub;
             }
 
             // return a standard subscription
-            return new TopicSubscription(this, destination, consumer.getSelectorExpression());
+//            TODO:
+//            return new TopicSubscription(this, destination, consumer.getSelectorExpression());
+            return null;
         }
 
         // It looks like a wild card subscription on a queue.. 
@@ -265,7 +270,9 @@ public class VirtualHost implements Serv
                 throw new IllegalStateException("The queue does not exist: " + destination.getName());
             }
         }
-        return new Queue.QueueSubscription(queue);
+//        TODO:
+//        return new Queue.QueueSubscription(queue);
+        return null;
     }
 
     public Broker getBroker() {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/XATransaction.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/XATransaction.java?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/XATransaction.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-broker/src/main/java/org/apache/activemq/apollo/broker/XATransaction.java
Wed Jul  7 03:39:03 2010
@@ -20,7 +20,6 @@ import java.io.IOException;
 
 import javax.transaction.xa.XAException;
 
-import org.apache.activemq.queue.IQueue;
 import org.apache.activemq.util.buffer.Buffer;
 
 /**
@@ -33,58 +32,58 @@ import org.apache.activemq.util.buffer.B
  * @version 1.0
  */
 public class XATransaction extends Transaction {
-
-    private final Buffer xid;
-
-    XATransaction(TransactionManager manager, long tid, Buffer xid, IQueue<Long, TxOp>
opQueue) {
-        super(manager, tid, opQueue);
-        this.xid = xid;
-    }
-
-    public Buffer getXid() {
-        return xid;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.apollo.broker.Transaction#commit(boolean)
-     */
-    @Override
-    public void commit(boolean onePhase, TransactionListener listener) throws XAException,
IOException {
-        // TODO Auto-generated method stub
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.apollo.broker.Transaction#prepare()
-     */
-    @Override
-    public int prepare(TransactionListener listener) throws XAException, IOException {
-        // TODO Auto-generated method stub
-        return 0;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.apollo.broker.Transaction#rollback()
-     */
-    @Override
-    public void rollback(TransactionListener listener) throws XAException, IOException {
-        // TODO Auto-generated method stub
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.apache.activemq.apollo.broker.Transaction#getType()
-     */
-    @Override
-    public byte getType() {
-        return TYPE_XA;
-    }
+// TODO:
+//    private final Buffer xid;
+//
+//    XATransaction(TransactionManager manager, long tid, Buffer xid, IQueue<Long, TxOp>
opQueue) {
+//        super(manager, tid, opQueue);
+//        this.xid = xid;
+//    }
+//
+//    public Buffer getXid() {
+//        return xid;
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     *
+//     * @see org.apache.activemq.apollo.broker.Transaction#commit(boolean)
+//     */
+//    @Override
+//    public void commit(boolean onePhase, TransactionListener listener) throws XAException,
IOException {
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     *
+//     * @see org.apache.activemq.apollo.broker.Transaction#prepare()
+//     */
+//    @Override
+//    public int prepare(TransactionListener listener) throws XAException, IOException {
+//        // TODO Auto-generated method stub
+//        return 0;
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     *
+//     * @see org.apache.activemq.apollo.broker.Transaction#rollback()
+//     */
+//    @Override
+//    public void rollback(TransactionListener listener) throws XAException, IOException
{
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    /*
+//     * (non-Javadoc)
+//     *
+//     * @see org.apache.activemq.apollo.broker.Transaction#getType()
+//     */
+//    @Override
+//    public byte getType() {
+//        return TYPE_XA;
+//    }
 }

Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/BrokerTestBase.java
Wed Jul  7 03:39:03 2010
@@ -30,8 +30,6 @@ import org.apache.activemq.apollo.broker
 import org.apache.activemq.apollo.broker.Router;
 import org.apache.activemq.broker.store.Store;
 import org.apache.activemq.broker.store.StoreFactory;
-import org.apache.activemq.dispatch.Dispatcher;
-import org.apache.activemq.dispatch.DispatcherConfig;
 import org.apache.activemq.metric.MetricAggregator;
 import org.apache.activemq.metric.Period;
 import org.apache.activemq.transport.TransportFactory;
@@ -87,7 +85,6 @@ public abstract class BrokerTestBase {
     protected Broker sendBroker;
     protected Broker rcvBroker;
     protected ArrayList<Broker> brokers = new ArrayList<Broker>();
-    protected Dispatcher dispatcher;
     protected final AtomicLong msgIdGenerator = new AtomicLong();
     protected final AtomicBoolean stopping = new AtomicBoolean();
 
@@ -96,9 +93,7 @@ public abstract class BrokerTestBase {
 
     @Before
     public void setUp() throws Exception {
-        dispatcher = createDispatcher();
-        dispatcher.resume();
-        
+
         if (tcp) {
             sendBrokerBindURI = "tcp://localhost:10000?wireFormat=" + getBrokerWireFormat();
             receiveBrokerBindURI = "tcp://localhost:20000?wireFormat=" + getBrokerWireFormat();
@@ -134,10 +129,6 @@ public abstract class BrokerTestBase {
 
     protected abstract String getRemoteWireFormat();
 
-    protected Dispatcher createDispatcher() {
-        return DispatcherConfig.create("test", asyncThreadPoolSize);
-    }
-
     @Test
     public void benchmark_1_1_0() throws Exception {
         setName("1 producer -> 1 destination -> 0 consumers");
@@ -534,9 +525,6 @@ public abstract class BrokerTestBase {
         for (RemoteConsumer connection : consumers) {
             connection.stop();
         }
-        if (dispatcher != null) {
-            dispatcher.release();
-        }
     }
 
     private void startBrokers() throws Exception {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/RemoteConsumer.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/RemoteConsumer.java?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/RemoteConsumer.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/RemoteConsumer.java
Wed Jul  7 03:39:03 2010
@@ -6,7 +6,6 @@ import java.util.concurrent.TimeUnit;
 import org.apache.activemq.apollo.Connection;
 import org.apache.activemq.apollo.broker.Destination;
 import org.apache.activemq.apollo.broker.MessageDelivery;
-import org.apache.activemq.flow.ISourceController;
 import org.apache.activemq.metric.MetricAggregator;
 import org.apache.activemq.metric.MetricCounter;
 import org.apache.activemq.transport.TransportFactory;
@@ -33,39 +32,40 @@ abstract public class RemoteConsumer ext
         initialize();
         super.start();
         setupSubscription();
-        
+
     }
 
-    
+
     abstract protected void setupSubscription() throws Exception;
 
-    protected void messageReceived(final ISourceController<MessageDelivery> controller,
final MessageDelivery elem) {
-        if( schedualWait ) {
-            if (thinkTime > 0) {
-                dispatchQueue.dispatchAfter(thinkTime, TimeUnit.MILLISECONDS, new Runnable(){
-                    public void run() {
-                        consumerRate.increment();
-                        controller.elementDispatched(elem);
-                    }
-                });
-                
-            }
-            else
-            {
-                consumerRate.increment();
-                controller.elementDispatched(elem);
-            }
-
-        } else {
-            if( thinkTime>0 ) {
-                try {
-                    Thread.sleep(thinkTime);
-                } catch (InterruptedException e) {
-                }
-            }
-            consumerRate.increment();
-            controller.elementDispatched(elem);
-        }
+    protected void messageReceived(final MessageDelivery elem) {
+//        TODO:
+//        if( schedualWait ) {
+//            if (thinkTime > 0) {
+//                dispatchQueue.dispatchAfter(thinkTime, TimeUnit.MILLISECONDS, new Runnable(){
+//                    public void run() {
+//                        consumerRate.increment();
+//                        controller.elementDispatched(elem);
+//                    }
+//                });
+//
+//            }
+//            else
+//            {
+//                consumerRate.increment();
+//                controller.elementDispatched(elem);
+//            }
+//
+//        } else {
+//            if( thinkTime>0 ) {
+//                try {
+//                    Thread.sleep(thinkTime);
+//                } catch (InterruptedException e) {
+//                }
+//            }
+//            consumerRate.increment();
+//            controller.elementDispatched(elem);
+//        }
     }
 
     public MetricAggregator getTotalConsumerRate() {
@@ -75,7 +75,7 @@ abstract public class RemoteConsumer ext
     public void setTotalConsumerRate(MetricAggregator totalConsumerRate) {
         this.totalConsumerRate = totalConsumerRate;
     }
-    
+
     public boolean isDurable() {
         return durable;
     }
@@ -118,4 +118,5 @@ abstract public class RemoteConsumer ext
 
     public void setUri(URI uri) {
         this.uri = uri;
-    }}
+    }
+}

Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/RemoteProducer.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/RemoteProducer.java?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/RemoteProducer.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/RemoteProducer.java
Wed Jul  7 03:39:03 2010
@@ -6,18 +6,11 @@ import java.util.concurrent.atomic.Atomi
 import org.apache.activemq.apollo.Connection;
 import org.apache.activemq.apollo.broker.Destination;
 import org.apache.activemq.apollo.broker.MessageDelivery;
-import org.apache.activemq.dispatch.DispatchQueue;
-import org.apache.activemq.flow.IFlowController;
-import org.apache.activemq.flow.IFlowSink;
-import org.apache.activemq.flow.ISinkController;
-import org.apache.activemq.flow.ISinkController.FlowUnblockListener;
 import org.apache.activemq.metric.MetricAggregator;
 import org.apache.activemq.metric.MetricCounter;
 import org.apache.activemq.transport.TransportFactory;
 
-import static org.apache.activemq.dispatch.DispatchOption.*;
-
-abstract public class RemoteProducer extends Connection implements FlowUnblockListener<MessageDelivery>
{
+abstract public class RemoteProducer extends Connection {
 
     protected final MetricCounter rate = new MetricCounter();
 
@@ -36,8 +29,9 @@ abstract public class RemoteProducer ext
     protected int payloadSize = 20;
     protected URI uri;
 
-    protected IFlowController<MessageDelivery> outboundController;
-    protected IFlowSink<MessageDelivery> outboundQueue;
+//    TODO:
+//    protected IFlowController<MessageDelivery> outboundController;
+//    protected IFlowSink<MessageDelivery> outboundQueue;
 
     
     public void start() throws Exception {
@@ -70,27 +64,28 @@ abstract public class RemoteProducer ext
     }
     
     public void dispatch() {
-        while(true)
-        {
-            
-            if(next == null)
-            {
-                createNextMessage();
-            }
-            
-            //If flow controlled stop until flow control is lifted.
-            if(outboundController.isSinkBlocked())
-            {
-                if(outboundController.addUnblockListener(this))
-                {
-                    return;
-                }
-            }
-            
-            outboundQueue.add(next, null);
-            rate.increment();
-            next = null;
-        }
+//       TODO:
+//        while(true)
+//        {
+//
+//            if(next == null)
+//            {
+//                createNextMessage();
+//            }
+//
+//            //If flow controlled stop until flow control is lifted.
+//            if(outboundController.isSinkBlocked())
+//            {
+//                if(outboundController.addUnblockListener(this))
+//                {
+//                    return;
+//                }
+//            }
+//
+//            outboundQueue.add(next, null);
+//            rate.increment();
+//            next = null;
+//        }
     }
 
     abstract protected void setupProducer() throws Exception;
@@ -103,9 +98,9 @@ abstract public class RemoteProducer ext
     	super.stop();
     }
     
-	public void onFlowUnblocked(ISinkController<MessageDelivery> controller) {
-        dispatchQueue.dispatchAsync(dispatchTask);
-	}
+//	public void onFlowUnblocked(ISinkController<MessageDelivery> controller) {
+//        dispatchQueue.dispatchAsync(dispatchTask);
+//	}
 
     protected String createPayload() {
         if( payloadSize>=0 ) {

Modified: activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-broker/src/test/java/org/apache/activemq/broker/SharedQueueTest.java
Wed Jul  7 03:39:03 2010
@@ -26,7 +26,6 @@ import org.apache.activemq.apollo.broker
 import org.apache.activemq.apollo.broker.MessageDelivery;
 import org.apache.activemq.broker.store.Store;
 import org.apache.activemq.broker.store.StoreFactory;
-import org.apache.activemq.queue.IQueue;
 import org.fusesource.hawtdispatch.Dispatch;
 import org.fusesource.hawtdispatch.DispatchQueue;
 
@@ -36,77 +35,77 @@ import org.fusesource.hawtdispatch.Dispa
  */
 public class SharedQueueTest extends TestCase {
 
-
-    DispatchQueue dispatchQueue;
-    BrokerDatabase database;
-    BrokerQueueStore queueStore;
-    private static final boolean USE_KAHA_DB = true;
-    private static final boolean PERSISTENT = true;
-    private static final boolean PURGE_STORE = false;
-
-    protected ArrayList<IQueue<Long, MessageDelivery>> queues = new ArrayList<IQueue<Long,
MessageDelivery>>();
-
-    protected DispatchQueue createDispatcher() {
-        return Dispatch.createQueue();
-    }
-
-    protected int consumerStartDelay = 0;
-
-    @Override
-    protected void setUp() throws Exception {
-    	startServices();
-    }
-    
-    @Override
-    protected void tearDown() throws Exception {
-    	stopServices();
-    }
-    
-    protected void startServices() throws Exception {
-        dispatchQueue = createDispatcher();
-        dispatchQueue.resume();
-        database = new BrokerDatabase(createStore());
-        database.setDispatchQueue(dispatchQueue);
-        database.start();
-        queueStore = new BrokerQueueStore();
-        queueStore.setDatabase(database);
-        queueStore.loadQueues();
-    }
-
-    protected void stopServices() throws Exception {
-        database.stop();
-        dispatchQueue.release();
-        queues.clear();
-    }
-
-    protected Store createStore() throws Exception {
-        Store store = null;
-        if (USE_KAHA_DB) {
-            store = StoreFactory.createStore("kaha-db");
-        } else {
-            store = StoreFactory.createStore("memory");
-        }
-
-        store.setStoreDirectory(new File("target/test-data/shared-queue-test/"));
-        store.setDeleteAllMessages(PURGE_STORE);
-        return store;
-    }
-    
-    private final void createQueues(int count) {
-        for (int i = 0; i < count; i++) {
-            IQueue<Long, MessageDelivery> queue = queueStore.createSharedQueue("queue-"
+ (i + 1));
-            queues.add(queue);
-        }
-    }
-
-    protected void cleanup() throws Exception {
-        queues.clear();
-        stopServices();
-    }
-    
-    public void testExpiration() {
-        createQueues(1);
-        IQueue<Long, MessageDelivery> queue = queues.get(0);
-    }
+// TODO:
+//    DispatchQueue dispatchQueue;
+//    BrokerDatabase database;
+//    BrokerQueueStore queueStore;
+//    private static final boolean USE_KAHA_DB = true;
+//    private static final boolean PERSISTENT = true;
+//    private static final boolean PURGE_STORE = false;
+//
+//    protected ArrayList<IQueue<Long, MessageDelivery>> queues = new ArrayList<IQueue<Long,
MessageDelivery>>();
+//
+//    protected DispatchQueue createDispatcher() {
+//        return Dispatch.createQueue();
+//    }
+//
+//    protected int consumerStartDelay = 0;
+//
+//    @Override
+//    protected void setUp() throws Exception {
+//    	startServices();
+//    }
+//
+//    @Override
+//    protected void tearDown() throws Exception {
+//    	stopServices();
+//    }
+//
+//    protected void startServices() throws Exception {
+//        dispatchQueue = createDispatcher();
+//        dispatchQueue.resume();
+//        database = new BrokerDatabase(createStore());
+//        database.setDispatchQueue(dispatchQueue);
+//        database.start();
+//        queueStore = new BrokerQueueStore();
+//        queueStore.setDatabase(database);
+//        queueStore.loadQueues();
+//    }
+//
+//    protected void stopServices() throws Exception {
+//        database.stop();
+//        dispatchQueue.release();
+//        queues.clear();
+//    }
+//
+//    protected Store createStore() throws Exception {
+//        Store store = null;
+//        if (USE_KAHA_DB) {
+//            store = StoreFactory.createStore("kaha-db");
+//        } else {
+//            store = StoreFactory.createStore("memory");
+//        }
+//
+//        store.setStoreDirectory(new File("target/test-data/shared-queue-test/"));
+//        store.setDeleteAllMessages(PURGE_STORE);
+//        return store;
+//    }
+//
+//    private final void createQueues(int count) {
+//        for (int i = 0; i < count; i++) {
+//            IQueue<Long, MessageDelivery> queue = queueStore.createSharedQueue("queue-"
+ (i + 1));
+//            queues.add(queue);
+//        }
+//    }
+//
+//    protected void cleanup() throws Exception {
+//        queues.clear();
+//        stopServices();
+//    }
+//
+//    public void testExpiration() {
+//        createQueues(1);
+//        IQueue<Long, MessageDelivery> queue = queues.get(0);
+//    }
 
 }

Modified: activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/pom.xml?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/pom.xml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-hawtdb/pom.xml Wed Jul  7 03:39:03 2010
@@ -29,7 +29,7 @@
   <packaging>jar</packaging>
   <version>6.0-SNAPSHOT</version>
 
-  <name>ActiveMQ :: HawtDB</name>
+  <name>ActiveMQ :: Store :: HawtDB</name>
 
   <dependencies>
 

Modified: activemq/sandbox/activemq-apollo-actor/activemq-jaxb/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-jaxb/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-jaxb/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java
(original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-jaxb/src/test/java/org/apache/activemq/apollo/jaxb/JAXBConfigTest.java
Wed Jul  7 03:39:03 2010
@@ -26,7 +26,6 @@ import junit.framework.TestCase;
 import org.apache.activemq.apollo.broker.Broker;
 import org.apache.activemq.apollo.broker.BrokerFactory;
 import org.apache.activemq.broker.store.memory.MemoryStore;
-import org.apache.activemq.dispatch.Dispatcher;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.junit.Test;

Modified: activemq/sandbox/activemq-apollo-actor/activemq-tcp/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-apollo-actor/activemq-tcp/pom.xml?rev=961067&r1=961066&r2=961067&view=diff
==============================================================================
--- activemq/sandbox/activemq-apollo-actor/activemq-tcp/pom.xml (original)
+++ activemq/sandbox/activemq-apollo-actor/activemq-tcp/pom.xml Wed Jul  7 03:39:03 2010
@@ -25,11 +25,11 @@
   </parent>
 
   <groupId>org.apache.activemq</groupId>
-  <artifactId>activemq-nio</artifactId>
+  <artifactId>activemq-tcp</artifactId>
   <packaging>jar</packaging>
   <version>6.0-SNAPSHOT</version>
 
-  <name>ActiveMQ :: NIO</name>
+  <name>ActiveMQ :: Transport :: TCP</name>
 
   <dependencies>
 



Mime
View raw message