You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2012/08/03 14:14:12 UTC
svn commit: r1368910 [14/27] - in /qpid/branches/asyncstore: ./ bin/
cpp/bindings/qmf/ruby/ cpp/bindings/qmf2/ruby/ cpp/bindings/qpid/python/
cpp/bindings/qpid/ruby/ cpp/bindings/qpid/ruby/features/
cpp/bindings/qpid/ruby/features/step_definitions/ cpp...
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java Fri Aug 3 12:13:32 2012
@@ -30,15 +30,12 @@ import org.apache.qpid.server.logging.Lo
import org.apache.qpid.server.logging.actors.CurrentActor;
import org.apache.qpid.server.logging.messages.ExchangeMessages;
import org.apache.qpid.server.logging.subjects.ExchangeLogSubject;
-import org.apache.qpid.server.management.Managable;
-import org.apache.qpid.server.management.ManagedObject;
import org.apache.qpid.server.message.InboundMessage;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.BaseQueue;
import org.apache.qpid.server.queue.QueueRegistry;
import org.apache.qpid.server.virtualhost.VirtualHost;
-import javax.management.JMException;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -50,10 +47,8 @@ import java.util.concurrent.atomic.Atomi
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
-public abstract class AbstractExchange implements Exchange, Managable
+public abstract class AbstractExchange implements Exchange
{
-
-
private AMQShortString _name;
private final AtomicBoolean _closed = new AtomicBoolean();
@@ -66,9 +61,6 @@ public abstract class AbstractExchange i
private final List<Exchange.Task> _closeTaskList = new CopyOnWriteArrayList<Exchange.Task>();
-
- private AbstractExchangeMBean _exchangeMbean;
-
/**
* Whether the exchange is automatically deleted once all queues have detached from it
*/
@@ -86,12 +78,16 @@ public abstract class AbstractExchange i
private final AtomicLong _receivedMessageSize = new AtomicLong();
private final AtomicLong _routedMessageCount = new AtomicLong();
private final AtomicLong _routedMessageSize = new AtomicLong();
+ private final AtomicLong _droppedMessageCount = new AtomicLong();
+ private final AtomicLong _droppedMessageSize = new AtomicLong();
private final CopyOnWriteArrayList<Exchange.BindingListener> _listeners = new CopyOnWriteArrayList<Exchange.BindingListener>();
//TODO : persist creation time
private long _createTime = System.currentTimeMillis();
+ private UUID _qmfId;
+
public AbstractExchange(final ExchangeType<? extends Exchange> type)
{
_type = type;
@@ -107,13 +103,6 @@ public abstract class AbstractExchange i
return _type.getName();
}
- /**
- * Concrete exchanges must implement this method in order to create the managed representation. This is
- * called during initialisation (template method pattern).
- * @return the MBean
- */
- protected abstract AbstractExchangeMBean createMBean() throws JMException;
-
public void initialise(UUID id, VirtualHost host, AMQShortString name, boolean durable, int ticket, boolean autoDelete)
throws AMQException
{
@@ -124,28 +113,14 @@ public abstract class AbstractExchange i
_ticket = ticket;
_id = id;
-
+ _qmfId = getConfigStore().createId();
getConfigStore().addConfiguredObject(this);
- createAndRegisterMBean();
_logSubject = new ExchangeLogSubject(this, this.getVirtualHost());
// Log Exchange creation
CurrentActor.get().message(ExchangeMessages.CREATED(String.valueOf(getTypeShortString()), String.valueOf(name), durable));
}
- private void createAndRegisterMBean()
- {
- try
- {
- _exchangeMbean = createMBean();
- _exchangeMbean.register();
- }
- catch (JMException e)
- {
- throw new RuntimeException("Failed to register mbean",e);
- }
- }
-
public ConfigStore getConfigStore()
{
return getVirtualHost().getConfigStore();
@@ -171,10 +146,6 @@ public abstract class AbstractExchange i
if(_closed.compareAndSet(false,true))
{
- if (_exchangeMbean != null)
- {
- _exchangeMbean.unregister();
- }
getConfigStore().removeConfiguredObject(this);
if(_alternateExchange != null)
{
@@ -196,11 +167,6 @@ public abstract class AbstractExchange i
return getClass().getSimpleName() + "[" + getNameShortString() +"]";
}
- public ManagedObject getManagedObject()
- {
- return _exchangeMbean;
- }
-
public VirtualHost getVirtualHost()
{
return _virtualHost;
@@ -332,6 +298,12 @@ public abstract class AbstractExchange i
return _id;
}
+ @Override
+ public UUID getQMFId()
+ {
+ return _qmfId;
+ }
+
public ExchangeConfigType getConfigType()
{
return ExchangeConfigType.getInstance();
@@ -359,6 +331,11 @@ public abstract class AbstractExchange i
_routedMessageCount.incrementAndGet();
_routedMessageSize.addAndGet(message.getSize());
}
+ else
+ {
+ _droppedMessageCount.incrementAndGet();
+ _droppedMessageSize.addAndGet(message.getSize());
+ }
return queues;
}
@@ -374,6 +351,11 @@ public abstract class AbstractExchange i
return _routedMessageCount.get();
}
+ public long getMsgDrops()
+ {
+ return _droppedMessageCount.get();
+ }
+
public long getByteReceives()
{
return _receivedMessageSize.get();
@@ -384,6 +366,11 @@ public abstract class AbstractExchange i
return _routedMessageSize.get();
}
+ public long getByteDrops()
+ {
+ return _droppedMessageSize.get();
+ }
+
public long getCreateTime()
{
return _createTime;
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeRegistry.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeRegistry.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/DefaultExchangeRegistry.java Fri Aug 3 12:13:32 2012
@@ -29,7 +29,9 @@ import org.apache.qpid.protocol.AMQConst
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.virtualhost.VirtualHost;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -46,6 +48,8 @@ public class DefaultExchangeRegistry imp
private Exchange _defaultExchange;
private VirtualHost _host;
+ private final Collection<RegistryChangeListener> _listeners =
+ Collections.synchronizedCollection(new ArrayList<RegistryChangeListener>());
public DefaultExchangeRegistry(VirtualHost host)
{
@@ -68,6 +72,14 @@ public class DefaultExchangeRegistry imp
{
_exchangeMap.put(exchange.getNameShortString(), exchange);
_exchangeMapStr.put(exchange.getNameShortString().toString(), exchange);
+ synchronized (_listeners)
+ {
+ for(RegistryChangeListener listener : _listeners)
+ {
+ listener.exchangeRegistered(exchange);
+ }
+
+ }
}
public void setDefaultExchange(Exchange exchange)
@@ -114,6 +126,15 @@ public class DefaultExchangeRegistry imp
getDurableConfigurationStore().removeExchange(e);
}
e.close();
+
+ synchronized (_listeners)
+ {
+ for(RegistryChangeListener listener : _listeners)
+ {
+ listener.exchangeUnregistered(exchange);
+ }
+ }
+
}
else
{
@@ -126,6 +147,16 @@ public class DefaultExchangeRegistry imp
unregisterExchange(new AMQShortString(name), inUse);
}
+ public Collection<Exchange> getExchanges()
+ {
+ return new ArrayList<Exchange>(_exchangeMap.values());
+ }
+
+ public void addRegistryChangeListener(RegistryChangeListener listener)
+ {
+ _listeners.add(listener);
+ }
+
public Exchange getExchange(AMQShortString name)
{
if ((name == null) || name.length() == 0)
@@ -158,16 +189,14 @@ public class DefaultExchangeRegistry imp
{
final Exchange exchange = getExchange(exchangeName);
- if (exchange instanceof AbstractExchange)
+ //TODO: this is a bit of a hack, what if the listeners aren't aware
+ //that we are just unregistering the MBean because of HA, and aren't
+ //actually removing the exchange as such.
+ synchronized (_listeners)
{
- AbstractExchange abstractExchange = (AbstractExchange) exchange;
- try
+ for(RegistryChangeListener listener : _listeners)
{
- abstractExchange.getManagedObject().unregister();
- }
- catch (AMQException e)
- {
- LOGGER.warn("Failed to unregister mbean", e);
+ listener.exchangeUnregistered(exchange);
}
}
}
@@ -196,4 +225,21 @@ public class DefaultExchangeRegistry imp
}
}
+ public boolean isReservedExchangeName(String name)
+ {
+ if (name == null || "".equals(name) || ExchangeDefaults.DEFAULT_EXCHANGE_NAME.asString().equals(name)
+ || name.startsWith("amq.") || name.startsWith("qpid."))
+ {
+ return true;
+ }
+ Collection<ExchangeType<? extends Exchange>> registeredTypes = _host.getExchangeFactory().getRegisteredTypes();
+ for (ExchangeType<? extends Exchange> type : registeredTypes)
+ {
+ if (type.getDefaultExchangeName().toString().equals(name))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
}
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/DirectExchange.java Fri Aug 3 12:13:32 2012
@@ -127,11 +127,6 @@ public class DirectExchange extends Abst
super(TYPE);
}
- protected AbstractExchangeMBean createMBean() throws JMException
- {
- return new DirectExchangeMBean(this);
- }
-
public List<? extends BaseQueue> doRoute(InboundMessage payload)
{
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java Fri Aug 3 12:13:32 2012
@@ -147,4 +147,6 @@ public interface Exchange extends Exchan
{
public void onClose(Exchange exchange) throws AMQSecurityException, AMQInternalException;
}
+
+ UUID getId();
}
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeRegistry.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeRegistry.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeRegistry.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/ExchangeRegistry.java Fri Aug 3 12:13:32 2012
@@ -7,9 +7,9 @@
* 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
@@ -57,4 +57,21 @@ public interface ExchangeRegistry
void clearAndUnregisterMbeans();
Exchange getExchange(UUID exchangeId);
+
+ Collection<Exchange> getExchanges();
+
+ void addRegistryChangeListener(RegistryChangeListener listener);
+
+ /**
+ * Validates the name of user custom exchange.
+ * <p>
+ * Return true if the exchange name is reserved and false otherwise.
+ */
+ boolean isReservedExchangeName(String name);
+
+ interface RegistryChangeListener
+ {
+ void exchangeRegistered(Exchange exchange);
+ void exchangeUnregistered(Exchange exchange);
+ }
}
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/FanoutExchange.java Fri Aug 3 12:13:32 2012
@@ -48,11 +48,6 @@ public class FanoutExchange extends Abst
*/
private final ConcurrentHashMap<AMQQueue,Integer> _queues = new ConcurrentHashMap<AMQQueue,Integer>();
- protected AbstractExchangeMBean createMBean() throws JMException
- {
- return new FanoutExchangeMBean(this);
- }
-
public static final ExchangeType<FanoutExchange> TYPE = new ExchangeType<FanoutExchange>()
{
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/HeadersExchange.java Fri Aug 3 12:13:32 2012
@@ -227,11 +227,6 @@ public class HeadersExchange extends Abs
return !getBindings().isEmpty();
}
- protected AbstractExchangeMBean createMBean() throws JMException
- {
- return new HeadersExchangeMBean(this);
- }
-
protected void onBind(final Binding binding)
{
String bindingKey = binding.getBindingKey();
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/TopicExchange.java Fri Aug 3 12:13:32 2012
@@ -291,7 +291,7 @@ public class TopicExchange extends Abstr
public boolean isBound(AMQShortString routingKey, FieldTable arguments, AMQQueue queue)
{
- Binding binding = new Binding(null, routingKey.toString(), queue, this, FieldTable.convertToMap(arguments));
+ Binding binding = new Binding(null, null, routingKey.toString(), queue, this, FieldTable.convertToMap(arguments));
if (arguments == null)
{
@@ -314,7 +314,7 @@ public class TopicExchange extends Abstr
public boolean isBound(String bindingKey, Map<String, Object> arguments, AMQQueue queue)
{
- Binding binding = new Binding(null, bindingKey, queue, this, arguments);
+ Binding binding = new Binding(null, null, bindingKey, queue, this, arguments);
if (arguments == null)
{
return _bindings.containsKey(binding);
@@ -403,11 +403,6 @@ public class TopicExchange extends Abstr
}
}
- protected AbstractExchangeMBean createMBean() throws JMException
- {
- return new TopicExchangeMBean(this);
- }
-
private Collection<AMQQueue> getMatchedQueues(InboundMessage message, AMQShortString routingKey)
{
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherDFAState.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherDFAState.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherDFAState.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherDFAState.java Fri Aug 3 12:13:32 2012
@@ -1,3 +1,23 @@
+/*
+ *
+ * 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.qpid.server.exchange.topic;
import org.apache.qpid.framing.AMQShortString;
@@ -16,26 +36,6 @@ import java.util.SortedSet;
import java.util.TreeSet;
import java.util.concurrent.atomic.AtomicInteger;
-/*
-*
-* 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.
-*
-*/
public class TopicMatcherDFAState
{
private static final AtomicInteger stateId = new AtomicInteger();
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherResult.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherResult.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherResult.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicMatcherResult.java Fri Aug 3 12:13:32 2012
@@ -1,5 +1,3 @@
-package org.apache.qpid.server.exchange.topic;
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -20,6 +18,8 @@ package org.apache.qpid.server.exchange.
* under the License.
*
*/
+package org.apache.qpid.server.exchange.topic;
+
public interface TopicMatcherResult
{
}
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicParser.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicParser.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicParser.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicParser.java Fri Aug 3 12:13:32 2012
@@ -1,3 +1,23 @@
+/*
+ *
+ * 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.qpid.server.exchange.topic;
import org.apache.qpid.framing.AMQShortString;
@@ -13,26 +33,6 @@ import java.util.Map;
import java.util.Set;
import java.util.concurrent.atomic.AtomicReference;
-/*
-*
-* 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.
-*
-*/
public class TopicParser
{
private static final byte TOPIC_DELIMITER = (byte)'.';
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicWord.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicWord.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicWord.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicWord.java Fri Aug 3 12:13:32 2012
@@ -1,7 +1,3 @@
-package org.apache.qpid.server.exchange.topic;
-
-import org.apache.qpid.framing.AMQShortString;
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -22,6 +18,11 @@ import org.apache.qpid.framing.AMQShortS
* under the License.
*
*/
+
+package org.apache.qpid.server.exchange.topic;
+
+import org.apache.qpid.framing.AMQShortString;
+
public final class TopicWord
{
public static final TopicWord ANY_WORD = new TopicWord("*");
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicWordDictionary.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicWordDictionary.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicWordDictionary.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/exchange/topic/TopicWordDictionary.java Fri Aug 3 12:13:32 2012
@@ -1,9 +1,3 @@
-package org.apache.qpid.server.exchange.topic;
-
-import org.apache.qpid.framing.AMQShortString;
-
-import java.util.concurrent.ConcurrentHashMap;
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -24,6 +18,12 @@ import java.util.concurrent.ConcurrentHa
* under the License.
*
*/
+package org.apache.qpid.server.exchange.topic;
+
+import org.apache.qpid.framing.AMQShortString;
+
+import java.util.concurrent.ConcurrentHashMap;
+
public class TopicWordDictionary
{
private final ConcurrentHashMap<AMQShortString,TopicWord> _dictionary =
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java Fri Aug 3 12:13:32 2012
@@ -91,7 +91,7 @@ public class Bridge implements BridgeCon
private final String _tag;
private final String _excludes;
private final BrokerLink _link;
- private UUID _id;
+ private UUID _qmfId;
private long _createTime = System.currentTimeMillis();
private Session _session;
@@ -124,7 +124,7 @@ public class Bridge implements BridgeCon
_key = key;
_tag = tag;
_excludes = excludes;
- _id = durable ? brokerLink.getConfigStore().createPersistentId() : brokerLink.getConfigStore().createId();
+ _qmfId = durable ? brokerLink.getConfigStore().createPersistentId() : brokerLink.getConfigStore().createId();
_transaction = new AutoCommitTransaction(getVirtualHost().getMessageStore());
@@ -198,7 +198,7 @@ public class Bridge implements BridgeCon
{
_link = brokerLink;
_bridgeNo = bridgeNo;
- _id = id;
+ _qmfId = id;
brokerLink.getConfigStore().persistentIdInUse(id);
_createTime = createTime;
@@ -249,9 +249,10 @@ public class Bridge implements BridgeCon
return Collections.unmodifiableMap(arguments);
}
- public UUID getId()
+ @Override
+ public UUID getQMFId()
{
- return _id;
+ return _qmfId;
}
public BridgeConfigType getConfigType()
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java Fri Aug 3 12:13:32 2012
@@ -89,7 +89,7 @@ public class BrokerLink implements LinkC
private final String _username;
private final String _password;
private final VirtualHost _virtualHost;
- private UUID _id;
+ private UUID _qmfId;
private AtomicBoolean _closing = new AtomicBoolean();
private final long _createTime;
private Connection _qpidConnection;
@@ -133,7 +133,7 @@ public class BrokerLink implements LinkC
private class ConnectionConfigAdapter implements ConnectionConfig
{
private long _adapterCreateTime = System.currentTimeMillis();
- private UUID _id = BrokerLink.this.getConfigStore().createId();
+ private UUID _qmfId = BrokerLink.this.getConfigStore().createId();
public VirtualHost getVirtualHost()
{
@@ -185,9 +185,10 @@ public class BrokerLink implements LinkC
return getVirtualHost().getConfigStore();
}
- public UUID getId()
+ @Override
+ public UUID getQMFId()
{
- return _id;
+ return _qmfId;
}
public ConnectionConfigType getConfigType()
@@ -230,11 +231,11 @@ public class BrokerLink implements LinkC
}
};
- public BrokerLink(final VirtualHost virtualHost, UUID id, long createTime, Map<String, String> arguments)
+ public BrokerLink(final VirtualHost virtualHost, UUID qmfId, long createTime, Map<String, String> arguments)
{
_virtualHost = virtualHost;
- _id = id;
- virtualHost.getConfigStore().persistentIdInUse(id);
+ _qmfId = qmfId;
+ virtualHost.getConfigStore().persistentIdInUse(qmfId);
_createTime = createTime;
_transport = arguments.get(TRANSPORT);
@@ -289,7 +290,7 @@ public class BrokerLink implements LinkC
_authMechanism = authMechanism;
_username = username;
_password = password;
- _id = durable ? virtualHost.getConfigStore().createPersistentId() : virtualHost.getConfigStore().createId();
+ _qmfId = durable ? virtualHost.getConfigStore().createPersistentId() : virtualHost.getConfigStore().createId();
if(durable)
{
@@ -457,9 +458,10 @@ public class BrokerLink implements LinkC
return _remoteVhost;
}
- public UUID getId()
+ @Override
+ public UUID getQMFId()
{
- return _id;
+ return _qmfId;
}
public LinkConfigType getConfigType()
@@ -672,7 +674,7 @@ public class BrokerLink implements LinkC
public String toString()
{
return "BrokerLink{" +
- " _id=" + _id +
+ " _id=" + _qmfId +
", _transport='" + _transport + '\'' +
", _host='" + _host + '\'' +
", _port=" + _port +
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/BytesOnlyCreditManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/BytesOnlyCreditManager.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/BytesOnlyCreditManager.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/BytesOnlyCreditManager.java Fri Aug 3 12:13:32 2012
@@ -1,8 +1,3 @@
-package org.apache.qpid.server.flow;
-
-
-import java.util.concurrent.atomic.AtomicLong;
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -23,6 +18,11 @@ import java.util.concurrent.atomic.Atomi
* under the License.
*
*/
+package org.apache.qpid.server.flow;
+
+
+import java.util.concurrent.atomic.AtomicLong;
+
public class BytesOnlyCreditManager extends AbstractFlowCreditManager
{
private final AtomicLong _bytesCredit;
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/FlowCreditManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/FlowCreditManager.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/FlowCreditManager.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/FlowCreditManager.java Fri Aug 3 12:13:32 2012
@@ -1,6 +1,3 @@
-package org.apache.qpid.server.flow;
-
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -21,6 +18,10 @@ package org.apache.qpid.server.flow;
* under the License.
*
*/
+package org.apache.qpid.server.flow;
+
+
+
public interface FlowCreditManager
{
long getMessageCredit();
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/FlowCreditManager_0_10.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/FlowCreditManager_0_10.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/FlowCreditManager_0_10.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/FlowCreditManager_0_10.java Fri Aug 3 12:13:32 2012
@@ -1,5 +1,3 @@
-package org.apache.qpid.server.flow;
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -20,6 +18,8 @@ package org.apache.qpid.server.flow;
* under the License.
*
*/
+package org.apache.qpid.server.flow;
+
public interface FlowCreditManager_0_10 extends FlowCreditManager
{
public void addCredit(long count, long bytes);
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/LimitlessCreditManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/LimitlessCreditManager.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/LimitlessCreditManager.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/LimitlessCreditManager.java Fri Aug 3 12:13:32 2012
@@ -1,6 +1,3 @@
-package org.apache.qpid.server.flow;
-
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -21,6 +18,9 @@ package org.apache.qpid.server.flow;
* under the License.
*
*/
+package org.apache.qpid.server.flow;
+
+
public class LimitlessCreditManager extends AbstractFlowCreditManager implements FlowCreditManager
{
public long getMessageCredit()
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/MessageAndBytesCreditManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/MessageAndBytesCreditManager.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/MessageAndBytesCreditManager.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/MessageAndBytesCreditManager.java Fri Aug 3 12:13:32 2012
@@ -1,6 +1,3 @@
-package org.apache.qpid.server.flow;
-
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -21,6 +18,9 @@ package org.apache.qpid.server.flow;
* under the License.
*
*/
+package org.apache.qpid.server.flow;
+
+
public class MessageAndBytesCreditManager extends AbstractFlowCreditManager implements FlowCreditManager
{
private long _messageCredit;
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/MessageOnlyCreditManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/MessageOnlyCreditManager.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/MessageOnlyCreditManager.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/flow/MessageOnlyCreditManager.java Fri Aug 3 12:13:32 2012
@@ -1,8 +1,3 @@
-package org.apache.qpid.server.flow;
-
-
-import java.util.concurrent.atomic.AtomicLong;
-
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -23,6 +18,10 @@ import java.util.concurrent.atomic.Atomi
* under the License.
*
*/
+package org.apache.qpid.server.flow;
+
+import java.util.concurrent.atomic.AtomicLong;
+
public class MessageOnlyCreditManager extends AbstractFlowCreditManager implements FlowCreditManager
{
private final AtomicLong _messageCredit;
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/AccessRequestHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/AccessRequestHandler.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/AccessRequestHandler.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/AccessRequestHandler.java Fri Aug 3 12:13:32 2012
@@ -1,4 +1,3 @@
-package org.apache.qpid.server.handler;
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +18,7 @@ package org.apache.qpid.server.handler;
* under the License.
*
*/
+package org.apache.qpid.server.handler;
import org.apache.qpid.AMQException;
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRecoverSyncMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRecoverSyncMethodHandler.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRecoverSyncMethodHandler.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/BasicRecoverSyncMethodHandler.java Fri Aug 3 12:13:32 2012
@@ -1,4 +1,3 @@
-package org.apache.qpid.server.handler;
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +18,7 @@ package org.apache.qpid.server.handler;
* under the License.
*
*/
+package org.apache.qpid.server.handler;
import org.apache.log4j.Logger;
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java Fri Aug 3 12:13:32 2012
@@ -7,9 +7,9 @@
* 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
@@ -61,7 +61,7 @@ public class ConnectionSecureOkMethodHan
{
AMQProtocolSession session = stateManager.getProtocolSession();
- AuthenticationManager authMgr = ApplicationRegistry.getInstance().getAuthenticationManager();
+ AuthenticationManager authMgr = stateManager.getAuthenticationManager();
SaslServer ss = session.getSaslServer();
if (ss == null)
@@ -92,7 +92,7 @@ public class ConnectionSecureOkMethodHan
case SUCCESS:
if (_logger.isInfoEnabled())
{
- _logger.info("Connected as: " + UsernamePrincipal.getUsernamePrincipalFromSubject(authResult.getSubject()));
+ _logger.info("Connected as: " + authResult.getSubject());
}
stateManager.changeState(AMQState.CONNECTION_NOT_TUNED);
@@ -102,7 +102,7 @@ public class ConnectionSecureOkMethodHan
ApplicationRegistry.getInstance().getConfiguration().getHeartBeatDelay());
session.writeFrame(tuneBody.generateFrame(0));
session.setAuthorizedSubject(authResult.getSubject());
- disposeSaslServer(session);
+ disposeSaslServer(session);
break;
case CONTINUE:
stateManager.changeState(AMQState.CONNECTION_NOT_AUTH);
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java Fri Aug 3 12:13:32 2012
@@ -7,9 +7,9 @@
* 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
@@ -61,15 +61,15 @@ public class ConnectionStartOkMethodHand
public void methodReceived(AMQStateManager stateManager, ConnectionStartOkBody body, int channelId) throws AMQException
{
AMQProtocolSession session = stateManager.getProtocolSession();
-
+
_logger.info("SASL Mechanism selected: " + body.getMechanism());
_logger.info("Locale selected: " + body.getLocale());
- AuthenticationManager authMgr = ApplicationRegistry.getInstance().getAuthenticationManager();
+ AuthenticationManager authMgr = stateManager.getAuthenticationManager();
SaslServer ss = null;
try
- {
- ss = authMgr.createSaslServer(String.valueOf(body.getMechanism()), session.getLocalFQDN());
+ {
+ ss = authMgr.createSaslServer(String.valueOf(body.getMechanism()), session.getLocalFQDN(), session.getPeerPrincipal());
if (ss == null)
{
@@ -106,7 +106,7 @@ public class ConnectionStartOkMethodHand
case SUCCESS:
if (_logger.isInfoEnabled())
{
- _logger.info("Connected as: " + UsernamePrincipal.getUsernamePrincipalFromSubject(authResult.getSubject()));
+ _logger.info("Connected as: " + authResult.getSubject());
}
session.setAuthorizedSubject(authResult.getSubject());
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java Fri Aug 3 12:13:32 2012
@@ -225,7 +225,10 @@ public class QueueDeclareHandler impleme
String owner = body.getExclusive() ? AMQShortString.toString(session.getContextKey()) : null;
Map<String, Object> arguments = FieldTable.convertToMap(body.getArguments());
- final AMQQueue queue = AMQQueueFactory.createAMQQueueImpl(UUIDGenerator.generateUUID(), AMQShortString.toString(queueName), body.getDurable(), owner, body.getAutoDelete(),
+ String queueNameString = AMQShortString.toString(queueName);
+
+ final AMQQueue queue = AMQQueueFactory.createAMQQueueImpl(UUIDGenerator.generateQueueUUID(queueNameString, virtualHost.getName()),
+ queueNameString, body.getDurable(), owner, body.getAutoDelete(),
body.getExclusive(),virtualHost, arguments);
if (body.getExclusive() && !body.getDurable())
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/QueueUnbindHandler.java Fri Aug 3 12:13:32 2012
@@ -1,4 +1,3 @@
-package org.apache.qpid.server.handler;
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +18,7 @@ package org.apache.qpid.server.handler;
* under the License.
*
*/
+package org.apache.qpid.server.handler;
import org.apache.log4j.Logger;
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/TxCommitHandler.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/TxCommitHandler.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/TxCommitHandler.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/handler/TxCommitHandler.java Fri Aug 3 12:13:32 2012
@@ -46,9 +46,9 @@ public class TxCommitHandler implements
{
}
- public void methodReceived(AMQStateManager stateManager, TxCommitBody body, int channelId) throws AMQException
+ public void methodReceived(AMQStateManager stateManager, TxCommitBody body, final int channelId) throws AMQException
{
- AMQProtocolSession session = stateManager.getProtocolSession();
+ final AMQProtocolSession session = stateManager.getProtocolSession();
try
{
@@ -62,11 +62,19 @@ public class TxCommitHandler implements
{
throw body.getChannelNotFoundException(channelId);
}
- channel.commit();
+ channel.commit(new Runnable()
+ {
+
+ @Override
+ public void run()
+ {
+ MethodRegistry methodRegistry = session.getMethodRegistry();
+ AMQMethodBody responseBody = methodRegistry.createTxCommitOkBody();
+ session.writeFrame(responseBody.generateFrame(channelId));
+ }
+ }, true);
+
- MethodRegistry methodRegistry = session.getMethodRegistry();
- AMQMethodBody responseBody = methodRegistry.createTxCommitOkBody();
- session.writeFrame(responseBody.generateFrame(channelId));
}
catch (AMQException e)
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/messages/MessageStore_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/messages/MessageStore_logmessages.properties?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/messages/MessageStore_logmessages.properties (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/messages/MessageStore_logmessages.properties Fri Aug 3 12:13:32 2012
@@ -26,3 +26,5 @@ RECOVERY_START = MST-1004 : Recovery Sta
RECOVERED = MST-1005 : Recovered {0,number} messages
RECOVERY_COMPLETE = MST-1006 : Recovery Complete
PASSIVATE = MST-1007 : Store Passivated
+OVERFULL = MST-1008 : Store overfull, flow control will be enforced
+UNDERFULL = MST-1009 : Store overfull condition cleared
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/logging/messages/VirtualHost_logmessages.properties Fri Aug 3 12:13:32 2012
@@ -23,4 +23,6 @@ CREATED = VHT-1001 : Created : {0}
CLOSED = VHT-1002 : Closed
STATS_DATA = VHT-1003 : {0} : {1,choice,0#delivered|1#received} : {2,number,#.###} kB/s peak : {3,number,#} bytes total
-STATS_MSGS = VHT-1004 : {0} : {1,choice,0#delivered|1#received} : {2,number,#.###} msg/s peak : {3,number,#} msgs total`
\ No newline at end of file
+STATS_MSGS = VHT-1004 : {0} : {1,choice,0#delivered|1#received} : {2,number,#.###} msg/s peak : {3,number,#} msgs total
+
+ERRORED = VHT-1005 : Unexpected fatal error
\ No newline at end of file
Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/management/
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/management:r1333988-1368650
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/AMQMessageHeader.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/AMQMessageHeader.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/AMQMessageHeader.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/AMQMessageHeader.java Fri Aug 3 12:13:32 2012
@@ -20,6 +20,7 @@
*/
package org.apache.qpid.server.message;
+import java.util.Collection;
import java.util.Set;
public interface AMQMessageHeader
@@ -28,6 +29,10 @@ public interface AMQMessageHeader
long getExpiration();
+ String getUserId();
+
+ String getAppId();
+
String getMessageId();
String getMimeType();
@@ -52,4 +57,5 @@ public interface AMQMessageHeader
boolean containsHeader(String name);
+ Collection<String> getHeaderNames();
}
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/ContentHeaderBodyAdapter.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/ContentHeaderBodyAdapter.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/ContentHeaderBodyAdapter.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/ContentHeaderBodyAdapter.java Fri Aug 3 12:13:32 2012
@@ -20,6 +20,7 @@
*/
package org.apache.qpid.server.message;
+import java.util.Collection;
import org.apache.qpid.framing.BasicContentHeaderProperties;
import org.apache.qpid.framing.ContentHeaderBody;
import org.apache.qpid.framing.FieldTable;
@@ -50,6 +51,16 @@ public class ContentHeaderBodyAdapter im
return getProperties().getExpiration();
}
+ public String getUserId()
+ {
+ return getProperties().getUserIdAsString();
+ }
+
+ public String getAppId()
+ {
+ return getProperties().getAppIdAsString();
+ }
+
public String getMessageId()
{
return getProperties().getMessageIdAsString();
@@ -117,6 +128,13 @@ public class ContentHeaderBodyAdapter im
return true;
}
+ @Override
+ public Collection<String> getHeaderNames()
+ {
+ FieldTable ft = getProperties().getHeaders();
+ return ft.keys();
+ }
+
public boolean containsHeader(String name)
{
FieldTable ft = getProperties().getHeaders();
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java Fri Aug 3 12:13:32 2012
@@ -20,6 +20,7 @@
*/
package org.apache.qpid.server.message;
+import java.util.Collection;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
@@ -242,6 +243,16 @@ public class MessageMetaData implements
return (BasicContentHeaderProperties) getContentHeaderBody().getProperties();
}
+ public String getUserId()
+ {
+ return getProperties().getUserIdAsString();
+ }
+
+ public String getAppId()
+ {
+ return getProperties().getAppIdAsString();
+ }
+
public String getCorrelationId()
{
return getProperties().getCorrelationIdAsString();
@@ -318,6 +329,12 @@ public class MessageMetaData implements
return true;
}
+ @Override
+ public Collection<String> getHeaderNames()
+ {
+ return getProperties().getHeaders().keys();
+ }
+
public boolean containsHeader(String name)
{
FieldTable ft = getProperties().getHeaders();
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java Fri Aug 3 12:13:32 2012
@@ -21,11 +21,7 @@
package org.apache.qpid.server.message;
import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import org.apache.qpid.amqp_1_0.codec.ValueHandler;
import org.apache.qpid.amqp_1_0.messaging.SectionDecoder;
import org.apache.qpid.amqp_1_0.type.AmqpErrorException;
@@ -486,6 +482,18 @@ public class MessageMetaData_1_0 impleme
return null; //TODO
}
+ public String getAppId()
+ {
+ //TODO
+ return null;
+ }
+
+ public String getUserId()
+ {
+ // TODO
+ return null;
+ }
+
public Object getHeader(final String name)
{
return _appProperties == null ? null : _appProperties.get(name);
@@ -508,6 +516,16 @@ public class MessageMetaData_1_0 impleme
return true;
}
+ @Override
+ public Collection<String> getHeaderNames()
+ {
+ if(_appProperties == null)
+ {
+ return Collections.emptySet();
+ }
+ return Collections.unmodifiableCollection(_appProperties.keySet());
+ }
+
public boolean containsHeader(final String name)
{
return _appProperties != null && _appProperties.containsKey(name);
Propchange: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java
------------------------------------------------------------------------------
Merged /qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_1_0.java:r1333988-1368650
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageTransferHeader.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageTransferHeader.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageTransferHeader.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/message/MessageTransferHeader.java Fri Aug 3 12:13:32 2012
@@ -20,14 +20,11 @@
*/
package org.apache.qpid.server.message;
+import java.util.*;
import org.apache.qpid.transport.DeliveryProperties;
import org.apache.qpid.transport.MessageDeliveryPriority;
import org.apache.qpid.transport.MessageProperties;
-import java.util.Map;
-import java.util.Set;
-import java.util.UUID;
-
class MessageTransferHeader implements AMQMessageHeader
{
@@ -60,10 +57,22 @@ class MessageTransferHeader implements A
return _deliveryProps == null ? 0L : _deliveryProps.getExpiration();
}
+ public String getUserId()
+ {
+ byte[] userIdBytes = _messageProps == null ? null : _messageProps.getUserId();
+ return userIdBytes == null ? null : new String(userIdBytes);
+ }
+
+ public String getAppId()
+ {
+ byte[] appIdBytes = _messageProps == null ? null : _messageProps.getAppId();
+ return appIdBytes == null ? null : new String(appIdBytes);
+ }
+
public String getMessageId()
{
UUID id = _messageProps == null ? null : _messageProps.getMessageId();
-
+
return id == null ? null : String.valueOf(id);
}
@@ -93,7 +102,7 @@ class MessageTransferHeader implements A
public String getType()
{
Object type = getHeader(JMS_TYPE);
- return type instanceof String ? (String) type : null;
+ return type instanceof String ? (String) type : null;
}
public String getReplyTo()
@@ -145,6 +154,14 @@ class MessageTransferHeader implements A
}
+ @Override
+ public Collection<String> getHeaderNames()
+ {
+ Map<String, Object> appHeaders = _messageProps == null ? null : _messageProps.getApplicationHeaders();
+ return appHeaders != null ? Collections.unmodifiableCollection(appHeaders.keySet()) : Collections.EMPTY_SET ;
+
+ }
+
public boolean containsHeader(String name)
{
Map<String, Object> appHeaders = _messageProps == null ? null : _messageProps.getApplicationHeaders();
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/ConfigurationChangeListener.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/ConfigurationChangeListener.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/ConfigurationChangeListener.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/ConfigurationChangeListener.java Fri Aug 3 12:13:32 2012
@@ -30,7 +30,8 @@ public interface ConfigurationChangeList
* @param newState the state after the change
*/
void stateChanged(ConfiguredObject object, State oldState, State newState);
-
+
+
void childAdded(ConfiguredObject object, ConfiguredObject child);
void childRemoved(ConfiguredObject object, ConfiguredObject child);
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/ConfiguredObject.java Fri Aug 3 12:13:32 2012
@@ -22,6 +22,7 @@ package org.apache.qpid.server.model;
import java.security.AccessControlException;
import java.util.Collection;
+import java.util.Map;
import java.util.UUID;
public interface ConfiguredObject
@@ -81,7 +82,7 @@ public interface ConfiguredObject
* @param desiredState the state the caller wishes the object to attain
* @return the new current state
* @throws IllegalStateTransitionException the requested state tranisition is invalid
- * @throws AccessControlException the current context does not have sufficeint permissions to change the state
+ * @throws AccessControlException the current context does not have sufficient permissions to change the state
*/
State setDesiredState(State currentState, State desiredState) throws IllegalStateTransitionException,
AccessControlException;
@@ -89,7 +90,7 @@ public interface ConfiguredObject
/**
* Get the actual state of the object.
*
- * This state is derived fromt the desired state of the object itself and
+ * This state is derived from the desired state of the object itself and
* the actual state of its parents. If an object "desires" to be ACTIVE, but one of its parents is STOPPED, then
* the actual state of the object will be STOPPED
*
@@ -126,7 +127,7 @@ public interface ConfiguredObject
/**
* Returns whether the the object configuration is durably stored
*
- * @return the durablity
+ * @return the durability
*/
boolean isDurable();
@@ -188,7 +189,7 @@ public interface ConfiguredObject
/**
* Get the names of attributes that are set on this object
*
- * Not that the returned collection is correct at the time the method is called, but will not reflect future
+ * Note that the returned collection is correct at the time the method is called, but will not reflect future
* additions or removals when they occur
*
* @return the collection of attribute names
@@ -226,4 +227,20 @@ public interface ConfiguredObject
* @return the Statistics holder for the ConfiguredObject (or null if none exists)
*/
Statistics getStatistics();
+
+ /**
+ * Return children of the ConfiguredObject of the given class
+ *
+ * @param clazz the class of the children to return
+ * @return the children
+ *
+ * @throws NullPointerException if the supplied class null
+ *
+ */
+ <C extends ConfiguredObject> Collection<C> getChildren(Class<C> clazz);
+
+
+ <C extends ConfiguredObject> C createChild(Class<C> childClass,
+ Map<String, Object> attributes,
+ ConfiguredObject... otherParents);
}
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Exchange.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Exchange.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Exchange.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Exchange.java Fri Aug 3 12:13:32 2012
@@ -77,7 +77,7 @@ public interface Exchange extends Config
//children
Collection<Binding> getBindings();
Collection<Publisher> getPublishers();
-
+
//operations
Binding createBinding(String bindingKey,
Queue queue,
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Queue.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Queue.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Queue.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Queue.java Fri Aug 3 12:13:32 2012
@@ -25,7 +25,6 @@ import java.util.Collection;
import java.util.Collections;
import org.apache.qpid.server.queue.QueueEntryVisitor;
-
public interface Queue extends ConfiguredObject
{
public static final String BINDING_COUNT = "bindingCount";
@@ -71,6 +70,7 @@ public interface Queue extends Configure
public static final String ID = "id";
+ public static final String DESCRIPTION = "description";
public static final String NAME = "name";
public static final String STATE = "state";
public static final String DURABLE = "durable";
@@ -78,6 +78,7 @@ public interface Queue extends Configure
public static final String TIME_TO_LIVE = "timeToLive";
public static final String CREATED = "created";
public static final String UPDATED = "updated";
+ public static final String ARGUMENTS = "arguments";
public static final String ALERT_REPEAT_GAP = "alertRepeatGap";
public static final String ALERT_THRESHOLD_MESSAGE_AGE = "alertThresholdMessageAge";
@@ -98,7 +99,7 @@ public interface Queue extends Configure
public static final String QUEUE_FLOW_STOPPED = "queueFlowStopped";
public static final String SORT_KEY = "sortKey";
public static final String TYPE = "type";
-
+ public static final String PRIORITIES = "priorities";
@@ -106,6 +107,7 @@ public interface Queue extends Configure
Collections.unmodifiableList(
Arrays.asList(ID,
NAME,
+ DESCRIPTION,
STATE,
DURABLE,
LIFETIME_POLICY,
@@ -130,7 +132,8 @@ public interface Queue extends Configure
ALERT_THRESHOLD_MESSAGE_SIZE,
ALERT_THRESHOLD_QUEUE_DEPTH_BYTES,
ALERT_THRESHOLD_QUEUE_DEPTH_MESSAGES,
- ALERT_REPEAT_GAP
+ ALERT_REPEAT_GAP,
+ PRIORITIES
));
//children
@@ -143,4 +146,6 @@ public interface Queue extends Configure
void visit(QueueEntryVisitor visitor);
void delete();
+
+ void setNotificationListener(QueueNotificationListener listener);
}
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Statistics.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Statistics.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Statistics.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/Statistics.java Fri Aug 3 12:13:32 2012
@@ -1,8 +1,4 @@
-package org.apache.qpid.server.model;
-
-import java.util.Collection;
-
-/**
+/*
* 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.
@@ -18,6 +14,11 @@ import java.util.Collection;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+package org.apache.qpid.server.model;
+
+import java.util.Collection;
+
public interface Statistics
{
Collection<String> getStatisticNames();
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/UUIDGenerator.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/UUIDGenerator.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/UUIDGenerator.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/model/UUIDGenerator.java Fri Aug 3 12:13:32 2012
@@ -22,33 +22,59 @@ package org.apache.qpid.server.model;
import java.util.UUID;
-import org.apache.qpid.exchange.ExchangeDefaults;
-
-
public class UUIDGenerator
{
-
- public static UUID generateUUID()
+ //Generates a random UUID. Used primarily by tests.
+ public static UUID generateRandomUUID()
{
return UUID.randomUUID();
}
- public static UUID generateUUID(String objectName, String virtualHostName)
+ private static UUID createUUID(String objectType, String... names)
{
StringBuilder sb = new StringBuilder();
- sb.append(virtualHostName).append(objectName);
+ sb.append(objectType);
+
+ for(String name : names)
+ {
+ sb.append("/").append(name);
+ }
+
return UUID.nameUUIDFromBytes(sb.toString().getBytes());
}
- public static UUID generateExchangeUUID(String echangeName, String virtualHostName)
+ public static UUID generateExchangeUUID(String exchangeName, String virtualHostName)
{
- if(ExchangeDefaults.DEFAULT_EXCHANGE_NAME.asString().equals(echangeName) || echangeName.startsWith("amq.") || echangeName.startsWith("qpid."))
- {
- return generateUUID(echangeName, virtualHostName);
- }
- else
- {
- return generateUUID();
- }
+ return createUUID(Exchange.class.getName(), virtualHostName, exchangeName);
+ }
+
+ public static UUID generateQueueUUID(String queueName, String virtualHostName)
+ {
+ return createUUID(Queue.class.getName(), virtualHostName, queueName);
+ }
+
+ public static UUID generateBindingUUID(String exchangeName, String queueName, String bindingKey, String virtualHostName)
+ {
+ return createUUID(Binding.class.getName(), virtualHostName, exchangeName, queueName, bindingKey);
+ }
+
+ public static UUID generateUserUUID(String authenticationProviderName, String userName)
+ {
+ return createUUID(User.class.getName(), authenticationProviderName, userName);
+ }
+
+ public static UUID generateVhostUUID(String virtualHostName)
+ {
+ return createUUID(VirtualHost.class.getName(), virtualHostName);
+ }
+
+ public static UUID generateVhostAliasUUID(String virtualHostName, String portName)
+ {
+ return createUUID(VirtualHostAlias.class.getName(), virtualHostName, portName);
+ }
+
+ public static UUID generateConsumerUUID(String virtualHostName, String queueName, String connectionRemoteAddress, String channelNumber, String consumerName)
+ {
+ return createUUID(Consumer.class.getName(), virtualHostName, queueName, connectionRemoteAddress, channelNumber, consumerName);
}
}
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/output/ProtocolOutputConverterImpl.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/output/ProtocolOutputConverterImpl.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/output/ProtocolOutputConverterImpl.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/output/ProtocolOutputConverterImpl.java Fri Aug 3 12:13:32 2012
@@ -1,4 +1,3 @@
-package org.apache.qpid.server.output;
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +18,7 @@ package org.apache.qpid.server.output;
* under the License.
*
*/
+package org.apache.qpid.server.output;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQBody;
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackages.properties
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackages.properties?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackages.properties (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackages.properties Fri Aug 3 12:13:32 2012
@@ -31,12 +31,24 @@
javax.management.openmbean=1.0.0
javax.management=1.0.0
+javax.management.remote.rmi=1.0.0
+javax.management.remote=1.0.0
+javax.management.monitor=1.0.0
+
+javax.crypto=1
+javax.crypto.spec=1
+
+javax.servlet=2
+javax.servlet.http=2
javax.security.auth=1.0.0
javax.security.auth.callback=1.0.0
+javax.security.auth.login=1.0.0
javax.security.sasl=1.0.0
javax.security=1.0.0
+javax.rmi.ssl=1.0.0
+
org.xml.sax=1.0.0
org.xml.sax.helpers=1.0.0
@@ -46,41 +58,66 @@ org.osgi.service.startlevel=1.0.0
org.osgi.service.url=1.0.0
org.osgi.util.tracker=1.0.0
+org.apache.commons.codec=1.3.0
+org.apache.commons.codec.binary=1.3.0
+
org.apache.commons.configuration=1.0.0
org.apache.commons.lang=1.0.0
org.apache.commons.lang.builder=1.0.0
+org.apache.commons.lang.time=1.0.0
org.apache.commons.logging=1.0.0
-org.apache.log4j=1.2.12
+org.apache.log4j=1.2.16
org.slf4j=1.6.1
+org.eclipse.jetty=7.6.3
+org.eclipse.jetty.http=7.6.3
+org.eclipse.jetty.io=7.6.3
+org.eclipse.jetty.io.nio=7.6.3
+org.eclipse.jetty.security=7.6.3
+org.eclipse.jetty.server=7.6.3
+org.eclipse.jetty.server.session=7.6.3
+org.eclipse.jetty.server.ssl=7.6.3
+org.eclipse.jetty.server.nio=7.6.3
+org.eclipse.jetty.servlet=7.6.3
+org.eclipse.jetty.util.ssl=7.6.3
+
+org.codehaus.jackson=1.9.0
+org.codehaus.jackson.map=1.9.0
+
# For Qpid packages (org.apache.qpid), the version number is automatically overridden by QpidPropertis#getReleaseVersion()
-org.apache.qpid.junit.extensions.util=0.0.0
org.apache.qpid=0.0.0
org.apache.qpid.common=0.0.0
org.apache.qpid.exchange=0.0.0
org.apache.qpid.framing=0.0.0
org.apache.qpid.management.common.mbeans.annotations=0.0.0
+org.apache.qpid.management.common.mbeans=0.0.0
org.apache.qpid.protocol=0.0.0
org.apache.qpid.transport=0.0.0
org.apache.qpid.transport.codec=0.0.0
org.apache.qpid.server.binding=0.0.0
+org.apache.qpid.server.model=0.0.0
+org.apache.qpid.server.model.adapter=0.0.0
+org.apache.qpid.server.model.impl=0.0.0
org.apache.qpid.server.configuration=0.0.0
org.apache.qpid.server.configuration.plugins=0.0.0
org.apache.qpid.server.configuration.management=0.0.0
+org.apache.qpid.server.connection=0.0.0
org.apache.qpid.server.exchange=0.0.0
org.apache.qpid.server.logging=0.0.0
+org.apache.qpid.server.logging.log4j=0.0.0
org.apache.qpid.server.logging.actors=0.0.0
+org.apache.qpid.server.logging.messages=0.0.0
org.apache.qpid.server.logging.subjects=0.0.0
org.apache.qpid.server.message=0.0.0
-org.apache.qpid.server.management=0.0.0
org.apache.qpid.server.persistent=0.0.0
org.apache.qpid.server.plugins=0.0.0
org.apache.qpid.server.protocol=0.0.0
org.apache.qpid.server.queue=0.0.0
+org.apache.qpid.server.subscription=0.0.0
org.apache.qpid.server.registry=0.0.0
org.apache.qpid.server.security=0.0.0
org.apache.qpid.server.security.access=0.0.0
@@ -88,7 +125,11 @@ org.apache.qpid.server.security.access.p
org.apache.qpid.server.security.auth=0.0.0
org.apache.qpid.server.security.auth.sasl=0.0.0
org.apache.qpid.server.security.auth.manager=0.0.0
+org.apache.qpid.server.security.auth.rmi=0.0.0
+org.apache.qpid.server.stats=0.0.0
org.apache.qpid.server.virtualhost=0.0.0
org.apache.qpid.server.virtualhost.plugins=0.0.0
org.apache.qpid.util=0.0.0
+org.apache.qpid.server.store.berkeleydb=0.0.0
+
Modified: qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java
URL: http://svn.apache.org/viewvc/qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java?rev=1368910&r1=1368909&r2=1368910&view=diff
==============================================================================
--- qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java (original)
+++ qpid/branches/asyncstore/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java Fri Aug 3 12:13:32 2012
@@ -18,17 +18,20 @@
*/
package org.apache.qpid.server.plugins;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.IdentityHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.felix.framework.Felix;
import org.apache.felix.framework.util.StringMap;
import org.apache.log4j.Logger;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Version;
-import org.osgi.framework.launch.Framework;
-import org.osgi.util.tracker.ServiceTracker;
-
import org.apache.qpid.common.Closeable;
import org.apache.qpid.common.QpidProperties;
import org.apache.qpid.server.configuration.TopicConfiguration;
@@ -40,24 +43,23 @@ import org.apache.qpid.server.exchange.E
import org.apache.qpid.server.security.SecurityManager;
import org.apache.qpid.server.security.SecurityPluginFactory;
import org.apache.qpid.server.security.access.plugins.LegacyAccess;
+import org.apache.qpid.server.security.auth.manager.AnonymousAuthenticationManager;
import org.apache.qpid.server.security.auth.manager.AuthenticationManagerPluginFactory;
+import org.apache.qpid.server.security.auth.manager.ExternalAuthenticationManager;
+import org.apache.qpid.server.security.auth.manager.KerberosAuthenticationManager;
import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
+import org.apache.qpid.server.security.auth.manager.SimpleLDAPAuthenticationManager;
import org.apache.qpid.server.virtualhost.plugins.SlowConsumerDetection;
import org.apache.qpid.server.virtualhost.plugins.VirtualHostPluginFactory;
import org.apache.qpid.server.virtualhost.plugins.policies.TopicDeletePolicy;
import org.apache.qpid.slowconsumerdetection.policies.SlowConsumerPolicyPluginFactory;
import org.apache.qpid.util.FileUtils;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.IdentityHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Version;
+import org.osgi.framework.launch.Framework;
+import org.osgi.util.tracker.ServiceTracker;
import static org.apache.felix.framework.util.FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP;
import static org.apache.felix.main.AutoProcessor.AUTO_DEPLOY_ACTION_PROPERY;
@@ -100,18 +102,18 @@ public class PluginManager implements Cl
/** The default name of the OSGI system package list. */
private static final String DEFAULT_RESOURCE_NAME = "org/apache/qpid/server/plugins/OsgiSystemPackages.properties";
-
+
/** The name of the override system property that holds the name of the OSGI system package list. */
private static final String FILE_PROPERTY = "qpid.osgisystempackages.properties";
-
+
private static final String OSGI_SYSTEM_PACKAGES;
-
- static
+
+ static
{
final String filename = System.getProperty(FILE_PROPERTY);
final InputStream is = FileUtils.openFileOrDefaultResource(filename, DEFAULT_RESOURCE_NAME,
PluginManager.class.getClassLoader());
-
+
try
{
Version qpidReleaseVersion;
@@ -123,14 +125,14 @@ public class PluginManager implements Cl
{
qpidReleaseVersion = null;
}
-
+
final Properties p = new Properties();
p.load(is);
-
+
final OsgiSystemPackageUtil osgiSystemPackageUtil = new OsgiSystemPackageUtil(qpidReleaseVersion, (Map)p);
-
+
OSGI_SYSTEM_PACKAGES = osgiSystemPackageUtil.getFormattedSystemPackageString();
-
+
_logger.debug("List of OSGi system packages to be added: " + OSGI_SYSTEM_PACKAGES);
}
catch (IOException e)
@@ -139,8 +141,8 @@ public class PluginManager implements Cl
throw new ExceptionInInitializerError(e);
}
}
-
-
+
+
public PluginManager(String pluginPath, String cachePath, BundleContext bundleContext) throws Exception
{
// Store all non-OSGi plugins
@@ -156,7 +158,12 @@ public class PluginManager implements Cl
new SlowConsumerDetectionConfigurationFactory(),
new SlowConsumerDetectionPolicyConfigurationFactory(),
new SlowConsumerDetectionQueueConfigurationFactory(),
- PrincipalDatabaseAuthenticationManager.PrincipalDatabaseAuthenticationManagerConfiguration.FACTORY))
+ PrincipalDatabaseAuthenticationManager.PrincipalDatabaseAuthenticationManagerConfiguration.FACTORY,
+ AnonymousAuthenticationManager.AnonymousAuthenticationManagerConfiguration.FACTORY,
+ KerberosAuthenticationManager.KerberosAuthenticationManagerConfiguration.FACTORY,
+ SimpleLDAPAuthenticationManager.SimpleLDAPAuthenticationManagerConfiguration.FACTORY,
+ ExternalAuthenticationManager.ExternalAuthenticationManagerConfiguration.FACTORY
+ ))
{
_configPlugins.put(configFactory.getParentPaths(), configFactory);
}
@@ -172,7 +179,9 @@ public class PluginManager implements Cl
}
for (AuthenticationManagerPluginFactory<? extends Plugin> pluginFactory : Arrays.asList(
- PrincipalDatabaseAuthenticationManager.FACTORY))
+ PrincipalDatabaseAuthenticationManager.FACTORY, AnonymousAuthenticationManager.FACTORY,
+ KerberosAuthenticationManager.FACTORY, SimpleLDAPAuthenticationManager.FACTORY,
+ ExternalAuthenticationManager.FACTORY))
{
_authenticationManagerPlugins.put(pluginFactory.getPluginName(), pluginFactory);
}
@@ -265,7 +274,7 @@ public class PluginManager implements Cl
_virtualHostTracker = new ServiceTracker(bundleContext, VirtualHostPluginFactory.class.getName(), null);
_virtualHostTracker.open();
_trackers.add(_virtualHostTracker);
-
+
_policyTracker = new ServiceTracker(bundleContext, SlowConsumerPolicyPluginFactory.class.getName(), null);
_policyTracker.open();
_trackers.add(_policyTracker);
@@ -278,9 +287,9 @@ public class PluginManager implements Cl
}
private static <T> Map<String, T> getServices(ServiceTracker tracker)
- {
+ {
Map<String, T> services = new HashMap<String, T>();
-
+
if ((tracker != null) && (tracker.getServices() != null))
{
for (Object service : tracker.getServices())
@@ -300,16 +309,16 @@ public class PluginManager implements Cl
}
public static <T> Map<String, T> getServices(ServiceTracker tracker, Map<String, T> plugins)
- {
+ {
Map<String, T> services = getServices(tracker);
services.putAll(plugins);
return services;
}
public Map<List<String>, ConfigurationPluginFactory> getConfigurationPlugins()
- {
+ {
Map<List<String>, ConfigurationPluginFactory> services = new IdentityHashMap<List<String>, ConfigurationPluginFactory>();
-
+
if (_configTracker != null && _configTracker.getServices() != null)
{
for (Object service : _configTracker.getServices())
@@ -318,19 +327,19 @@ public class PluginManager implements Cl
services.put(factory.getParentPaths(), factory);
}
}
-
+
services.putAll(_configPlugins);
return services;
}
public Map<String, VirtualHostPluginFactory> getVirtualHostPlugins()
- {
+ {
return getServices(_virtualHostTracker, _vhostPlugins);
}
public Map<String, SlowConsumerPolicyPluginFactory> getSlowConsumerPlugins()
- {
+ {
return getServices(_policyTracker, _policyPlugins);
}
@@ -338,7 +347,7 @@ public class PluginManager implements Cl
{
return getServices(_exchangeTracker);
}
-
+
public Map<String, SecurityPluginFactory> getSecurityPlugins()
{
return getServices(_securityTracker, _securityPlugins);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org