From commits-return-10911-apmail-activemq-commits-archive=activemq.apache.org@activemq.apache.org Mon Jun 01 04:05:54 2009 Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 15933 invoked from network); 1 Jun 2009 04:05:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Jun 2009 04:05:54 -0000 Received: (qmail 74570 invoked by uid 500); 1 Jun 2009 04:06:06 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 74518 invoked by uid 500); 1 Jun 2009 04:06:06 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 74509 invoked by uid 99); 1 Jun 2009 04:06:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2009 04:06:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2009 04:06:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 64BCB23888DB; Mon, 1 Jun 2009 04:05:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r780558 [3/3] - in /activemq/sandbox/activemq-flow: ./ activemq-all/ activemq-all/.settings/ activemq-all/eclipse-classes/ activemq-all/target/ activemq-broker/ activemq-broker/src/main/java/org/apache/activemq/broker/ activemq-broker/src/m... Date: Mon, 01 Jun 2009 04:05:38 -0000 To: commits@activemq.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090601040543.64BCB23888DB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/package.html URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/package.html?rev=780558&view=auto ============================================================================== --- activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/package.html (added) +++ activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/package.html Mon Jun 1 04:05:34 2009 @@ -0,0 +1,27 @@ + + + + + + +

+ Filter implementations for wildcards & JMS selectors +

+ + + Propchange: activemq/sandbox/activemq-flow/activemq-selector/src/main/java/org/apache/activemq/filter/package.html ------------------------------------------------------------------------------ svn:executable = * Modified: activemq/sandbox/activemq-flow/activemq-stomp/pom.xml URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/pom.xml?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-stomp/pom.xml (original) +++ activemq/sandbox/activemq-flow/activemq-stomp/pom.xml Mon Jun 1 04:05:34 2009 @@ -46,6 +46,13 @@ + org.apache.activemq + activemq-broker + ${activemq-version} + test-jar + test + + junit junit test Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageDelivery.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageDelivery.java?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageDelivery.java (original) +++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageDelivery.java Mon Jun 1 04:05:34 2009 @@ -19,6 +19,7 @@ import org.apache.activemq.broker.BrokerMessageDelivery; import org.apache.activemq.broker.Destination; import org.apache.activemq.broker.store.Store.MessageRecord; +import org.apache.activemq.filter.MessageEvaluationContext; import org.apache.activemq.protobuf.AsciiBuffer; import org.apache.activemq.protobuf.Buffer; import org.apache.activemq.transport.stomp.Stomp; @@ -157,5 +158,9 @@ return null; } + public MessageEvaluationContext createMessageEvaluationContext() { + return new StompMessageEvaluationContext(); + } + } Added: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageEvaluationContext.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageEvaluationContext.java?rev=780558&view=auto ============================================================================== --- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageEvaluationContext.java (added) +++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompMessageEvaluationContext.java Mon Jun 1 04:05:34 2009 @@ -0,0 +1,32 @@ +package org.apache.activemq.broker.stomp; + +import org.apache.activemq.filter.Expression; +import org.apache.activemq.filter.FilterException; +import org.apache.activemq.filter.MessageEvaluationContext; + +public class StompMessageEvaluationContext implements MessageEvaluationContext { + + public T getBodyAs(Class type) throws FilterException { + return null; + } + + public T getDestination() { + return null; + } + + public Object getLocalConnectionId() { + // TODO Auto-generated method stub + return null; + } + + public Expression getPropertyExpression(String name) { + // TODO Auto-generated method stub + return null; + } + + public void setDestination(Object destination) { + // TODO Auto-generated method stub + + } + +} Modified: activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompProtocolHandler.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompProtocolHandler.java?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompProtocolHandler.java (original) +++ activemq/sandbox/activemq-flow/activemq-stomp/src/main/java/org/apache/activemq/broker/stomp/StompProtocolHandler.java Mon Jun 1 04:05:34 2009 @@ -26,8 +26,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import javax.jms.InvalidSelectorException; - import org.apache.activemq.WindowLimiter; import org.apache.activemq.broker.BrokerConnection; import org.apache.activemq.broker.BrokerMessageDelivery; @@ -39,6 +37,7 @@ import org.apache.activemq.broker.store.Store.MessageRecord; import org.apache.activemq.command.ActiveMQDestination; import org.apache.activemq.filter.BooleanExpression; +import org.apache.activemq.filter.FilterException; import org.apache.activemq.flow.AbstractLimitedFlowResource; import org.apache.activemq.flow.Flow; import org.apache.activemq.flow.FlowController; @@ -550,7 +549,7 @@ return new Destination.SingleDestination(domain, new AsciiBuffer(dest.getPhysicalName())); } - private static BooleanExpression parseSelector(String selector) throws InvalidSelectorException { + private static BooleanExpression parseSelector(String selector) throws FilterException { BooleanExpression rc = null; if (selector != null) { rc = SelectorParser.parse(selector); Modified: activemq/sandbox/activemq-flow/activemq-store/src/main/java/org/apache/activemq/broker/store/Store.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-store/src/main/java/org/apache/activemq/broker/store/Store.java?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-store/src/main/java/org/apache/activemq/broker/store/Store.java (original) +++ activemq/sandbox/activemq-flow/activemq-store/src/main/java/org/apache/activemq/broker/store/Store.java Mon Jun 1 04:05:34 2009 @@ -23,6 +23,7 @@ import org.apache.activemq.Service; import org.apache.activemq.protobuf.AsciiBuffer; import org.apache.activemq.protobuf.Buffer; +import org.apache.activemq.queue.QueueDescriptor; /** * Interface to persistently store and access data needed by the messaging Modified: activemq/sandbox/activemq-flow/activemq-store/src/main/java/org/apache/activemq/broker/store/memory/MemoryStore.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-store/src/main/java/org/apache/activemq/broker/store/memory/MemoryStore.java?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-store/src/main/java/org/apache/activemq/broker/store/memory/MemoryStore.java (original) +++ activemq/sandbox/activemq-flow/activemq-store/src/main/java/org/apache/activemq/broker/store/memory/MemoryStore.java Mon Jun 1 04:05:34 2009 @@ -26,10 +26,10 @@ import java.util.TreeMap; import java.util.concurrent.atomic.AtomicLong; -import org.apache.activemq.broker.store.QueueDescriptor; import org.apache.activemq.broker.store.Store; import org.apache.activemq.protobuf.AsciiBuffer; import org.apache.activemq.protobuf.Buffer; +import org.apache.activemq.queue.QueueDescriptor; import org.apache.activemq.util.ByteArrayOutputStream; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.Comparators; Modified: activemq/sandbox/activemq-flow/activemq-store/src/test/java/org/apache/activemq/broker/store/StorePerformanceBase.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-store/src/test/java/org/apache/activemq/broker/store/StorePerformanceBase.java?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-store/src/test/java/org/apache/activemq/broker/store/StorePerformanceBase.java (original) +++ activemq/sandbox/activemq-flow/activemq-store/src/test/java/org/apache/activemq/broker/store/StorePerformanceBase.java Mon Jun 1 04:05:34 2009 @@ -31,6 +31,7 @@ import org.apache.activemq.metric.Period; import org.apache.activemq.protobuf.AsciiBuffer; import org.apache.activemq.protobuf.Buffer; +import org.apache.activemq.queue.QueueDescriptor; public abstract class StorePerformanceBase extends TestCase { Modified: activemq/sandbox/activemq-flow/activemq-store/src/test/java/org/apache/activemq/broker/store/StoreTestBase.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-store/src/test/java/org/apache/activemq/broker/store/StoreTestBase.java?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-store/src/test/java/org/apache/activemq/broker/store/StoreTestBase.java (original) +++ activemq/sandbox/activemq-flow/activemq-store/src/test/java/org/apache/activemq/broker/store/StoreTestBase.java Mon Jun 1 04:05:34 2009 @@ -29,6 +29,7 @@ import org.apache.activemq.broker.store.Store.VoidCallback; import org.apache.activemq.protobuf.AsciiBuffer; import org.apache.activemq.protobuf.Buffer; +import org.apache.activemq.queue.QueueDescriptor; public abstract class StoreTestBase extends TestCase { Modified: activemq/sandbox/activemq-flow/activemq-transport/pom.xml URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-transport/pom.xml?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-transport/pom.xml (original) +++ activemq/sandbox/activemq-flow/activemq-transport/pom.xml Mon Jun 1 04:05:34 2009 @@ -42,10 +42,11 @@ activemq-dispatcher - org.apache.activemq - activemq-flow + commons-logging + commons-logging + 1.1 - + junit Copied: activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/TransportFactory.java (from r780474, activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/transport/TransportFactory.java) URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/TransportFactory.java?p2=activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/TransportFactory.java&p1=activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/transport/TransportFactory.java&r1=780474&r2=780558&rev=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/transport/TransportFactory.java (original) +++ activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/TransportFactory.java Mon Jun 1 04:05:34 2009 @@ -243,7 +243,7 @@ transport = compositeConfigure(transport, wf, options); transport = new MutexTransport(transport); - transport = new ResponseCorrelator(transport); +// transport = new ResponseCorrelator(transport); return transport; } Copied: activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/pipe/Pipe.java (from r780474, activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/flow/Pipe.java) URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/pipe/Pipe.java?p2=activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/pipe/Pipe.java&p1=activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/flow/Pipe.java&r1=780474&r2=780558&rev=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/flow/Pipe.java (original) +++ activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/pipe/Pipe.java Mon Jun 1 04:05:34 2009 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.activemq.flow; +package org.apache.activemq.transport.pipe; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; Copied: activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/pipe/PipeTransportFactory.java (from r780474, activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/flow/PipeTransportFactory.java) URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/pipe/PipeTransportFactory.java?p2=activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/pipe/PipeTransportFactory.java&p1=activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/flow/PipeTransportFactory.java&r1=780474&r2=780558&rev=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/activemq-broker/src/test/java/org/apache/activemq/flow/PipeTransportFactory.java (original) +++ activemq/sandbox/activemq-flow/activemq-transport/src/main/java/org/apache/activemq/transport/pipe/PipeTransportFactory.java Mon Jun 1 04:05:34 2009 @@ -1,4 +1,4 @@ -package org.apache.activemq.flow; +package org.apache.activemq.transport.pipe; import java.io.IOException; import java.io.InterruptedIOException; @@ -11,11 +11,9 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import org.apache.activemq.command.BrokerInfo; import org.apache.activemq.dispatch.IDispatcher; import org.apache.activemq.dispatch.IDispatcher.DispatchContext; import org.apache.activemq.dispatch.IDispatcher.Dispatchable; -import org.apache.activemq.flow.Pipe.ReadReadyListener; import org.apache.activemq.transport.DispatchableTransport; import org.apache.activemq.transport.FutureResponse; import org.apache.activemq.transport.ResponseCallback; @@ -24,6 +22,7 @@ import org.apache.activemq.transport.TransportFactory; import org.apache.activemq.transport.TransportListener; import org.apache.activemq.transport.TransportServer; +import org.apache.activemq.transport.pipe.Pipe.ReadReadyListener; import org.apache.activemq.util.ByteSequence; import org.apache.activemq.util.IOExceptionSupport; import org.apache.activemq.util.URISupport; @@ -217,9 +216,6 @@ this.listener = listener; } - public void setBrokerInfo(BrokerInfo brokerInfo) { - } - public void start() throws Exception { } Added: activemq/sandbox/activemq-flow/activemq-util/src/main/java/org/apache/activemq/util/LRUCache.java URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-util/src/main/java/org/apache/activemq/util/LRUCache.java?rev=780558&view=auto ============================================================================== --- activemq/sandbox/activemq-flow/activemq-util/src/main/java/org/apache/activemq/util/LRUCache.java (added) +++ activemq/sandbox/activemq-flow/activemq-util/src/main/java/org/apache/activemq/util/LRUCache.java Mon Jun 1 04:05:34 2009 @@ -0,0 +1,85 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.activemq.util; + +import java.util.LinkedHashMap; +import java.util.Map; + +/** + * A Simple LRU Cache + * + * @version $Revision$ + * @param + * @param + */ + +public class LRUCache extends LinkedHashMap { + private static final long serialVersionUID = -342098639681884413L; + protected int maxCacheSize = 10000; + + /** + * Default constructor for an LRU Cache The default capacity is 10000 + */ + public LRUCache() { + this(0,10000, 0.75f, true); + } + + /** + * Constructs a LRUCache with a maximum capacity + * + * @param maximumCacheSize + */ + public LRUCache(int maximumCacheSize) { + this(0, maximumCacheSize, 0.75f, true); + } + + /** + * Constructs an empty LRUCache instance with the specified + * initial capacity, maximumCacheSize,load factor and ordering mode. + * + * @param initialCapacity the initial capacity. + * @param maximumCacheSize + * @param loadFactor the load factor. + * @param accessOrder the ordering mode - true for access-order, + * false for insertion-order. + * @throws IllegalArgumentException if the initial capacity is negative or + * the load factor is non-positive. + */ + + public LRUCache(int initialCapacity, int maximumCacheSize, float loadFactor, boolean accessOrder) { + super(initialCapacity, loadFactor, accessOrder); + this.maxCacheSize = maximumCacheSize; + } + + /** + * @return Returns the maxCacheSize. + */ + public int getMaxCacheSize() { + return maxCacheSize; + } + + /** + * @param maxCacheSize The maxCacheSize to set. + */ + public void setMaxCacheSize(int maxCacheSize) { + this.maxCacheSize = maxCacheSize; + } + + protected boolean removeEldestEntry(Map.Entry eldest) { + return size() > maxCacheSize; + } +} Propchange: activemq/sandbox/activemq-flow/activemq-util/src/main/java/org/apache/activemq/util/LRUCache.java ------------------------------------------------------------------------------ svn:executable = * Modified: activemq/sandbox/activemq-flow/kahadb/pom.xml URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/kahadb/pom.xml?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/kahadb/pom.xml (original) +++ activemq/sandbox/activemq-flow/kahadb/pom.xml Mon Jun 1 04:05:34 2009 @@ -27,7 +27,7 @@ org.apache.activemq kahadb - bundle + jar ActiveMQ :: KahaDB An Embedded Lightweight Non-Relational Database Modified: activemq/sandbox/activemq-flow/pom.xml URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/pom.xml?rev=780558&r1=780557&r2=780558&view=diff ============================================================================== --- activemq/sandbox/activemq-flow/pom.xml (original) +++ activemq/sandbox/activemq-flow/pom.xml Mon Jun 1 04:05:34 2009 @@ -124,6 +124,7 @@ activemq-client activemq-network activemq-all + activemq-selector