You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2016/09/30 11:37:04 UTC

[1/4] qpid-jms git commit: NO-JIRA: update version to 0.11.1-SNAPSHOT

Repository: qpid-jms
Updated Branches:
  refs/heads/0.11.x [created] 469bf4708


NO-JIRA: update version to 0.11.1-SNAPSHOT


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/a6953e1e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/a6953e1e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/a6953e1e

Branch: refs/heads/0.11.x
Commit: a6953e1e9ba67480bef48d3a089695b392ccf3f1
Parents: 006bc1a
Author: Robert Gemmell <ro...@apache.org>
Authored: Fri Sep 30 10:57:41 2016 +0100
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Sep 30 10:57:41 2016 +0100

----------------------------------------------------------------------
 apache-qpid-jms/pom.xml                                | 2 +-
 pom.xml                                                | 4 ++--
 qpid-jms-client/pom.xml                                | 2 +-
 qpid-jms-discovery/pom.xml                             | 2 +-
 qpid-jms-docs/pom.xml                                  | 2 +-
 qpid-jms-examples/pom.xml                              | 2 +-
 qpid-jms-interop-tests/pom.xml                         | 2 +-
 qpid-jms-interop-tests/qpid-jms-activemq-tests/pom.xml | 2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6953e1e/apache-qpid-jms/pom.xml
----------------------------------------------------------------------
diff --git a/apache-qpid-jms/pom.xml b/apache-qpid-jms/pom.xml
index d5f066e..f609650 100644
--- a/apache-qpid-jms/pom.xml
+++ b/apache-qpid-jms/pom.xml
@@ -18,7 +18,7 @@
   <parent>
     <groupId>org.apache.qpid</groupId>
     <artifactId>qpid-jms-parent</artifactId>
-    <version>0.11.0</version>
+    <version>0.11.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6953e1e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cdb44a9..59bc0e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
 
   <groupId>org.apache.qpid</groupId>
   <artifactId>qpid-jms-parent</artifactId>
-  <version>0.11.0</version>
+  <version>0.11.1-SNAPSHOT</version>
   <packaging>pom</packaging>
   <name>QpidJMS</name>
   <inceptionYear>2013</inceptionYear>
@@ -80,7 +80,7 @@
     <connection>scm:git:http://git-wip-us.apache.org/repos/asf/qpid-jms.git</connection>
     <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/qpid-jms.git</developerConnection>
     <url>https://git-wip-us.apache.org/repos/asf?p=qpid-jms.git</url>
-    <tag>0.11.0</tag>
+    <tag>0.11.x</tag>
   </scm>
 
   <modules>

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6953e1e/qpid-jms-client/pom.xml
----------------------------------------------------------------------
diff --git a/qpid-jms-client/pom.xml b/qpid-jms-client/pom.xml
index 0249a6c..b68e8e1 100644
--- a/qpid-jms-client/pom.xml
+++ b/qpid-jms-client/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.qpid</groupId>
     <artifactId>qpid-jms-parent</artifactId>
-    <version>0.11.0</version>
+    <version>0.11.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>qpid-jms-client</artifactId>

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6953e1e/qpid-jms-discovery/pom.xml
----------------------------------------------------------------------
diff --git a/qpid-jms-discovery/pom.xml b/qpid-jms-discovery/pom.xml
index d99476d..e381cf2 100644
--- a/qpid-jms-discovery/pom.xml
+++ b/qpid-jms-discovery/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.qpid</groupId>
     <artifactId>qpid-jms-parent</artifactId>
-    <version>0.11.0</version>
+    <version>0.11.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>qpid-jms-discovery</artifactId>

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6953e1e/qpid-jms-docs/pom.xml
----------------------------------------------------------------------
diff --git a/qpid-jms-docs/pom.xml b/qpid-jms-docs/pom.xml
index 0d6eb02..d1c82e9 100644
--- a/qpid-jms-docs/pom.xml
+++ b/qpid-jms-docs/pom.xml
@@ -18,7 +18,7 @@
   <parent>
     <groupId>org.apache.qpid</groupId>
     <artifactId>qpid-jms-parent</artifactId>
-    <version>0.11.0</version>
+    <version>0.11.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6953e1e/qpid-jms-examples/pom.xml
----------------------------------------------------------------------
diff --git a/qpid-jms-examples/pom.xml b/qpid-jms-examples/pom.xml
index aac68c3..be838c7 100644
--- a/qpid-jms-examples/pom.xml
+++ b/qpid-jms-examples/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.qpid</groupId>
     <artifactId>qpid-jms-parent</artifactId>
-    <version>0.11.0</version>
+    <version>0.11.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>qpid-jms-examples</artifactId>

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6953e1e/qpid-jms-interop-tests/pom.xml
----------------------------------------------------------------------
diff --git a/qpid-jms-interop-tests/pom.xml b/qpid-jms-interop-tests/pom.xml
index 4c4855c..00fc130 100644
--- a/qpid-jms-interop-tests/pom.xml
+++ b/qpid-jms-interop-tests/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.qpid</groupId>
     <artifactId>qpid-jms-parent</artifactId>
-    <version>0.11.0</version>
+    <version>0.11.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>qpid-jms-interop-tests</artifactId>

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/a6953e1e/qpid-jms-interop-tests/qpid-jms-activemq-tests/pom.xml
----------------------------------------------------------------------
diff --git a/qpid-jms-interop-tests/qpid-jms-activemq-tests/pom.xml b/qpid-jms-interop-tests/qpid-jms-activemq-tests/pom.xml
index 827e3da..ed66ebe 100644
--- a/qpid-jms-interop-tests/qpid-jms-activemq-tests/pom.xml
+++ b/qpid-jms-interop-tests/qpid-jms-activemq-tests/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.qpid</groupId>
     <artifactId>qpid-jms-interop-tests</artifactId>
-    <version>0.11.0</version>
+    <version>0.11.1-SNAPSHOT</version>
   </parent>
 
   <artifactId>qpid-jms-activemq-tests</artifactId>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[4/4] qpid-jms git commit: QPIDJMS-210 Add documentation for the WebSocket transport (cherry picked from commit f19b01cb45ac1c01a5c34ffa7e7ec0a137700b5a)

Posted by ro...@apache.org.
QPIDJMS-210 Add documentation for the WebSocket transport
(cherry picked from commit f19b01cb45ac1c01a5c34ffa7e7ec0a137700b5a)


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/469bf470
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/469bf470
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/469bf470

Branch: refs/heads/0.11.x
Commit: 469bf4708209c17092340759be08891b98cfc7f5
Parents: c730c53
Author: Timothy Bish <ta...@gmail.com>
Authored: Tue Sep 27 12:58:13 2016 -0400
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Sep 30 12:26:23 2016 +0100

----------------------------------------------------------------------
 qpid-jms-docs/Configuration.md | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/469bf470/qpid-jms-docs/Configuration.md
----------------------------------------------------------------------
diff --git a/qpid-jms-docs/Configuration.md b/qpid-jms-docs/Configuration.md
index d9c05bf..40f9fb7 100644
--- a/qpid-jms-docs/Configuration.md
+++ b/qpid-jms-docs/Configuration.md
@@ -67,7 +67,11 @@ The basic format of the clients Connection URI is as follows:
 
       amqp[s]://hostname:port[?option=value[&option2=value...]]
 
-Where the *amqps* scheme is specified to use SSL/TLS, the hostname segment from the URI can be used by the JVM for the
+or for WebSocket connections
+
+     amqpws[s]://hostname:port[/path][?option=value[&option2=value...]]
+
+Where the *amqps* and *amqpwss* scheme is specified to use SSL/TLS, the hostname segment from the URI can be used by the JVM for the
 TLS SNI (Server Name Indication) extension in order to communicate the desired server hostname during a TLS handshake.
 The SNI extension will be automatically included if a Fully Qualified name (e.g myhost.mydomain) is specified, but not
 when an unqualified name (e.g myhost) or bare IP address are used.
@@ -173,6 +177,15 @@ The complete set of SSL Transport options is listed below:
 + **transport.verifyHost** Whether to verify that the hostname being connected to matches with the provided server certificate. Defaults to true.
 + **transport.keyAlias** The alias to use when selecting a keypair from the keystore if required to send a client certificate to the server. No default.
 
+### Websocket Transport Configuration options
+
+The WebSocket (WS) Transport extends the TCP and SSL Transports to provide both unsecured and secured Websocket connectivity and is enabled using the *amqpws* amd *amqpwss* URI schemes.  The unsecured WS Transport extends the basic TCP transport which means all the normal TCP Transport configuration options also apply to the WS Transport, similarly the WSS Transport extends the SSL Transport which means both the TCP and SSL Transport options are available for configuration.
+
+A simple SSL/TLS based client URI is shown below:
+
+    amqpws[s]://myhost.mydomain:5671/[optional-path]
+
+
 ### AMQP Configuration options
 
 These options apply to the behaviour of certain AMQP functionality.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[3/4] qpid-jms git commit: QPIDJMS-211: make the JNDI connection factory property handling a little more flexible

Posted by ro...@apache.org.
QPIDJMS-211: make the JNDI connection factory property handling a little more flexible

(cherry picked from commit 5f46af2c1a2c48c0c9c8fcc8a1733a991e542ac8)


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/c730c531
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/c730c531
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/c730c531

Branch: refs/heads/0.11.x
Commit: c730c5319247a2c2f88f8e67976de6a92412d7dc
Parents: 5d93bff
Author: Robert Gemmell <ro...@apache.org>
Authored: Wed Sep 28 17:49:17 2016 +0100
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Sep 30 12:25:14 2016 +0100

----------------------------------------------------------------------
 .../qpid/jms/jndi/JmsInitialContextFactory.java | 75 +++++++++-----------
 .../jms/jndi/JmsInitialContextFactoryTest.java  | 48 +++++++++++--
 2 files changed, 78 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/c730c531/qpid-jms-client/src/main/java/org/apache/qpid/jms/jndi/JmsInitialContextFactory.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/jndi/JmsInitialContextFactory.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/jndi/JmsInitialContextFactory.java
index 61482de..f70017c 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/jndi/JmsInitialContextFactory.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/jndi/JmsInitialContextFactory.java
@@ -22,13 +22,10 @@ import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URISyntaxException;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
@@ -44,15 +41,6 @@ import org.apache.qpid.jms.JmsConnectionFactory;
 import org.apache.qpid.jms.JmsQueue;
 import org.apache.qpid.jms.JmsTopic;
 
-/**
- * A factory of the StompJms InitialContext which contains
- * {@link javax.jms.ConnectionFactory} instances as well as a child context
- * called <i>destinations</i> which contain all of the current active
- * destinations, in child context depending on the QoS such as transient or
- * durable and queue or topic.
- *
- * @since 1.0
- */
 public class JmsInitialContextFactory implements InitialContextFactory {
 
     static final String[] DEFAULT_CONNECTION_FACTORY_NAMES = {
@@ -63,6 +51,8 @@ public class JmsInitialContextFactory implements InitialContextFactory {
     static final String TOPIC_KEY_PREFIX = "topic.";
     static final String CONNECTION_FACTORY_DEFAULT_KEY_PREFIX = "default." + CONNECTION_FACTORY_KEY_PREFIX;
     static final String CONNECTION_FACTORY_PROPERTY_KEY_PREFIX = "property." + CONNECTION_FACTORY_KEY_PREFIX;
+    static final String DYNAMIC_QUEUES = "dynamicQueues";
+    static final String DYNAMIC_TOPICS = "dynamicTopics";
 
     @SuppressWarnings("unchecked")
     @Override
@@ -117,7 +107,7 @@ public class JmsInitialContextFactory implements InitialContextFactory {
 
         // Add sub-contexts for dynamic creation on lookup.
         // "dynamicQueues/<queue-name>"
-        bindings.put("dynamicQueues", new LazyCreateContext() {
+        bindings.put(DYNAMIC_QUEUES, new LazyCreateContext() {
             private static final long serialVersionUID = 6503881346214855588L;
 
             @Override
@@ -127,7 +117,7 @@ public class JmsInitialContextFactory implements InitialContextFactory {
         });
 
         // "dynamicTopics/<topic-name>"
-        bindings.put("dynamicTopics", new LazyCreateContext() {
+        bindings.put(DYNAMIC_TOPICS, new LazyCreateContext() {
             private static final long serialVersionUID = 2019166796234979615L;
 
             @Override
@@ -140,13 +130,15 @@ public class JmsInitialContextFactory implements InitialContextFactory {
     }
 
     private void createConnectionFactories(Hashtable<Object, Object> environment, Map<String, Object> bindings) throws NamingException {
-        List<String> names = getConnectionFactoryNames(environment);
+        Map<String, String> factories = getConnectionFactoryNamesAndURIs(environment);
         Map<String, String> defaults = getConnectionFactoryDefaults(environment);
-        for (String name : names) {
-            JmsConnectionFactory factory = null;
+        for (Entry<String, String> entry : factories.entrySet()) {
+            String name = entry.getKey();
+            String uri = entry.getValue();
 
+            JmsConnectionFactory factory = null;
             try {
-                factory = createConnectionFactory(name, defaults, environment);
+                factory = createConnectionFactory(name, uri, defaults, environment);
             } catch (Exception e) {
                 NamingException ne = new NamingException("Exception while creating ConnectionFactory '" + name + "'.");
                 ne.initCause(e);
@@ -164,20 +156,15 @@ public class JmsInitialContextFactory implements InitialContextFactory {
         return new ReadOnlyContext(environment, bindings);
     }
 
-    protected JmsConnectionFactory createConnectionFactory(String name, Map<String, String> defaults, Hashtable<Object, Object> environment) throws URISyntaxException {
-        String cfNameKey = CONNECTION_FACTORY_KEY_PREFIX + name;
+    protected JmsConnectionFactory createConnectionFactory(String name, String uri, Map<String, String> defaults, Hashtable<Object, Object> environment) throws URISyntaxException {
         Map<String, String> props = new LinkedHashMap<String, String>();
 
         // Add the defaults which apply to all connection factories
         props.putAll(defaults);
 
         // Add any URI entry for this specific factory name
-        Object o = environment.get(cfNameKey);
-        if (o != null) {
-            String value = String.valueOf(o);
-            if (value.trim().length() != 0) {
-                props.put(JmsConnectionFactory.REMOTE_URI_PROP, value);
-            }
+        if (uri != null && !uri.trim().isEmpty()) {
+            props.put(JmsConnectionFactory.REMOTE_URI_PROP, uri);
         }
 
         // Add any factory-specific additional properties
@@ -186,23 +173,29 @@ public class JmsInitialContextFactory implements InitialContextFactory {
         return createConnectionFactory(props);
     }
 
-    protected List<String> getConnectionFactoryNames(Map<Object, Object> environment) {
-        List<String> list = new ArrayList<String>();
+    protected Map<String, String> getConnectionFactoryNamesAndURIs(Map<Object, Object> environment) {
+        Map<String, String> factories = new LinkedHashMap<String, String>();
         for (Iterator<Entry<Object, Object>> iter = environment.entrySet().iterator(); iter.hasNext();) {
             Map.Entry<Object, Object> entry = iter.next();
             String key = String.valueOf(entry.getKey());
-            if (key.startsWith(CONNECTION_FACTORY_KEY_PREFIX)) {
-                String jndiName = key.substring(CONNECTION_FACTORY_KEY_PREFIX.length());
-                list.add(jndiName);
+            if (key.toLowerCase().startsWith(CONNECTION_FACTORY_KEY_PREFIX)) {
+                String factoryName = key.substring(CONNECTION_FACTORY_KEY_PREFIX.length());
+                String value = null;
+                if(entry.getValue() != null) {
+                    value = String.valueOf(entry.getValue());
+                }
+
+                factories.put(factoryName, value);
             }
         }
 
-        if(list.isEmpty())
-        {
-            list.addAll(Arrays.asList(DEFAULT_CONNECTION_FACTORY_NAMES));
+        if (factories.isEmpty()) {
+            for (int i = 0; i < DEFAULT_CONNECTION_FACTORY_NAMES.length; i++) {
+                factories.put(DEFAULT_CONNECTION_FACTORY_NAMES[i], null);
+            }
         }
 
-        return list;
+        return factories;
     }
 
     protected Map<String, String> getConnectionFactoryDefaults(Map<Object, Object> environment) {
@@ -212,7 +205,7 @@ public class JmsInitialContextFactory implements InitialContextFactory {
         for (Iterator<Entry<Object, Object>> iter = environment.entrySet().iterator(); iter.hasNext();) {
             Map.Entry<Object, Object> entry = iter.next();
             String key = String.valueOf(entry.getKey());
-            if (key.startsWith(CONNECTION_FACTORY_DEFAULT_KEY_PREFIX)) {
+            if (key.toLowerCase().startsWith(CONNECTION_FACTORY_DEFAULT_KEY_PREFIX)) {
                 String jndiName = key.substring(CONNECTION_FACTORY_DEFAULT_KEY_PREFIX.length());
                 map.put(jndiName, String.valueOf(entry.getValue()));
             }
@@ -224,14 +217,16 @@ public class JmsInitialContextFactory implements InitialContextFactory {
     protected Map<String, String> getConnectionFactoryProperties(String factoryName, Map<Object, Object> environment) {
         Map<String, String> map = new LinkedHashMap<String, String>();
 
-        String factoryPropertiesPrefix = CONNECTION_FACTORY_PROPERTY_KEY_PREFIX + factoryName + ".";
+        final String factoryNameSuffix = factoryName + ".";
 
         for (Iterator<Entry<Object, Object>> iter = environment.entrySet().iterator(); iter.hasNext();) {
             Map.Entry<Object, Object> entry = iter.next();
             String key = String.valueOf(entry.getKey());
-            if (key.startsWith(factoryPropertiesPrefix)) {
-                String propertyName = key.substring(factoryPropertiesPrefix.length());
-                map.put(propertyName, String.valueOf(entry.getValue()));
+            if (key.toLowerCase().startsWith(CONNECTION_FACTORY_PROPERTY_KEY_PREFIX)) {
+                if(key.substring(CONNECTION_FACTORY_PROPERTY_KEY_PREFIX.length()).startsWith(factoryNameSuffix)) {
+                    String propertyName = key.substring(CONNECTION_FACTORY_PROPERTY_KEY_PREFIX.length() + factoryNameSuffix.length());
+                    map.put(propertyName, String.valueOf(entry.getValue()));
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/c730c531/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JmsInitialContextFactoryTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JmsInitialContextFactoryTest.java b/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JmsInitialContextFactoryTest.java
index c1a0652..9400ad5 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JmsInitialContextFactoryTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/jndi/JmsInitialContextFactoryTest.java
@@ -87,10 +87,16 @@ public class JmsInitialContextFactoryTest extends QpidJmsTestCase {
 
     @Test
     public void testDefaultConnectionFactorySeesFactorySpecificProperty() throws Exception {
-        String updatedClientID = _testName.getMethodName();
-
         String factoryName = JmsInitialContextFactory.DEFAULT_CONNECTION_FACTORY_NAMES[0];
-        String propertyPrefix = JmsInitialContextFactory.CONNECTION_FACTORY_PROPERTY_KEY_PREFIX;
+
+        // lower case prefix
+        doDefaultConnectionFactorySeesFactorySpecificPropertyTestImpl("property.connectionfactory.", factoryName);
+        // camelCase prefix
+        doDefaultConnectionFactorySeesFactorySpecificPropertyTestImpl("property.connectionFactory.", factoryName);
+    }
+
+    private void doDefaultConnectionFactorySeesFactorySpecificPropertyTestImpl(String propertyPrefix, String factoryName) throws Exception {
+        String updatedClientID = _testName.getMethodName();
 
         Hashtable<Object, Object> env = new Hashtable<Object, Object>();
         env.put(propertyPrefix + factoryName + "." + "clientID", updatedClientID);
@@ -100,7 +106,7 @@ public class JmsInitialContextFactoryTest extends QpidJmsTestCase {
 
         assertNotNull("No object returned", o);
         assertEquals("Unexpected class type for returned object", JmsConnectionFactory.class, o.getClass());
-        assertEquals("Unexpected URI for returned factory", updatedClientID, ((JmsConnectionFactory) o).getClientID());
+        assertEquals("Unexpected ClientID for returned factory", updatedClientID, ((JmsConnectionFactory) o).getClientID());
     }
 
     @Test
@@ -119,13 +125,45 @@ public class JmsInitialContextFactoryTest extends QpidJmsTestCase {
         }
     }
 
+
+    @Test
+    public void testDefaultConnectionFactoriesSeeDefaultPropertyUpdate() throws Exception {
+        String factoryName = JmsInitialContextFactory.DEFAULT_CONNECTION_FACTORY_NAMES[0];
+
+        // lower case prefix
+        doDefaultConnectionFactorySeesDefaultPropertyUpdatePropertyTestImpl("default.connectionfactory.", factoryName);
+        // camelCase prefix
+        doDefaultConnectionFactorySeesDefaultPropertyUpdatePropertyTestImpl("default.connectionFactory.", factoryName);
+    }
+
+    private void doDefaultConnectionFactorySeesDefaultPropertyUpdatePropertyTestImpl(String propertyPrefix, String factoryName) throws Exception {
+        String updatedClientID = _testName.getMethodName();
+
+        Hashtable<Object, Object> env = new Hashtable<Object, Object>();
+        env.put(propertyPrefix + "clientID", updatedClientID);
+        Context ctx = createInitialContext(env);
+
+        Object o = ctx.lookup(factoryName);
+
+        assertNotNull("No object returned", o);
+        assertEquals("Unexpected class type for returned object", JmsConnectionFactory.class, o.getClass());
+        assertEquals("Unexpected ClientID for returned factory", updatedClientID, ((JmsConnectionFactory) o).getClientID());
+    }
+
     @Test
     public void testConnectionFactoryBinding() throws Exception {
         String factoryName = "myNewFactory";
+        // lower case prefix
+        doConnectionFactoryBindingTestImpl("connectionfactory." + factoryName, factoryName);
+        // camelCase prefix
+        doConnectionFactoryBindingTestImpl("connectionFactory." + factoryName, factoryName);
+    }
+
+    private void doConnectionFactoryBindingTestImpl(String environmentProperty, String factoryName) throws NamingException {
         String uri = "amqp://example.com:1234";
 
         Hashtable<Object, Object> env = new Hashtable<Object, Object>();
-        env.put(JmsInitialContextFactory.CONNECTION_FACTORY_KEY_PREFIX + factoryName, uri);
+        env.put(environmentProperty, uri);
         Context ctx = createInitialContext(env);
 
         Object o = ctx.lookup(factoryName);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[2/4] qpid-jms git commit: QPIDJMS-164: Provide OSGi metadata for qpid-jms-client

Posted by ro...@apache.org.
QPIDJMS-164: Provide OSGi metadata for qpid-jms-client

This change adds the maven-bundle-plugin to the parent project and
activates it in the qpid-jms-client project, generating OSGi meta data
for the project.

The Bundle-SymbolicName is overridden to "org.apache.qpid.jms.client".

The DynamicPackage-Import header is set to "*" since the JMS client can
actually create instances from all kind of classes.

Signed-off-by: Jens Reimann <jr...@redhat.com>
(cherry picked from commit 17c972800170163b1cfd42a364daf0a26da63e91)


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/5d93bffd
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/5d93bffd
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/5d93bffd

Branch: refs/heads/0.11.x
Commit: 5d93bffdf929bf4fe61a9de8ca98494d08ac945b
Parents: a6953e1
Author: Jens Reimann <jr...@redhat.com>
Authored: Mon Sep 19 17:30:28 2016 +0200
Committer: Robert Gemmell <ro...@apache.org>
Committed: Fri Sep 30 11:04:36 2016 +0100

----------------------------------------------------------------------
 pom.xml                 |  7 +++++++
 qpid-jms-client/pom.xml | 17 ++++++++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/5d93bffd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 59bc0e8..a18aad4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,6 +59,7 @@
     <maven-javacc-plugin-version>2.6</maven-javacc-plugin-version>
     <maven-eclipse-plugin-version>2.10</maven-eclipse-plugin-version>
     <maven-idea-plugin-version>2.5</maven-idea-plugin-version>
+    <maven-bundle-plugin-version>3.2.0</maven-bundle-plugin-version>
     <findbugs-maven-plugin-version>3.0.2</findbugs-maven-plugin-version>
     <jacoco-plugin-version>0.7.5.201505241946</jacoco-plugin-version>
 
@@ -214,6 +215,12 @@
           </configuration>
         </plugin>
         <plugin>
+          <groupId>org.apache.felix</groupId>
+          <artifactId>maven-bundle-plugin</artifactId>
+          <version>${maven-bundle-plugin-version}</version>
+          <extensions>true</extensions>
+        </plugin>
+        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-release-plugin</artifactId>
           <configuration>

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/5d93bffd/qpid-jms-client/pom.xml
----------------------------------------------------------------------
diff --git a/qpid-jms-client/pom.xml b/qpid-jms-client/pom.xml
index b68e8e1..ac61452 100644
--- a/qpid-jms-client/pom.xml
+++ b/qpid-jms-client/pom.xml
@@ -24,7 +24,7 @@
   </parent>
 
   <artifactId>qpid-jms-client</artifactId>
-  <packaging>jar</packaging>
+  <packaging>bundle</packaging>
   <name>QpidJMS Client</name>
   <description>The core JMS Client implementation</description>
 
@@ -108,6 +108,21 @@
     </resources>
     <plugins>
       <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <configuration>
+          <instructions>
+            <Bundle-SymbolicName>org.apache.qpid.jms.client</Bundle-SymbolicName>
+            <Export-Package>org.apache.qpid.jms.*</Export-Package>
+            <Import-Package>
+            io.netty.*;version="[4.0.0,4.1.0)",
+            org.apache.qpid.proton.*;version="[0.14.0,0.15.0)",
+            *</Import-Package>
+            <Dynamic-ImportPackage>*</Dynamic-ImportPackage>
+          </instructions>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.jacoco</groupId>
         <artifactId>jacoco-maven-plugin</artifactId>
         <configuration>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org