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 2013/09/20 20:59:50 UTC
svn commit: r1525101 [20/21] - in /qpid/branches/linearstore/qpid: ./ bin/
cpp/ cpp/bindings/ cpp/bindings/qmf/ cpp/bindings/qmf/python/
cpp/bindings/qmf/ruby/ cpp/bindings/qmf/tests/ cpp/bindings/qmf2/
cpp/bindings/qmf2/examples/cpp/ cpp/bindings/qmf2...
Modified: qpid/branches/linearstore/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java (original)
+++ qpid/branches/linearstore/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/destinationurl/DestinationURLTest.java Fri Sep 20 18:59:30 2013
@@ -27,6 +27,7 @@ import org.slf4j.LoggerFactory;
import org.apache.qpid.client.AMQDestination;
import org.apache.qpid.client.RejectBehaviour;
import org.apache.qpid.exchange.ExchangeDefaults;
+import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.url.AMQBindingURL;
import org.apache.qpid.url.BindingURL;
@@ -138,7 +139,7 @@ public class DestinationURLTest extends
AMQBindingURL dest = new AMQBindingURL(url);
- assertTrue(dest.getExchangeClass().equals(ExchangeDefaults.DIRECT_EXCHANGE_CLASS));
+ assertTrue(dest.getExchangeClass().equals(AMQShortString.valueOf(ExchangeDefaults.DIRECT_EXCHANGE_CLASS)));
assertTrue(dest.getExchangeName().equalsCharSequence(""));
assertTrue(dest.getDestinationName().equalsCharSequence(""));
assertTrue(dest.getQueueName().equalsCharSequence("IBMPerfQueue1"));
@@ -180,18 +181,6 @@ public class DestinationURLTest extends
assertTrue("Failed to throw an URISyntaxException when both the bindingkey and routingkey is specified",exceptionThrown);
}
-
- public void testDestinationWithDurableTopic() throws URISyntaxException
- {
-
- String url = "topic://amq.topic//testTopicD?durable='true'&autodelete='true'&clientid='test'&subscription='testQueueD'";
-
- AMQBindingURL dest = new AMQBindingURL(url);
-
- assertTrue(dest.getExchangeClass().equalsCharSequence("topic"));
- assertTrue(dest.getExchangeName().equalsCharSequence("amq.topic"));
- assertTrue(dest.getQueueName().equalsCharSequence("test:testQueueD"));
- }
public void testExchangeOptionsNotPresent() throws URISyntaxException
{
@@ -374,6 +363,46 @@ public class DestinationURLTest extends
assertNull("Reject behaviour is unexpected", dest.getRejectBehaviour());
}
+ public void testBindingUrlWithoutDestinationAndQueueName() throws Exception
+ {
+ AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic//?routingkey='testTopic'");
+ assertEquals("Unexpected queue name", AMQShortString.EMPTY_STRING, bindingURL.getQueueName());
+ assertEquals("Unexpected destination", AMQShortString.EMPTY_STRING, bindingURL.getDestinationName());
+ assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
+ }
+
+ public void testBindingUrlWithoutDestinationAndMissedQueueName() throws Exception
+ {
+ AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic/?routingkey='testTopic'");
+ assertEquals("Unexpected queue name", AMQShortString.EMPTY_STRING, bindingURL.getQueueName());
+ assertEquals("Unexpected destination", AMQShortString.EMPTY_STRING, bindingURL.getDestinationName());
+ assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
+ }
+
+ public void testBindingUrlWithoutQueueName() throws Exception
+ {
+ AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic/destination/?routingkey='testTopic'");
+ assertEquals("Unexpected queue name", AMQShortString.EMPTY_STRING, bindingURL.getQueueName());
+ assertEquals("Unexpected destination", AMQShortString.valueOf("destination"), bindingURL.getDestinationName());
+ assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
+ }
+
+ public void testBindingUrlWithQueueNameWithoutDestination() throws Exception
+ {
+ AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic//queueName?routingkey='testTopic'");
+ assertEquals("Unexpected queue name", AMQShortString.valueOf("queueName"), bindingURL.getQueueName());
+ assertEquals("Unexpected destination", AMQShortString.EMPTY_STRING, bindingURL.getDestinationName());
+ assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
+ }
+
+ public void testBindingUrlWithQueueNameAndDestination() throws Exception
+ {
+ AMQBindingURL bindingURL = new AMQBindingURL("topic://amq.topic/destination/queueName?routingkey='testTopic'");
+ assertEquals("Unexpected queue name", AMQShortString.valueOf("queueName"), bindingURL.getQueueName());
+ assertEquals("Unexpected destination", AMQShortString.valueOf("destination"), bindingURL.getDestinationName());
+ assertEquals("Unexpected routing key", AMQShortString.valueOf("testTopic"), bindingURL.getRoutingKey());
+ }
+
public static junit.framework.Test suite()
{
return new junit.framework.TestSuite(DestinationURLTest.class);
Modified: qpid/branches/linearstore/qpid/java/common.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common.xml (original)
+++ qpid/branches/linearstore/qpid/java/common.xml Fri Sep 20 18:59:30 2013
@@ -24,9 +24,9 @@
<property name="project.name" value="qpid"/>
<!-- Version used for standard build output -->
- <property name="project.version" value="0.23"/>
+ <property name="project.version" value="0.25"/>
<!-- The release version used for maven output. SNAPSHOT added via maven.version.suffix -->
- <property name="project.version.maven" value="0.24"/>
+ <property name="project.version.maven" value="0.26"/>
<property name="project.url" value="http://qpid.apache.org"/>
<property name="project.groupid" value="org.apache.qpid"/>
<property name="project.namever" value="${project.name}-${project.version}"/>
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/common.bnd
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/common.bnd?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/common.bnd (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/common.bnd Fri Sep 20 18:59:30 2013
@@ -17,7 +17,7 @@
# under the License.
#
-ver: 0.23.0
+ver: 0.25.0
Bundle-SymbolicName: qpid-common
Bundle-Version: ${ver}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQChannelException.java Fri Sep 20 18:59:30 2013
@@ -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
@@ -21,6 +21,7 @@
package org.apache.qpid;
import org.apache.qpid.framing.AMQFrame;
+import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.MethodRegistry;
import org.apache.qpid.framing.ProtocolVersion;
import org.apache.qpid.protocol.AMQConstant;
@@ -56,7 +57,8 @@ public class AMQChannelException extends
public AMQFrame getCloseFrame(int channel)
{
MethodRegistry reg = MethodRegistry.getMethodRegistry(new ProtocolVersion(major,minor));
- return new AMQFrame(channel, reg.createChannelCloseBody(getErrorCode() == null ? AMQConstant.INTERNAL_ERROR.getCode() : getErrorCode().getCode(), getMessageAsShortString(),_classId,_methodId));
+ return new AMQFrame(channel, reg.createChannelCloseBody(getErrorCode() == null ? AMQConstant.INTERNAL_ERROR.getCode() : getErrorCode().getCode(),
+ AMQShortString.validValueOf(getMessage()),_classId,_methodId));
}
}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQConnectionException.java Fri Sep 20 18:59:30 2013
@@ -22,6 +22,7 @@
package org.apache.qpid;
import org.apache.qpid.framing.AMQFrame;
+import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.MethodRegistry;
import org.apache.qpid.framing.ProtocolVersion;
import org.apache.qpid.protocol.AMQConstant;
@@ -64,7 +65,7 @@ public class AMQConnectionException exte
MethodRegistry reg = MethodRegistry.getMethodRegistry(new ProtocolVersion(major,minor));
return new AMQFrame(0,
reg.createConnectionCloseBody(getErrorCode().getCode(),
- getMessageAsShortString(),
+ AMQShortString.validValueOf(getMessage()),
_classId,
_methodId));
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/AMQException.java Fri Sep 20 18:59:30 2013
@@ -39,7 +39,7 @@ public class AMQException extends Except
{
/** Holds the AMQ error code constant associated with this exception. */
private AMQConstant _errorCode;
-
+
private boolean _isHardError;
/**
@@ -75,13 +75,13 @@ public class AMQException extends Except
* Deprecated constructors brought from M2.1
*/
@Deprecated
- public AMQException(String msg)
+ public AMQException(String msg)
{
this(null, (msg == null) ? "" : msg);
}
-
- @Deprecated
- public AMQException(AMQConstant errorCode, String msg)
+
+ @Deprecated
+ public AMQException(AMQConstant errorCode, String msg)
{
this(errorCode, (msg == null) ? "" : msg, null);
}
@@ -97,7 +97,7 @@ public class AMQException extends Except
{
return getClass().getName() + ": " + getMessage() + (_errorCode == null ? "" : " [error code " + _errorCode + "]");
}
-
+
/**
* Gets the AMQ protocol exception code associated with this exception.
*
@@ -141,14 +141,4 @@ public class AMQException extends Except
return newAMQE;
}
- /**
- * Truncates the exception message to 255 characters if its length exceeds 255.
- *
- * @return exception message
- */
- public AMQShortString getMessageAsShortString()
- {
- String message = getMessage();
- return AMQShortString.valueOf(message, true, true);
- }
}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/exchange/ExchangeDefaults.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/exchange/ExchangeDefaults.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/exchange/ExchangeDefaults.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/exchange/ExchangeDefaults.java Fri Sep 20 18:59:30 2013
@@ -41,31 +41,30 @@ public class ExchangeDefaults
}
/** The default direct exchange, which is a special internal exchange that cannot be explicitly bound to. */
- public static final AMQShortString DEFAULT_EXCHANGE_NAME = AMQShortString.EMPTY_STRING;
+ public static final String DEFAULT_EXCHANGE_NAME = "";
/** The pre-defined topic exchange, the broker SHOULD provide this. */
- public static final AMQShortString TOPIC_EXCHANGE_NAME = new AMQShortString("amq.topic");
+ public static final String TOPIC_EXCHANGE_NAME = "amq.topic";
/** Defines the identifying type name of topic exchanges. */
- public static final AMQShortString TOPIC_EXCHANGE_CLASS = new AMQShortString("topic");
+ public static final String TOPIC_EXCHANGE_CLASS = "topic";
/** The pre-defined direct exchange, the broker MUST provide this. */
- public static final AMQShortString DIRECT_EXCHANGE_NAME = new AMQShortString("amq.direct");
+ public static final String DIRECT_EXCHANGE_NAME = "amq.direct";
/** Defines the identifying type name of direct exchanges. */
- public static final AMQShortString DIRECT_EXCHANGE_CLASS = new AMQShortString("direct");
+ public static final String DIRECT_EXCHANGE_CLASS = "direct";
/** The pre-defined headers exchange, the specification does not say this needs to be provided. */
- public static final AMQShortString HEADERS_EXCHANGE_NAME = new AMQShortString("amq.match");
+ public static final String HEADERS_EXCHANGE_NAME = "amq.match";
/** Defines the identifying type name of headers exchanges. */
- public static final AMQShortString HEADERS_EXCHANGE_CLASS = new AMQShortString("headers");
+ public static final String HEADERS_EXCHANGE_CLASS = "headers";
/** The pre-defined fanout exchange, the boker MUST provide this. */
- public static final AMQShortString FANOUT_EXCHANGE_NAME = new AMQShortString("amq.fanout");
+ public static final String FANOUT_EXCHANGE_NAME = "amq.fanout";
/** Defines the identifying type name of fanout exchanges. */
- public static final AMQShortString FANOUT_EXCHANGE_CLASS = new AMQShortString("fanout");
-
- public static final AMQShortString WILDCARD_ANY = new AMQShortString("*");
+ public static final String FANOUT_EXCHANGE_CLASS = "fanout";
+
}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java Fri Sep 20 18:59:30 2013
@@ -21,18 +21,15 @@
package org.apache.qpid.framing;
+import java.util.concurrent.ConcurrentHashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
-import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.Collection;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.WeakHashMap;
/**
* A short string is a representation of an AMQ Short String
@@ -64,7 +61,7 @@ public final class AMQShortString implem
{
if(_count == -1)
{
- _count = 1 + AMQShortString.this.occurences(_delim);
+ _count = 1 + AMQShortString.this.occurrences(_delim);
}
return _count;
}
@@ -100,40 +97,8 @@ public final class AMQShortString implem
return new AMQShortString(_data, from+_offset, to-from);
}
-
- private static final int LOCAL_INTERN_CACHE_SIZE = 2048;
-
- private static final ThreadLocal<Map<AMQShortString, AMQShortString>> _localInternMap =
- new ThreadLocal<Map<AMQShortString, AMQShortString>>()
- {
- protected Map<AMQShortString, AMQShortString> initialValue()
- {
- return new LinkedHashMap<AMQShortString, AMQShortString>()
- {
- @Override
- protected boolean removeEldestEntry(Map.Entry<AMQShortString, AMQShortString> eldest)
- {
- return size() > LOCAL_INTERN_CACHE_SIZE;
- }
- };
- };
- };
-
- private static final Map<AMQShortString, WeakReference<AMQShortString>> _globalInternMap =
- new WeakHashMap<AMQShortString, WeakReference<AMQShortString>>();
-
-
- private static final ThreadLocal<Map<String, WeakReference<AMQShortString>>> _localStringMap =
- new ThreadLocal<Map<String, WeakReference<AMQShortString>>>()
- {
- protected Map<String, WeakReference<AMQShortString>> initialValue()
- {
- return new WeakHashMap<String, WeakReference<AMQShortString>>();
- };
- };
-
- private static final Map<String, WeakReference<AMQShortString>> _globalStringMap =
- new WeakHashMap<String, WeakReference<AMQShortString>>();
+ private static final ConcurrentHashMap<AMQShortString, AMQShortString> _globalInternMap =
+ new ConcurrentHashMap<AMQShortString, AMQShortString>();
private static final Logger _logger = LoggerFactory.getLogger(AMQShortString.class);
@@ -443,7 +408,7 @@ public final class AMQShortString implem
{
if (_asString == null)
{
- AMQShortString intern = intern();
+ AMQShortString intern = intern(false);
if(intern == this)
{
@@ -641,35 +606,9 @@ public final class AMQShortString implem
public AMQShortString intern(boolean keep)
{
- hashCode();
-
- Map<AMQShortString, AMQShortString> localMap =
- _localInternMap.get();
-
- AMQShortString internString = localMap.get(this);
-
-
- if(internString != null)
- {
- return internString;
- }
-
-
- WeakReference<AMQShortString> ref;
- synchronized(_globalInternMap)
- {
-
- ref = _globalInternMap.get(this);
- if((ref == null) || ((internString = ref.get()) == null))
- {
- internString = keep ? shrink() : copy();
- ref = new WeakReference(internString);
- _globalInternMap.put(internString, ref);
- }
+ AMQShortString internString = keep ? _globalInternMap.putIfAbsent(this,this) : _globalInternMap.get(this);
- }
- localMap.put(internString, internString);
- return internString;
+ return internString == null ? this : internString;
}
@@ -680,7 +619,7 @@ public final class AMQShortString implem
return new AMQShortString(dataBytes,0,_length);
}
- private int occurences(final byte delim)
+ private int occurrences(final byte delim)
{
int count = 0;
final int end = _offset + _length;
@@ -794,7 +733,12 @@ public final class AMQShortString implem
return false; //To change body of created methods use File | Settings | File Templates.
}
- public static AMQShortString valueOf(Object obj, boolean truncate, boolean nullAsEmptyString)
+ public static AMQShortString validValueOf(Object obj)
+ {
+ return valueOf(obj,true,true);
+ }
+
+ static AMQShortString valueOf(Object obj, boolean truncate, boolean nullAsEmptyString)
{
if (obj == null)
{
@@ -826,37 +770,11 @@ public final class AMQShortString implem
{
return null;
}
-
- Map<String, WeakReference<AMQShortString>> localMap =
- _localStringMap.get();
-
- WeakReference<AMQShortString> ref = localMap.get(obj);
- AMQShortString internString;
-
- if(ref != null)
+ else
{
- internString = ref.get();
- if(internString != null)
- {
- return internString;
- }
+ return new AMQShortString(obj);
}
-
- synchronized(_globalStringMap)
- {
-
- ref = _globalStringMap.get(obj);
- if((ref == null) || ((internString = ref.get()) == null))
- {
- internString = (new AMQShortString(obj)).intern();
- ref = new WeakReference<AMQShortString>(internString);
- _globalStringMap.put(obj, ref);
- }
-
- }
- localMap.put(obj, ref);
- return internString;
}
public static String toString(AMQShortString amqShortString)
@@ -864,10 +782,4 @@ public final class AMQShortString implem
return amqShortString == null ? null : amqShortString.asString();
}
- public static void clearLocalCache()
- {
- _localInternMap.remove();
- _localStringMap.remove();
- }
-
}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java Fri Sep 20 18:59:30 2013
@@ -79,9 +79,9 @@ public class MethodConverter_8_0 extends
_basicPublishClassId = BasicPublishBodyImpl.CLASS_ID;
_basicPublishMethodId = BasicPublishBodyImpl.METHOD_ID;
-
+
}
-
+
public AMQBody convertToBody(byte[] data)
{
return new ContentBody(data);
@@ -97,7 +97,7 @@ public class MethodConverter_8_0 extends
return new MessagePublishInfoImpl(exchange == null ? null : exchange.intern(),
publishBody.getImmediate(),
publishBody.getMandatory(),
- routingKey == null ? null : routingKey.intern());
+ routingKey == null ? null : routingKey.intern(false));
}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java Fri Sep 20 18:59:30 2013
@@ -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
@@ -22,7 +22,6 @@ package org.apache.qpid.ssl;
import org.apache.qpid.transport.network.security.ssl.QpidClientX509KeyManager;
import org.apache.qpid.transport.network.security.ssl.QpidMultipleTrustManager;
-import org.apache.qpid.transport.network.security.ssl.QpidPeersOnlyTrustManager;
import org.apache.qpid.transport.network.security.ssl.SSLUtil;
import javax.net.ssl.KeyManager;
@@ -42,55 +41,17 @@ import java.util.Collections;
/**
* Factory used to create SSLContexts. SSL needs to be configured
* before this will work.
- *
+ *
*/
public class SSLContextFactory
{
public static final String TRANSPORT_LAYER_SECURITY_CODE = "TLS";
-
- public static class TrustStoreWrapper
- {
- private final String trustStorePath;
- private final String trustStorePassword;
- private final String trustStoreType;
- private final Boolean trustStorePeersOnly;
- private String trustManagerFactoryAlgorithm;
-
- public TrustStoreWrapper(final String trustStorePath, final String trustStorePassword,
- final String trustStoreType, final Boolean trustStorePeersOnly,
- final String trustManagerFactoryAlgorithm)
- {
- this.trustStorePath = trustStorePath;
- this.trustStorePassword = trustStorePassword;
- this.trustStoreType = trustStoreType;
- this.trustStorePeersOnly = trustStorePeersOnly;
- this.trustManagerFactoryAlgorithm = trustManagerFactoryAlgorithm;
- }
- }
private SSLContextFactory()
{
//no instances
}
- public static SSLContext buildServerContext(final String keyStorePath,
- final String keyStorePassword, final String keyStoreType,
- final String keyManagerFactoryAlgorithm)
- throws GeneralSecurityException, IOException
- {
- return buildContext(Collections.<TrustStoreWrapper>emptyList(), keyStorePath,
- keyStorePassword, keyStoreType, keyManagerFactoryAlgorithm, null);
- }
-
- public static SSLContext buildClientContext(Collection<TrustStoreWrapper> trustStores,
- final String keyStorePath, final String keyStorePassword,
- final String keyStoreType, final String keyManagerFactoryAlgorithm,
- final String certAlias) throws GeneralSecurityException, IOException
- {
- return buildContext(trustStores, keyStorePath, keyStorePassword, keyStoreType,
- keyManagerFactoryAlgorithm, certAlias);
- }
-
public static SSLContext buildClientContext(final String trustStorePath,
final String trustStorePassword, final String trustStoreType,
final String trustManagerFactoryAlgorithm, final String keyStorePath,
@@ -98,17 +59,25 @@ public class SSLContextFactory
final String keyManagerFactoryAlgorithm, final String certAlias)
throws GeneralSecurityException, IOException
{
- TrustStoreWrapper trstWrapper = new TrustStoreWrapper(trustStorePath, trustStorePassword,
- trustStoreType, Boolean.FALSE,
- trustManagerFactoryAlgorithm);
- return buildContext(Collections.singletonList(trstWrapper), keyStorePath,
- keyStorePassword, keyStoreType, keyManagerFactoryAlgorithm, certAlias);
- }
-
- private static SSLContext buildContext(final Collection<TrustStoreWrapper> trstWrappers,
- final String keyStorePath, final String keyStorePassword,
- final String keyStoreType, final String keyManagerFactoryAlgorithm,
- final String certAlias)
+ return buildContext(trustStorePath,
+ trustStorePassword,
+ trustStoreType,
+ trustManagerFactoryAlgorithm,
+ keyStorePath,
+ keyStorePassword,
+ keyStoreType,
+ keyManagerFactoryAlgorithm,
+ certAlias);
+ }
+
+ private static SSLContext buildContext(String trustStorePath,
+ String trustStorePassword,
+ String trustStoreType,
+ String trustManagerFactoryAlgorithm,
+ String keyStorePath,
+ String keyStorePassword,
+ String keyStoreType,
+ String keyManagerFactoryAlgorithm, String certAlias)
throws GeneralSecurityException, IOException
{
// Initialize the SSLContext to work with our key managers.
@@ -117,53 +86,20 @@ public class SSLContextFactory
final TrustManager[] trustManagers;
final KeyManager[] keyManagers;
-
- final Collection<TrustManager> trustManagersCol = new ArrayList<TrustManager>();
- final QpidMultipleTrustManager mulTrustManager = new QpidMultipleTrustManager();
- for (TrustStoreWrapper tsw : trstWrappers)
- {
- if (tsw.trustStorePath != null)
- {
- final KeyStore ts = SSLUtil.getInitializedKeyStore(tsw.trustStorePath,
- tsw.trustStorePassword, tsw.trustStoreType);
- final TrustManagerFactory tmf = TrustManagerFactory
- .getInstance(tsw.trustManagerFactoryAlgorithm);
- tmf.init(ts);
- TrustManager[] delegateManagers = tmf.getTrustManagers();
- for (TrustManager tm : delegateManagers)
- {
- if (tm instanceof X509TrustManager)
- {
- if (Boolean.TRUE.equals(tsw.trustStorePeersOnly))
- {
- // truststore is supposed to trust only clients which peers certificates
- // are directly in the store. CA signing will not be considered.
- mulTrustManager.addTrustManager(new QpidPeersOnlyTrustManager(ts, (X509TrustManager) tm));
- }
- else
- {
- mulTrustManager.addTrustManager((X509TrustManager) tm);
- }
- }
- else
- {
- trustManagersCol.add(tm);
- }
- }
- }
- }
- if (! mulTrustManager.isEmpty())
- {
- trustManagersCol.add(mulTrustManager);
- }
-
- if (trustManagersCol.isEmpty())
+
+ if (trustStorePath != null)
{
- trustManagers = null;
+ final KeyStore ts = SSLUtil.getInitializedKeyStore(trustStorePath,
+ trustStorePassword, trustStoreType);
+ final TrustManagerFactory tmf = TrustManagerFactory
+ .getInstance(trustManagerFactoryAlgorithm);
+ tmf.init(ts);
+
+ trustManagers = tmf.getTrustManagers();
}
else
{
- trustManagers = trustManagersCol.toArray(new TrustManager[trustManagersCol.size()]);
+ trustManagers = null;
}
if (keyStorePath != null)
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java Fri Sep 20 18:59:30 2013
@@ -124,7 +124,7 @@ public class SecurityLayerFactory
public String getUserID()
{
- return SSLUtil.retriveIdentity(_engine);
+ return SSLUtil.retrieveIdentity(_engine);
}
}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java Fri Sep 20 18:59:30 2013
@@ -1,5 +1,5 @@
/*
- *
+ *
* 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
@@ -7,19 +7,22 @@
* 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.transport.network.security.ssl;
+import javax.naming.InvalidNameException;
+import javax.naming.ldap.LdapName;
+import javax.naming.ldap.Rdn;
import org.apache.qpid.transport.TransportException;
import org.apache.qpid.transport.util.Logger;
@@ -50,21 +53,21 @@ public class SSLUtil
Certificate cert = engine.getSession().getPeerCertificates()[0];
Principal p = ((X509Certificate)cert).getSubjectDN();
String dn = p.getName();
- String hostname = null;
-
+ String hostname = null;
+
if (dn.contains("CN="))
{
hostname = dn.substring(3,
dn.indexOf(",") == -1? dn.length(): dn.indexOf(","));
- }
-
+ }
+
if (log.isDebugEnabled())
{
log.debug("Hostname expected : " + hostnameExpected);
log.debug("Distinguished Name for server certificate : " + dn);
log.debug("Host Name obtained from DN : " + hostname);
}
-
+
if (hostname != null && !(hostname.equalsIgnoreCase(hostnameExpected) ||
hostname.equalsIgnoreCase(hostnameExpected + ".localdomain")))
{
@@ -72,60 +75,78 @@ public class SSLUtil
" Expected : " + hostnameExpected +
" Found in cert : " + hostname);
}
-
+
}
catch(SSLPeerUnverifiedException e)
{
log.warn("Exception received while trying to verify hostname",e);
// For some reason the SSL engine sets the handshake status to FINISH twice
- // in succession. The first time the peer certificate
+ // in succession. The first time the peer certificate
// info is not available. The second time it works !
// Therefore have no choice but to ignore the exception here.
}
}
-
- public static String retriveIdentity(SSLEngine engine)
+
+ public static String getIdFromSubjectDN(String dn)
{
- StringBuffer id = new StringBuffer();
+ String cnStr = null;
+ String dcStr = null;
+ if(dn == null)
+ {
+ return "";
+ }
+ else
+ {
+ try
+ {
+ LdapName ln = new LdapName(dn);
+ for(Rdn rdn : ln.getRdns())
+ {
+ if("CN".equalsIgnoreCase(rdn.getType()))
+ {
+ cnStr = rdn.getValue().toString();
+ }
+ else if("DC".equalsIgnoreCase(rdn.getType()))
+ {
+ if(dcStr == null)
+ {
+ dcStr = rdn.getValue().toString();
+ }
+ else
+ {
+ dcStr = rdn.getValue().toString() + '.' + dcStr;
+ }
+ }
+ }
+ return cnStr == null || cnStr.length()==0 ? "" : dcStr == null ? cnStr : cnStr + '@' + dcStr;
+ }
+ catch (InvalidNameException e)
+ {
+ log.warn("Invalid name: '"+dn+"'. ");
+ return "";
+ }
+ }
+ }
+
+
+ public static String retrieveIdentity(SSLEngine engine)
+ {
+ String id = "";
+ Certificate cert = engine.getSession().getLocalCertificates()[0];
+ Principal p = ((X509Certificate)cert).getSubjectDN();
+ String dn = p.getName();
try
{
- Certificate cert = engine.getSession().getLocalCertificates()[0];
- Principal p = ((X509Certificate)cert).getSubjectDN();
- String dn = p.getName();
-
- if (dn.contains("CN="))
- {
- String str = dn.substring(dn.indexOf("CN=")+3, dn.length());
- id.append(str.substring(0,
- str.indexOf(",") == -1? str.length(): str.indexOf(",")));
- }
-
- if (dn.contains("DC="))
- {
- id.append("@");
- int c = 0;
- for (String toks : dn.split(","))
- {
- if (toks.contains("DC"))
- {
- if (c > 0) {id.append(".");}
- id.append(toks.substring(
- toks.indexOf("=")+1,
- toks.indexOf(",") == -1? toks.length(): toks.indexOf(",")));
- c++;
- }
- }
- }
+ id = SSLUtil.getIdFromSubjectDN(dn);
}
- catch(Exception e)
+ catch (Exception e)
{
- log.info("Exception received while trying to retrive client identity from SSL cert",e);
+ log.info("Exception received while trying to retrive client identity from SSL cert", e);
}
-
log.debug("Extracted Identity from client certificate : " + id);
- return id.toString();
+ return id;
}
-
+
public static KeyStore getInitializedKeyStore(String storePath, String storePassword, String keyStoreType) throws GeneralSecurityException, IOException
{
KeyStore ks = KeyStore.getInstance(keyStoreType);
@@ -137,7 +158,7 @@ public class SSLUtil
{
in = new FileInputStream(f);
}
- else
+ else
{
in = Thread.currentThread().getContextClassLoader().getResourceAsStream(storePath);
}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/AMQBindingURL.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/AMQBindingURL.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/AMQBindingURL.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/AMQBindingURL.java Fri Sep 20 18:59:30 2013
@@ -34,9 +34,9 @@ public class AMQBindingURL implements Bi
private static final Logger _logger = LoggerFactory.getLogger(AMQBindingURL.class);
private String _url;
- private AMQShortString _exchangeClass = ExchangeDefaults.DIRECT_EXCHANGE_CLASS;
+ private AMQShortString _exchangeClass = AMQShortString.valueOf(ExchangeDefaults.DIRECT_EXCHANGE_CLASS);
private AMQShortString _exchangeName = new AMQShortString("");
- private AMQShortString _destinationName = new AMQShortString("");;
+ private AMQShortString _destinationName = new AMQShortString("");
private AMQShortString _queueName = new AMQShortString("");
private AMQShortString[] _bindingKeys = new AMQShortString[0];
private HashMap<String, String> _options;
@@ -56,7 +56,6 @@ public class AMQBindingURL implements Bi
{
BindingURLParser parser = new BindingURLParser();
parser.parse(_url,this);
- processOptions();
_logger.debug("URL Parsed: " + this);
}
@@ -80,10 +79,6 @@ public class AMQBindingURL implements Bi
setExchangeName(new AMQShortString(exchangeName));
}
- private void processOptions() throws URISyntaxException
- {
- }
-
public String getURL()
{
return _url;
@@ -98,7 +93,7 @@ public class AMQBindingURL implements Bi
{
_exchangeClass = exchangeClass;
- if (exchangeClass.equals(ExchangeDefaults.TOPIC_EXCHANGE_CLASS))
+ if (exchangeClass.equals(AMQShortString.valueOf(ExchangeDefaults.TOPIC_EXCHANGE_CLASS)))
{
setOption(BindingURL.OPTION_EXCLUSIVE, "true");
}
@@ -152,11 +147,11 @@ public class AMQBindingURL implements Bi
public AMQShortString getRoutingKey()
{
- if (_exchangeClass.equals(ExchangeDefaults.DIRECT_EXCHANGE_CLASS))
+ if (_exchangeClass.equals(AMQShortString.valueOf(ExchangeDefaults.DIRECT_EXCHANGE_CLASS)))
{
if (containsOption(BindingURL.OPTION_ROUTING_KEY))
{
- return new AMQShortString((String)getOption(OPTION_ROUTING_KEY));
+ return new AMQShortString(getOption(OPTION_ROUTING_KEY));
}
else
{
@@ -166,7 +161,7 @@ public class AMQBindingURL implements Bi
if (containsOption(BindingURL.OPTION_ROUTING_KEY))
{
- return new AMQShortString((String)getOption(OPTION_ROUTING_KEY));
+ return new AMQShortString(getOption(OPTION_ROUTING_KEY));
}
return getDestinationName();
@@ -196,7 +191,7 @@ public class AMQBindingURL implements Bi
public String toString()
{
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
sb.append(_exchangeClass);
sb.append("://");
@@ -212,7 +207,7 @@ public class AMQBindingURL implements Bi
if (getRoutingKey() == null || getRoutingKey().toString().equals(""))
{
- if (sb.toString().indexOf("?") == -1)
+ if (!sb.toString().contains("?"))
{
sb.append("?");
}
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURL.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURL.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURL.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURL.java Fri Sep 20 18:59:30 2013
@@ -32,8 +32,6 @@ public interface BindingURL
public static final String OPTION_AUTODELETE = "autodelete";
public static final String OPTION_DURABLE = "durable";
public static final String OPTION_BROWSE = "browse";
- public static final String OPTION_CLIENTID = "clientid";
- public static final String OPTION_SUBSCRIPTION = "subscription";
public static final String OPTION_ROUTING_KEY = "routingkey";
public static final String OPTION_BINDING_KEY = "bindingkey";
public static final String OPTION_EXCHANGE_AUTODELETE = "exchangeautodelete";
Modified: qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/main/java/org/apache/qpid/url/BindingURLParser.java Fri Sep 20 18:59:30 2013
@@ -1,5 +1,5 @@
/*
- *
+ *
* 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
@@ -7,16 +7,16 @@
* 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.url;
@@ -61,7 +61,8 @@ public class BindingURLParser
}
//<exch_class>://<exch_name>/[<destination>]/[<queue>]?<option>='<value>'[,<option>='<value>']*
- public synchronized void parse(String url,AMQBindingURL bindingURL) throws URISyntaxException
+ public synchronized void
+ parse(String url,AMQBindingURL bindingURL) throws URISyntaxException
{
_url = (url + END_OF_URL_MARKER_CHAR).toCharArray();
_bindingURL = bindingURL;
@@ -203,14 +204,14 @@ public class BindingURLParser
// "myQueue?durable='true'" use case
else if (nextChar == QUESTION_MARK_CHAR)
{
- _bindingURL.setExchangeClass(ExchangeDefaults.DIRECT_EXCHANGE_CLASS.asString());
+ _bindingURL.setExchangeClass(ExchangeDefaults.DIRECT_EXCHANGE_CLASS);
_bindingURL.setExchangeName("");
_bindingURL.setQueueName(builder.toString());
return BindingURLParserState.QUESTION_MARK_CHAR;
}
else
{
- _bindingURL.setExchangeClass(ExchangeDefaults.DIRECT_EXCHANGE_CLASS.asString());
+ _bindingURL.setExchangeClass(ExchangeDefaults.DIRECT_EXCHANGE_CLASS);
_bindingURL.setExchangeName("");
_bindingURL.setQueueName(builder.toString());
return BindingURLParserState.BINDING_URL_END;
@@ -418,31 +419,11 @@ public class BindingURLParser
{
throw new URISyntaxException(String.valueOf(_url),"It is illegal to specify both a routingKey and a bindingKey in the same URL",-1);
}
-
- // check for durable subscriptions
- if (_bindingURL.getExchangeClass().equals(ExchangeDefaults.TOPIC_EXCHANGE_CLASS))
- {
- String queueName = null;
- if (Boolean.parseBoolean(_bindingURL.getOption(BindingURL.OPTION_DURABLE)))
- {
- if (_bindingURL.containsOption(BindingURL.OPTION_CLIENTID) && _bindingURL.containsOption(BindingURL.OPTION_SUBSCRIPTION))
- {
- queueName = _bindingURL.getOption(BindingURL.OPTION_CLIENTID) + ":" + _bindingURL.getOption(BindingURL.OPTION_SUBSCRIPTION);
- }
- else
- {
- throw new URISyntaxException(String.valueOf(_url),"Durable subscription must have values for " + BindingURL.OPTION_CLIENTID
- + " and " + BindingURL.OPTION_SUBSCRIPTION , -1);
-
- }
- }
- _bindingURL.setQueueName(queueName);
- }
}
public static void main(String[] args)
{
-
+
String[] urls = new String[]
{
"topic://amq.topic//myTopic?routingkey='stocks.#'",
Modified: qpid/branches/linearstore/qpid/java/common/src/test/java/org/apache/qpid/AMQExceptionTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/test/java/org/apache/qpid/AMQExceptionTest.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/test/java/org/apache/qpid/AMQExceptionTest.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/test/java/org/apache/qpid/AMQExceptionTest.java Fri Sep 20 18:59:30 2013
@@ -101,7 +101,7 @@ public class AMQExceptionTest extends Te
sb.append("message [" + i + "]");
}
AMQException e = new AMQException(AMQConstant.INTERNAL_ERROR, sb.toString(), null);
- AMQShortString message = e.getMessageAsShortString();
+ AMQShortString message = AMQShortString.validValueOf(e.getMessage());
assertEquals(sb.substring(0, AMQShortString.MAX_LENGTH - 3) + "...", message.toString());
}
Modified: qpid/branches/linearstore/qpid/java/common/src/test/java/org/apache/qpid/ssl/SSLContextFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/common/src/test/java/org/apache/qpid/ssl/SSLContextFactoryTest.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/common/src/test/java/org/apache/qpid/ssl/SSLContextFactoryTest.java (original)
+++ qpid/branches/linearstore/qpid/java/common/src/test/java/org/apache/qpid/ssl/SSLContextFactoryTest.java Fri Sep 20 18:59:30 2013
@@ -36,25 +36,7 @@ public class SSLContextFactoryTest exten
private static final String DEFAULT_TRUST_MANAGER_ALGORITHM = TrustManagerFactory.getDefaultAlgorithm();
private static final String CERT_ALIAS_APP1 = "app1";
- public void testBuildServerContext() throws Exception
- {
- SSLContext context = SSLContextFactory.buildServerContext(BROKER_KEYSTORE_PATH, STORE_PASSWORD, STORE_TYPE, DEFAULT_KEY_MANAGER_ALGORITHM);
- assertNotNull("SSLContext should not be null", context);
- }
- public void testBuildServerContextWithIncorrectPassword() throws Exception
- {
- try
- {
- SSLContextFactory.buildServerContext(BROKER_KEYSTORE_PATH, "sajdklsad", STORE_TYPE, DEFAULT_KEY_MANAGER_ALGORITHM);
- fail("Exception was not thrown due to incorrect password");
- }
- catch (IOException e)
- {
- //expected
- }
- }
-
public void testTrustStoreDoesNotExist() throws Exception
{
try
@@ -79,7 +61,7 @@ public class SSLContextFactoryTest exten
SSLContext context = SSLContextFactory.buildClientContext(CLIENT_TRUSTSTORE_PATH, STORE_PASSWORD, STORE_TYPE, DEFAULT_TRUST_MANAGER_ALGORITHM, CLIENT_KEYSTORE_PATH, STORE_PASSWORD, STORE_TYPE, DEFAULT_KEY_MANAGER_ALGORITHM, null);
assertNotNull("SSLContext should not be null", context);
}
-
+
public void testBuildClientContextWithForClientAuthWithCertAlias() throws Exception
{
SSLContext context = SSLContextFactory.buildClientContext(CLIENT_TRUSTSTORE_PATH, STORE_PASSWORD, STORE_TYPE, DEFAULT_TRUST_MANAGER_ALGORITHM, CLIENT_KEYSTORE_PATH, STORE_PASSWORD, STORE_TYPE, DEFAULT_KEY_MANAGER_ALGORITHM, CERT_ALIAS_APP1);
Modified: qpid/branches/linearstore/qpid/java/ivy.nexus.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/ivy.nexus.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/ivy.nexus.xml (original)
+++ qpid/branches/linearstore/qpid/java/ivy.nexus.xml Fri Sep 20 18:59:30 2013
@@ -57,6 +57,66 @@
<artifact name="qpid-broker-plugins-management-jmx" type="jar.asc" ext="jar.asc"/>
<artifact name="qpid-broker-plugins-management-jmx" type="source" ext="jar" e:classifier="sources"/>
<artifact name="qpid-broker-plugins-management-jmx" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-0-10-protocol" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-amqp-0-10-protocol" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-0-10-protocol" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-amqp-0-10-protocol" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-0-10-protocol" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-0-10-protocol" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-0-8-protocol" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-amqp-0-8-protocol" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-0-8-protocol" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-amqp-0-8-protocol" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-0-8-protocol" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-0-8-protocol" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-1-0-protocol" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-amqp-1-0-protocol" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-1-0-protocol" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-amqp-1-0-protocol" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-1-0-protocol" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-1-0-protocol" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-10-to-1-0" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-0-10" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-amqp-msg-conv-0-8-to-1-0" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-derby-store" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-derby-store" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-derby-store" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-derby-store" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-derby-store" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-derby-store" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-jdbc-store" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-jdbc-store" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-jdbc-store" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-jdbc-store" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-jdbc-store" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-jdbc-store" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-memory-store" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-memory-store" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-memory-store" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-memory-store" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-memory-store" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-memory-store" type="source.asc" ext="jar.asc" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-jdbc-provider-bone" type="pom" ext="pom"/>
+ <artifact name="qpid-broker-plugins-jdbc-provider-bone" type="pom.asc" ext="pom.asc"/>
+ <artifact name="qpid-broker-plugins-jdbc-provider-bone" type="jar" ext="jar"/>
+ <artifact name="qpid-broker-plugins-jdbc-provider-bone" type="jar.asc" ext="jar.asc"/>
+ <artifact name="qpid-broker-plugins-jdbc-provider-bone" type="source" ext="jar" e:classifier="sources"/>
+ <artifact name="qpid-broker-plugins-jdbc-provider-bone" type="source.asc" ext="jar.asc" e:classifier="sources"/>
<artifact name="qpid-amqp-1-0-common" type="pom" ext="pom"/>
<artifact name="qpid-amqp-1-0-common" type="pom.asc" ext="pom.asc"/>
<artifact name="qpid-amqp-1-0-common" type="jar" ext="jar"/>
Modified: qpid/branches/linearstore/qpid/java/ivy.retrieve.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/ivy.retrieve.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/ivy.retrieve.xml (original)
+++ qpid/branches/linearstore/qpid/java/ivy.retrieve.xml Fri Sep 20 18:59:30 2013
@@ -76,7 +76,7 @@
<!-- The following are optional dependencies, for modules providing optional functionlity or
for use in optional build/test steps. Their optional status is usually indicative of licences
which are not compatible with the Apache Licence -->
- <dependency org="com.sleepycat" name="je" rev="5.0.73" transitive="false" conf="bdbje"/>
+ <dependency org="com.sleepycat" name="je" rev="5.0.84" transitive="false" conf="bdbje"/>
<dependency org="jfree" name="jfreechart" rev="1.0.13" transitive="false" conf="jfree"/>
<dependency org="jfree" name="jcommon" rev="1.0.16" transitive="false" conf="jfree"/>
<dependency org="com.jolbox" name="bonecp" rev="0.7.1.RELEASE" transitive="false" conf="bonecp"/>
Modified: qpid/branches/linearstore/qpid/java/jca/README-JBOSS.txt
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/jca/README-JBOSS.txt?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/jca/README-JBOSS.txt (original)
+++ qpid/branches/linearstore/qpid/java/jca/README-JBOSS.txt Fri Sep 20 18:59:30 2013
@@ -101,7 +101,7 @@ provides two such objects
name="qpid.jca:name=HelloQueue">
<attribute name="JNDIName">Hello</attribute>
<depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='qpid-ra-<ra-version>.rar'</depends>
- <attribute name="Type">javax.jms.Destination</attribute>
+ <attribute name="Type">org.apache.qpid.ra.admin.QpidQueue/attribute>
<attribute name="Properties">
DestinationAddress=amq.direct
</attribute>
@@ -118,7 +118,7 @@ can be customized for your environment.
name="qpid.jca:name=HelloTopic">
<attribute name="JNDIName">HelloTopic</attribute>
<depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='qpid-ra-<ra-version>.rar'</depends>
- <attribute name="Type">javax.jms.Destination</attribute>
+ <attribute name="Type">org.apache.qpid.ra.admin.QpidTopic</attribute>
<attribute name="Properties">
DestinationAddress=amq.topic
</attribute>
Modified: qpid/branches/linearstore/qpid/java/jca/README.txt
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/jca/README.txt?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/jca/README.txt (original)
+++ qpid/branches/linearstore/qpid/java/jca/README.txt Fri Sep 20 18:59:30 2013
@@ -97,7 +97,7 @@ UseConnectionPerHandler
The Apache C++ Broker multiplexes on the physical connection rather than the session. As a result, performance
improvements can be gained by allocating and assigning a connection per inbound listener. The alternative is
to share a connection across each handler for a given endpoint (MDB).
-Default:true
+Default:false
The ManagedConnectionFactory JavaBean
=====================================
Modified: qpid/branches/linearstore/qpid/java/jca/example/README-JBOSS7.txt
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/jca/example/README-JBOSS7.txt?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/jca/example/README-JBOSS7.txt (original)
+++ qpid/branches/linearstore/qpid/java/jca/example/README-JBOSS7.txt Fri Sep 20 18:59:30 2013
@@ -64,8 +64,6 @@ deploy this file copy the file to:
JBOSS_HOME/standalone/configuration
-directory.
-
Prior to deploying any application component, the JBoss application server
should be started and available for requests. In order to use the qpid-standalone.xml
file generated in the previous step, when starting JBoss AS 7 invoke the following:
@@ -100,7 +98,22 @@ will attempt to deploy the Qpid JCA exam
Once the above command executes successfully, the Qpid JCA example application is
deployed, configured and ready for use.
-Note, currently there is an issue with 'hot-deployment' in the JBoss AS 7 environment.
+If you choose to use the standalone 'thin' EJB3 client example, you will need to configure
+the security realm for your application. Please see
+
+http://www.mastertheboss.com/jboss-as-7/jboss-as-7-remote-ejb-client-tutorial
+
+on instructions for how to do this in the JBoss7 environment. Once this is done you
+will need to change the conf/jboss-ejb-client.properties file to use your recently
+configured username/password for your application:
+
+remote.connection.default.username=CHANGEME
+remote.connection.default.password=CHANGEME
+
+Modify these properties to use the username/password you configured in the
+above step.
+
+Currently there is an issue with 'hot-deployment' in the JBoss AS 7 environment.
If you need to re-deploy the EAR file, restarting JBoss AS 7 is required.
The build-jboss7-properties.xml file contains JBoss AS 7 specific configuration options
Modified: qpid/branches/linearstore/qpid/java/jca/example/conf/jboss-ejb-client.properties
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/jca/example/conf/jboss-ejb-client.properties?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/jca/example/conf/jboss-ejb-client.properties (original)
+++ qpid/branches/linearstore/qpid/java/jca/example/conf/jboss-ejb-client.properties Fri Sep 20 18:59:30 2013
@@ -7,6 +7,6 @@ remote.connection.default.host=localhost
remote.connection.default.port = 4447
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false
-remote.connection.default.username=wmprice
-remote.connection.default.password=72whtu78
+remote.connection.default.username=CHANGEME
+remote.connection.default.password=CHANGEME
Modified: qpid/branches/linearstore/qpid/java/jca/rar/src/main/resources/META-INF/ra.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/jca/rar/src/main/resources/META-INF/ra.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/jca/rar/src/main/resources/META-INF/ra.xml (original)
+++ qpid/branches/linearstore/qpid/java/jca/rar/src/main/resources/META-INF/ra.xml Fri Sep 20 18:59:30 2013
@@ -109,12 +109,12 @@
<config-property-type>java.lang.String</config-property-type>
<config-property-value>amqp://anonymous:passwd@client/test?brokerlist='tcp://localhost?sasl_mechs='PLAIN''</config-property-value>
</config-property>
-
+
<config-property>
<description>Use a JMS Connection per MessageHandler</description>
<config-property-name>UseConnectionPerHandler</config-property-name>
<config-property-type>java.lang.Boolean</config-property-type>
- <config-property-value>true</config-property-value>
+ <config-property-value>false</config-property-value>
</config-property>
<outbound-resourceadapter>
Modified: qpid/branches/linearstore/qpid/java/lib/poms/bonecp-0.7.1.RELEASE.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/lib/poms/bonecp-0.7.1.RELEASE.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/lib/poms/bonecp-0.7.1.RELEASE.xml (original)
+++ qpid/branches/linearstore/qpid/java/lib/poms/bonecp-0.7.1.RELEASE.xml Fri Sep 20 18:59:30 2013
@@ -19,4 +19,10 @@
<groupId>com.jolbox</groupId>
<artifactId>bonecp</artifactId>
<version>0.7.1.RELEASE</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ </exclusion>
+ </exclusions>
</dep>
Modified: qpid/branches/linearstore/qpid/java/lib/poms/guava-14.0.1.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/lib/poms/guava-14.0.1.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/lib/poms/guava-14.0.1.xml (original)
+++ qpid/branches/linearstore/qpid/java/lib/poms/guava-14.0.1.xml Fri Sep 20 18:59:30 2013
@@ -16,7 +16,7 @@
limitations under the License.
-->
<dep>
- <groupId>com.google</groupId>
+ <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dep>
Modified: qpid/branches/linearstore/qpid/java/management/common/src/main/java/management-common.bnd
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/management/common/src/main/java/management-common.bnd?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/management/common/src/main/java/management-common.bnd (original)
+++ qpid/branches/linearstore/qpid/java/management/common/src/main/java/management-common.bnd Fri Sep 20 18:59:30 2013
@@ -17,7 +17,7 @@
# under the License.
#
-ver: 0.23.0
+ver: 0.25.0
Bundle-SymbolicName: qpid-management-common
Bundle-Version: ${ver}
Modified: qpid/branches/linearstore/qpid/java/module.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/module.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/module.xml (original)
+++ qpid/branches/linearstore/qpid/java/module.xml Fri Sep 20 18:59:30 2013
@@ -74,6 +74,7 @@
<property name="module.genpom.args" value=""/>
<property name="module.maven.depends" value=""/>
<property name="maven.remote.repo" value="file://${module.release.base}/maven"/>
+ <property name="eclipse.project.suffix" value=""/>
<property name="broker.log.prefix" value="BROKER: "/>
<property name="broker.log.interleave" value="true"/>
@@ -521,10 +522,15 @@
</jar>
</target>
- <target name="copy-broker-plugin-jars" if="broker.plugin" description="copy broker plugins for use in release packaging">
+ <target name="copy-broker-plugin-jars" depends="copy-broker-plugin-jars-deps" if="broker.plugin" description="copy broker plugins for use in release packaging">
<copy file="${module.jar}" todir="${build.scratch.broker.plugins.lib}" failonerror="true"/>
</target>
+ <!-- Overridden in broker-plugins/amqp-1-0-protocol, bdbstore, and bdbstore/jmx modules -->
+ <target name="copy-broker-plugin-jars-deps" if="broker.plugin" description="copy broker plugins dependencies for use in release packaging">
+ <copylist todir="${build.scratch.broker.plugins.lib}" dir="${project.root}" files="${module.libs}"/>
+ </target>
+
<target name="copy-files-to-module-metainf" depends="copy-project-resources-metainf, copy-module-resources-metainf, copy-module-src-resources-metainf"/>
<target name="copy-project-resources-metainf">
@@ -909,7 +915,7 @@ qpid.name=${project.name}
<map from="${project.root}${file.separator}" to=''/>
</pathconvert>
<map property="eclipse.required.slashedprojectnames" value="${eclipse.required.projectnames}" join="${path.separator}">
- <globmapper from="*" to="/*"/>
+ <globmapper from="*" to="/*${eclipse.project.suffix}"/>
</map>
<echo message="Ant module dependencies : ${module.depends} ${module.test.depends} converted to Eclipse required project(s): ${eclipse.required.slashedprojectnames}"/>
@@ -921,7 +927,7 @@ qpid.name=${project.name}
<!-- Create the Eclipse .project -->
<target name="eclipse-project">
<eclipse updatealways="${eclipse.updatealways}">
- <project name="${module.name}"/>
+ <project name="${module.name}${eclipse.project.suffix}"/>
<!-- If the Eclipse task were to ever support the generation of
linked resources, we would configure it to generate
Modified: qpid/branches/linearstore/qpid/java/perftests/build.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/perftests/build.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/perftests/build.xml (original)
+++ qpid/branches/linearstore/qpid/java/perftests/build.xml Fri Sep 20 18:59:30 2013
@@ -33,7 +33,7 @@
</condition>
<property name="module.depends" value="client common"/>
- <property name="module.test.depends" value="systests broker common/tests management/common ${perftests.optional.test.depends}"/>
+ <property name="module.test.depends" value="systests broker broker-plugins/memory-store broker-plugins/derby-store common/tests management/common broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol broker-plugins/amqp-1-0-protocol ${perftests.optional.test.depends}"/>
<import file="../module.xml"/>
Modified: qpid/branches/linearstore/qpid/java/resources/README.txt
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/resources/README.txt?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/resources/README.txt (original)
+++ qpid/branches/linearstore/qpid/java/resources/README.txt Fri Sep 20 18:59:30 2013
@@ -1,40 +1,3 @@
+Documentation for the Qpid components can be accessed on our website at:
-Documentation
---------------
-All of our user documentation for the Qpid Java components can be accessed on our wiki at:
-
-http://cwiki.apache.org/confluence/display/qpid/Qpid+Java+Documentation
-
-This includes a Getting Started Guide and FAQ as well as detailed developer documentation.
-However, here's a VERY quick guide to running the installed Qpid broker, once you have installed it somewhere !
-
-
-Running the Broker
-------------------
-
-To run the broker, set the QPID_HOME environment variable to
-distribution directory and add $QPID_HOME/bin to your PATH. Then run
-the qpid-server shell script or qpid-server.bat batch file to start
-the broker. By default, the broker will use $QPID_HOME/etc to find
-the configuration files. You can supply a custom configuration using
-the -c argument.
-
-For example:
-
-qpid-server -c ~/etc/config.xml
-
-You can get a list of all command line arguments by using the -h argument.
-
-
-Developing
-----------
-
-In order to build Qpid you need Ant 1.6.5. Use ant -p to list the
-available targets. The default ant target, build, creates a working
-development-mode distribution in the build directory. To run the
-scripts in build/bin set QPID_HOME to the build directory and put
-${QPID_HOME}/bin on your PATH. The scripts in that directory include
-the standard ones in the distribution and a number of testing scripts.
-
-
-
+http://qpid.apache.org/documentation.html
Modified: qpid/branches/linearstore/qpid/java/systests/build.xml
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/systests/build.xml?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/systests/build.xml (original)
+++ qpid/branches/linearstore/qpid/java/systests/build.xml Fri Sep 20 18:59:30 2013
@@ -34,7 +34,7 @@ nn - or more contributor license agreeme
<!-- The jca module is unusual in that it produces a jar with the name ra rather than jca. Unfortunately this means we
need to add both jca (finds jca's jar dependencies) and ra (to find the qpid-ra jar file itself). -->
- <property name="module.depends" value="client management/common broker broker/tests common amqp-1-0-common common/tests jca ra broker-plugins/access-control broker-plugins/management-http broker-plugins/management-jmx ${systests.optional.depends}"/>
+ <property name="module.depends" value="client management/common broker broker/tests common amqp-1-0-common common/tests jca ra broker-plugins/access-control broker-plugins/management-http broker-plugins/management-jmx broker-plugins/memory-store broker-plugins/derby-store broker-plugins/amqp-0-8-protocol broker-plugins/amqp-0-10-protocol broker-plugins/amqp-1-0-protocol broker-plugins/amqp-msg-conv-0-8-to-0-10 broker-plugins/amqp-msg-conv-0-8-to-1-0 broker-plugins/amqp-msg-conv-0-10-to-1-0 ${systests.optional.depends}"/>
<property name="module.test.src" location="src/main/java"/>
<property name="module.test.excludes"
value="**/DropInTest.java,**/TestClientControlledTest.java"/>
Modified: qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java (original)
+++ qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/client/failover/FailoverBehaviourTest.java Fri Sep 20 18:59:30 2013
@@ -466,7 +466,7 @@ public class FailoverBehaviourTest exten
try
{
- // an implicit recover performed when acknowledge throws an exception due to failover
+ // an implicit recover performed when acknowledge throws an exception due to failover
lastMessage.acknowledge();
fail("JMSException should be thrown");
}
@@ -529,7 +529,7 @@ public class FailoverBehaviourTest exten
Message lastMessage = consumeMessages();
try
{
- // an implicit recover performed when acknowledge throws an exception due to failover
+ // an implicit recover performed when acknowledge throws an exception due to failover
lastMessage.acknowledge();
fail("JMSException should be thrown");
}
@@ -923,9 +923,9 @@ public class FailoverBehaviourTest exten
final Map<String, Object> arguments = new HashMap<String, Object>();
arguments.put("x-qpid-capacity", capacity);
arguments.put("x-qpid-flow-resume-capacity", resumeCapacity);
- ((AMQSession<?, ?>) session).createQueue(new AMQShortString(queueName), true, true, false, arguments);
+ ((AMQSession<?, ?>) session).createQueue(new AMQShortString(queueName), false, true, false, arguments);
Queue queue = session.createQueue("direct://amq.direct/" + queueName + "/" + queueName + "?durable='" + true
- + "'&autodelete='" + true + "'");
+ + "'&autodelete='" + false + "'");
((AMQSession<?, ?>) session).declareAndBind((AMQDestination) queue);
return queue;
}
Modified: qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java (original)
+++ qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/exchange/ReturnUnroutableMandatoryMessageTest.java Fri Sep 20 18:59:30 2013
@@ -30,6 +30,7 @@ import org.apache.qpid.client.AMQSession
import org.apache.qpid.client.AMQTopic;
import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.exchange.ExchangeDefaults;
+import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
import org.apache.qpid.url.AMQBindingURL;
Modified: qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java (original)
+++ qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java Fri Sep 20 18:59:30 2013
@@ -1000,7 +1000,7 @@ public class BrokerLoggingTest extends A
}
catch (IOException e)
{
- if (!e.getMessage().equals("Connection refused"))
+ if (!e.getMessage().startsWith("Connection refused"))
{
fail("Socket not closed on port:" + port + ":" + e.getMessage());
// Keep stack trace for diagnosis.
Modified: qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DurableQueueLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DurableQueueLoggingTest.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DurableQueueLoggingTest.java (original)
+++ qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DurableQueueLoggingTest.java Fri Sep 20 18:59:30 2013
@@ -97,7 +97,7 @@ public class DurableQueueLoggingTest ext
String clientID = _connection.getClientID();
assertNotNull("clientID should not be null", clientID);
-
+
validateQueueProperties(results, false, false, clientID);
}
@@ -256,7 +256,7 @@ public class DurableQueueLoggingTest ext
validateQueueProperties(results, true, true, null);
}
-
+
private List<String> waitForMesssage() throws IOException
{
// Validation
@@ -267,14 +267,14 @@ public class DurableQueueLoggingTest ext
// Only 1 Queue message should hav been logged
assertEquals("Result set size not as expected", 1, results.size());
-
+
return results;
}
public void validateQueueProperties(List<String> results, boolean hasPriority, boolean hasAutodelete, String clientID)
{
String log = getLogMessage(results, 0);
-
+
// Message Should be a QUE-1001
validateMessageID("QUE-1001", log);
@@ -290,7 +290,7 @@ public class DurableQueueLoggingTest ext
fromMessage(log).contains("Priority: " + PRIORITIES));
// Queue is AutoDelete
- assertEquals("Unexpected AutoDelete status:" + fromMessage(log), hasAutodelete,
+ assertEquals("Unexpected AutoDelete status:" + fromMessage(log), hasAutodelete,
fromMessage(log).contains("AutoDelete"));
if(clientID != null)
Modified: qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java (original)
+++ qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/queue/SortedQueueTest.java Fri Sep 20 18:59:30 2013
@@ -336,7 +336,7 @@ public class SortedQueueTest extends Qpi
private Queue createQueue() throws AMQException, JMSException
{
final Map<String, Object> arguments = new HashMap<String, Object>();
- arguments.put(AMQQueueFactory.QPID_QUEUE_SORT_KEY, TEST_SORT_KEY);
+ arguments.put(QueueArgumentsConverter.QPID_QUEUE_SORT_KEY, TEST_SORT_KEY);
((AMQSession<?,?>) _producerSession).createQueue(new AMQShortString(getTestQueueName()), false, true, false, arguments);
final Queue queue = new AMQQueue("amq.direct", getTestQueueName());
((AMQSession<?,?>) _producerSession).declareAndBind((AMQDestination) queue);
Modified: qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java
URL: http://svn.apache.org/viewvc/qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java?rev=1525101&r1=1525100&r2=1525101&view=diff
==============================================================================
--- qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java (original)
+++ qpid/branches/linearstore/qpid/java/systests/src/main/java/org/apache/qpid/server/store/QuotaMessageStore.java Fri Sep 20 18:59:30 2013
@@ -48,9 +48,7 @@ public class
}
@Override
- public void configureConfigStore(String name,
- ConfigurationRecoveryHandler recoveryHandler,
- VirtualHost virtualHost)
+ public void configureConfigStore(VirtualHost virtualHost, ConfigurationRecoveryHandler recoveryHandler)
throws Exception
{
Object overfullAttr = virtualHost.getAttribute(MessageStoreConstants.OVERFULL_SIZE_ATTRIBUTE);
@@ -77,7 +75,7 @@ public class
}
@Override
- public void configureMessageStore(String name, MessageStoreRecoveryHandler recoveryHandler,
+ public void configureMessageStore(VirtualHost virtualHost, MessageStoreRecoveryHandler recoveryHandler,
TransactionLogRecoveryHandler tlogRecoveryHandler) throws Exception
{
_stateManager.attainState(State.INITIALISED);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org