You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2015/08/27 12:10:33 UTC

[1/2] activemq git commit: https://issues.apache.org/jira/browse/AMQ-5943 - rename resources so that they don't match the surefire *Test* filter which will try to execute them as tests

Repository: activemq
Updated Branches:
  refs/heads/master 950dc9267 -> 1ea289736


https://issues.apache.org/jira/browse/AMQ-5943 - rename resources so that they don't match the surefire *Test* filter which will try to execute them as tests


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/1ea28973
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/1ea28973
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/1ea28973

Branch: refs/heads/master
Commit: 1ea289736b998f76668f66985c6e03770b5db3a3
Parents: 547476d
Author: gtully <ga...@gmail.com>
Authored: Thu Aug 27 11:09:20 2015 +0100
Committer: gtully <ga...@gmail.com>
Committed: Thu Aug 27 11:10:08 2015 +0100

----------------------------------------------------------------------
 ...JaasDualAuthenticationNetworkBridgeTest.java |   4 +-
 ...asDualAuthenticationNetworkBridge.properties |  28 +++
 ...alAuthenticationNetworkBridgeTest.properties |  28 ---
 ...n-JaasDualAuthenticationNetworkBridge.config |  32 ++++
 ...asDualAuthenticationNetworkBridgeTest.config |  32 ----
 .../JaasDualAuthenticationNetworkBridge.xml     | 178 +++++++++++++++++++
 .../JaasDualAuthenticationNetworkBridgeTest.xml | 178 -------------------
 ...asDualAuthenticationNetworkBridge.properties |  31 ++++
 ...alAuthenticationNetworkBridgeTest.properties |  31 ----
 ...asDualAuthenticationNetworkBridge.properties |  21 +++
 ...alAuthenticationNetworkBridgeTest.properties |  21 ---
 11 files changed, 292 insertions(+), 292 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/java/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.java
index 30b260f..e6dd562 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.java
@@ -50,7 +50,7 @@ import org.slf4j.LoggerFactory;
  * - ssl-domain-JaasDualAuthenticationNetworkBridgeTest.properties
  */
 public class JaasDualAuthenticationNetworkBridgeTest {
-    protected final static String CONFIG_FILE="org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.xml";
+    protected final static String CONFIG_FILE="org/apache/activemq/security/JaasDualAuthenticationNetworkBridge.xml";
     protected static Logger LOG = LoggerFactory.getLogger(JaasDualAuthenticationNetworkBridgeTest.class);
     private BrokerService broker1 = null;
     private BrokerService broker2 = null;
@@ -62,7 +62,7 @@ public class JaasDualAuthenticationNetworkBridgeTest {
     public void setUp() throws Exception {
         LOG.info("Starting up");
         String path = null;
-        URL resource = JaasDualAuthenticationNetworkBridgeTest.class.getClassLoader().getResource("login-JaasDualAuthenticationNetworkBridgeTest.config");
+        URL resource = JaasDualAuthenticationNetworkBridgeTest.class.getClassLoader().getResource("login-JaasDualAuthenticationNetworkBridge.config");
         if (resource != null) {
             path = resource.getFile();
             System.setProperty("java.security.auth.login.config", path);

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/groups-JaasDualAuthenticationNetworkBridge.properties
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/groups-JaasDualAuthenticationNetworkBridge.properties b/activemq-unit-tests/src/test/resources/groups-JaasDualAuthenticationNetworkBridge.properties
new file mode 100644
index 0000000..327d09a
--- /dev/null
+++ b/activemq-unit-tests/src/test/resources/groups-JaasDualAuthenticationNetworkBridge.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+#
+# This file contains the roles for users who can log into JBoss A-MQ.
+# Each line has to be of the format:
+#
+# GROUP=USER1,USER2,....
+#
+
+# Used by test org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
+
+admins=admin,adminSSL
+administrators=admin,adminSSL

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/groups-JaasDualAuthenticationNetworkBridgeTest.properties
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/groups-JaasDualAuthenticationNetworkBridgeTest.properties b/activemq-unit-tests/src/test/resources/groups-JaasDualAuthenticationNetworkBridgeTest.properties
deleted file mode 100644
index 327d09a..0000000
--- a/activemq-unit-tests/src/test/resources/groups-JaasDualAuthenticationNetworkBridgeTest.properties
+++ /dev/null
@@ -1,28 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-#
-# This file contains the roles for users who can log into JBoss A-MQ.
-# Each line has to be of the format:
-#
-# GROUP=USER1,USER2,....
-#
-
-# Used by test org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
-
-admins=admin,adminSSL
-administrators=admin,adminSSL

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/login-JaasDualAuthenticationNetworkBridge.config
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/login-JaasDualAuthenticationNetworkBridge.config b/activemq-unit-tests/src/test/resources/login-JaasDualAuthenticationNetworkBridge.config
new file mode 100644
index 0000000..9c81b11
--- /dev/null
+++ b/activemq-unit-tests/src/test/resources/login-JaasDualAuthenticationNetworkBridge.config
@@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *  Used by test org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
+ */
+activemq-domain {
+
+    org.apache.activemq.jaas.PropertiesLoginModule requisite
+        debug=true
+        org.apache.activemq.jaas.properties.user="users-JaasDualAuthenticationNetworkBridge.properties"
+        org.apache.activemq.jaas.properties.group="groups-JaasDualAuthenticationNetworkBridge.properties";
+};
+
+activemq-ssl-domain {
+    org.apache.activemq.jaas.TextFileCertificateLoginModule required
+        debug=true
+        org.apache.activemq.jaas.textfiledn.user="ssl-domain-JaasDualAuthenticationNetworkBridge.properties"
+        org.apache.activemq.jaas.textfiledn.group="groups-JaasDualAuthenticationNetworkBridge.properties";
+};

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/login-JaasDualAuthenticationNetworkBridgeTest.config
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/login-JaasDualAuthenticationNetworkBridgeTest.config b/activemq-unit-tests/src/test/resources/login-JaasDualAuthenticationNetworkBridgeTest.config
deleted file mode 100644
index e45af41..0000000
--- a/activemq-unit-tests/src/test/resources/login-JaasDualAuthenticationNetworkBridgeTest.config
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- *  Used by test org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
- */
-activemq-domain {
-
-    org.apache.activemq.jaas.PropertiesLoginModule requisite
-        debug=true
-        org.apache.activemq.jaas.properties.user="users-JaasDualAuthenticationNetworkBridgeTest.properties"
-        org.apache.activemq.jaas.properties.group="groups-JaasDualAuthenticationNetworkBridgeTest.properties";
-};
-
-activemq-ssl-domain {
-    org.apache.activemq.jaas.TextFileCertificateLoginModule required
-        debug=true
-        org.apache.activemq.jaas.textfiledn.user="ssl-domain-JaasDualAuthenticationNetworkBridgeTest.properties"
-        org.apache.activemq.jaas.textfiledn.group="groups-JaasDualAuthenticationNetworkBridgeTest.properties";
-};

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/org/apache/activemq/security/JaasDualAuthenticationNetworkBridge.xml
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/JaasDualAuthenticationNetworkBridge.xml b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/JaasDualAuthenticationNetworkBridge.xml
new file mode 100644
index 0000000..7b81018
--- /dev/null
+++ b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/JaasDualAuthenticationNetworkBridge.xml
@@ -0,0 +1,178 @@
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+ 
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<beans
+  xmlns="http://www.springframework.org/schema/beans"
+  xmlns:amq="http://activemq.apache.org/schema/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans 
+    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+  http://activemq.apache.org/schema/core 
+    http://activemq.apache.org/schema/core/activemq-core-5.4.2.xsd">
+
+  <!-- first broker instance -->
+  <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker1" id="broker1"
+   dataDirectory="./target/activemq-data-broker1" persistent="false">
+  
+    <destinationPolicy>
+     <policyMap>
+       <policyEntries>
+         <policyEntry queue=">" memoryLimit="20mb">
+           <deadLetterStrategy>
+             <sharedDeadLetterStrategy processExpired="false" processNonPersistent="false"/>
+           </deadLetterStrategy>
+         </policyEntry>
+
+         <policyEntry topic=">" producerFlowControl="true" >
+         </policyEntry>
+       </policyEntries>
+     </policyMap>
+    </destinationPolicy>
+
+    <managementContext>
+      <managementContext createConnector="false" />
+    </managementContext>
+
+    <!-- network of brokers configuration -->
+    <networkConnectors>
+      <networkConnector decreaseNetworkConsumerPriority="true" duplex="true" dynamicOnly="true" name="to-A" networkTTL="2" uri="static://(ssl://localhost:61626)" >
+        <!-- userName="admin" password="admin" -->
+        <excludedDestinations>
+          <queue physicalName="MyQueue"/>
+        </excludedDestinations>
+      </networkConnector>
+    </networkConnectors>
+
+
+      <plugins>
+        <!--jaasAuthenticationPlugin configuration="activemq" /-->
+        <jaasDualAuthenticationPlugin configuration="activemq-domain" sslConfiguration="activemq-ssl-domain"/>
+        <authorizationPlugin>
+          <map>
+        <authorizationMap>
+          <authorizationEntries>
+            <authorizationEntry queue="&gt;" admin="administrators" read="administrators" write="administrators"/>
+            <authorizationEntry topic="&gt;" admin="administrators" read="administrators" write="administrators"/>
+            <authorizationEntry topic="ActiveMQ.Advisory.&gt;" admin="*" read="*" write="*"/>
+            <authorizationEntry queue="ActiveMQ.DLQ" admin="administrators" read="*" write="*"/>
+          </authorizationEntries>
+        </authorizationMap>
+          </map>
+        </authorizationPlugin>
+      </plugins>
+
+
+    <sslContext>
+      <sslContext
+          keyStore="server.keystore"
+          keyStorePassword="password"
+          trustStore="server.keystore"
+          trustStorePassword="password"
+          />
+    </sslContext>
+
+    <systemUsage>
+      <systemUsage>
+        <memoryUsage>
+          <memoryUsage limit="60 mb" />
+        </memoryUsage>
+        <storeUsage>
+          <storeUsage limit="1 mb" />
+        </storeUsage>
+        <tempUsage>
+          <tempUsage limit="50 mb" />
+        </tempUsage>
+      </systemUsage>
+    </systemUsage>
+
+    <transportConnectors>
+        <transportConnector name="openwire+ssl" uri="ssl://0.0.0.0:62626?transport.closeAsync=false&amp;transport.enabledProtocols=TLSv1,TLSv1.1,TLSv1.2&amp;transport.needClientAuth=true"/>
+    </transportConnectors>
+  </broker>
+
+  <!-- second broker instance -->
+  <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker2" id="broker2"
+   dataDirectory="./target/activemq-data-broker2" persistent="false">
+
+    <destinationPolicy>
+     <policyMap>
+       <policyEntries>
+         <policyEntry queue=">" memoryLimit="20mb">
+           <deadLetterStrategy>
+             <sharedDeadLetterStrategy processExpired="false" processNonPersistent="false"/>
+           </deadLetterStrategy>
+         </policyEntry>
+
+         <policyEntry topic=">" producerFlowControl="true" >
+           <deadLetterStrategy>
+             <sharedDeadLetterStrategy processExpired="false" processNonPersistent="false"/>
+           </deadLetterStrategy>
+         </policyEntry>
+       </policyEntries>
+     </policyMap>
+    </destinationPolicy>
+
+    <managementContext>
+      <managementContext createConnector="false" />
+    </managementContext>
+
+    <plugins>
+      <!--jaasAuthenticationPlugin configuration="activemq" /-->
+      <!--jaasCertificateAuthenticationPlugin configuration="activemq-ssl-domain" /-->
+      <jaasDualAuthenticationPlugin configuration="activemq-domain" sslConfiguration="activemq-ssl-domain"/>
+      <authorizationPlugin>
+        <map>
+          <authorizationMap>
+            <authorizationEntries> 
+              <authorizationEntry queue="&gt;" admin="administrators" read="administrators" write="administrators"/>
+              <authorizationEntry topic="&gt;" admin="administrators" read="administrators" write="administrators"/>
+              <authorizationEntry topic="ActiveMQ.Advisory.&gt;" admin="*" read="*" write="*"/>
+              <authorizationEntry queue="ActiveMQ.DLQ" admin="administrators" read="*" write="*"/>
+            </authorizationEntries>
+          </authorizationMap>
+        </map>
+      </authorizationPlugin>
+    </plugins>
+
+    <sslContext>
+      <sslContext
+          keyStore="server.keystore"
+          keyStorePassword="password"
+          trustStore="server.keystore"
+          trustStorePassword="password"
+          />
+    </sslContext>
+
+    <systemUsage>
+      <systemUsage>
+        <memoryUsage>
+          <memoryUsage limit="60 mb" />
+        </memoryUsage>
+        <storeUsage>
+          <storeUsage limit="1 mb" />
+        </storeUsage>
+        <tempUsage>
+          <tempUsage limit="50 mb" />
+        </tempUsage>
+      </systemUsage>
+    </systemUsage>
+
+    <transportConnectors>
+        <transportConnector name="openwire+ssl-2" uri="ssl://0.0.0.0:61626?transport.closeAsync=false&amp;transport.enabledProtocols=TLSv1,TLSv1.1,TLSv1.2&amp;transport.needClientAuth=true"/>
+    </transportConnectors>
+  </broker>
+</beans>
+

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.xml
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.xml b/activemq-unit-tests/src/test/resources/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.xml
deleted file mode 100644
index 7b81018..0000000
--- a/activemq-unit-tests/src/test/resources/org/apache/activemq/security/JaasDualAuthenticationNetworkBridgeTest.xml
+++ /dev/null
@@ -1,178 +0,0 @@
-<!--
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
- 
-    http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
--->
-<beans
-  xmlns="http://www.springframework.org/schema/beans"
-  xmlns:amq="http://activemq.apache.org/schema/core"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans 
-    http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
-  http://activemq.apache.org/schema/core 
-    http://activemq.apache.org/schema/core/activemq-core-5.4.2.xsd">
-
-  <!-- first broker instance -->
-  <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker1" id="broker1"
-   dataDirectory="./target/activemq-data-broker1" persistent="false">
-  
-    <destinationPolicy>
-     <policyMap>
-       <policyEntries>
-         <policyEntry queue=">" memoryLimit="20mb">
-           <deadLetterStrategy>
-             <sharedDeadLetterStrategy processExpired="false" processNonPersistent="false"/>
-           </deadLetterStrategy>
-         </policyEntry>
-
-         <policyEntry topic=">" producerFlowControl="true" >
-         </policyEntry>
-       </policyEntries>
-     </policyMap>
-    </destinationPolicy>
-
-    <managementContext>
-      <managementContext createConnector="false" />
-    </managementContext>
-
-    <!-- network of brokers configuration -->
-    <networkConnectors>
-      <networkConnector decreaseNetworkConsumerPriority="true" duplex="true" dynamicOnly="true" name="to-A" networkTTL="2" uri="static://(ssl://localhost:61626)" >
-        <!-- userName="admin" password="admin" -->
-        <excludedDestinations>
-          <queue physicalName="MyQueue"/>
-        </excludedDestinations>
-      </networkConnector>
-    </networkConnectors>
-
-
-      <plugins>
-        <!--jaasAuthenticationPlugin configuration="activemq" /-->
-        <jaasDualAuthenticationPlugin configuration="activemq-domain" sslConfiguration="activemq-ssl-domain"/>
-        <authorizationPlugin>
-          <map>
-        <authorizationMap>
-          <authorizationEntries>
-            <authorizationEntry queue="&gt;" admin="administrators" read="administrators" write="administrators"/>
-            <authorizationEntry topic="&gt;" admin="administrators" read="administrators" write="administrators"/>
-            <authorizationEntry topic="ActiveMQ.Advisory.&gt;" admin="*" read="*" write="*"/>
-            <authorizationEntry queue="ActiveMQ.DLQ" admin="administrators" read="*" write="*"/>
-          </authorizationEntries>
-        </authorizationMap>
-          </map>
-        </authorizationPlugin>
-      </plugins>
-
-
-    <sslContext>
-      <sslContext
-          keyStore="server.keystore"
-          keyStorePassword="password"
-          trustStore="server.keystore"
-          trustStorePassword="password"
-          />
-    </sslContext>
-
-    <systemUsage>
-      <systemUsage>
-        <memoryUsage>
-          <memoryUsage limit="60 mb" />
-        </memoryUsage>
-        <storeUsage>
-          <storeUsage limit="1 mb" />
-        </storeUsage>
-        <tempUsage>
-          <tempUsage limit="50 mb" />
-        </tempUsage>
-      </systemUsage>
-    </systemUsage>
-
-    <transportConnectors>
-        <transportConnector name="openwire+ssl" uri="ssl://0.0.0.0:62626?transport.closeAsync=false&amp;transport.enabledProtocols=TLSv1,TLSv1.1,TLSv1.2&amp;transport.needClientAuth=true"/>
-    </transportConnectors>
-  </broker>
-
-  <!-- second broker instance -->
-  <broker xmlns="http://activemq.apache.org/schema/core" brokerName="broker2" id="broker2"
-   dataDirectory="./target/activemq-data-broker2" persistent="false">
-
-    <destinationPolicy>
-     <policyMap>
-       <policyEntries>
-         <policyEntry queue=">" memoryLimit="20mb">
-           <deadLetterStrategy>
-             <sharedDeadLetterStrategy processExpired="false" processNonPersistent="false"/>
-           </deadLetterStrategy>
-         </policyEntry>
-
-         <policyEntry topic=">" producerFlowControl="true" >
-           <deadLetterStrategy>
-             <sharedDeadLetterStrategy processExpired="false" processNonPersistent="false"/>
-           </deadLetterStrategy>
-         </policyEntry>
-       </policyEntries>
-     </policyMap>
-    </destinationPolicy>
-
-    <managementContext>
-      <managementContext createConnector="false" />
-    </managementContext>
-
-    <plugins>
-      <!--jaasAuthenticationPlugin configuration="activemq" /-->
-      <!--jaasCertificateAuthenticationPlugin configuration="activemq-ssl-domain" /-->
-      <jaasDualAuthenticationPlugin configuration="activemq-domain" sslConfiguration="activemq-ssl-domain"/>
-      <authorizationPlugin>
-        <map>
-          <authorizationMap>
-            <authorizationEntries> 
-              <authorizationEntry queue="&gt;" admin="administrators" read="administrators" write="administrators"/>
-              <authorizationEntry topic="&gt;" admin="administrators" read="administrators" write="administrators"/>
-              <authorizationEntry topic="ActiveMQ.Advisory.&gt;" admin="*" read="*" write="*"/>
-              <authorizationEntry queue="ActiveMQ.DLQ" admin="administrators" read="*" write="*"/>
-            </authorizationEntries>
-          </authorizationMap>
-        </map>
-      </authorizationPlugin>
-    </plugins>
-
-    <sslContext>
-      <sslContext
-          keyStore="server.keystore"
-          keyStorePassword="password"
-          trustStore="server.keystore"
-          trustStorePassword="password"
-          />
-    </sslContext>
-
-    <systemUsage>
-      <systemUsage>
-        <memoryUsage>
-          <memoryUsage limit="60 mb" />
-        </memoryUsage>
-        <storeUsage>
-          <storeUsage limit="1 mb" />
-        </storeUsage>
-        <tempUsage>
-          <tempUsage limit="50 mb" />
-        </tempUsage>
-      </systemUsage>
-    </systemUsage>
-
-    <transportConnectors>
-        <transportConnector name="openwire+ssl-2" uri="ssl://0.0.0.0:61626?transport.closeAsync=false&amp;transport.enabledProtocols=TLSv1,TLSv1.1,TLSv1.2&amp;transport.needClientAuth=true"/>
-    </transportConnectors>
-  </broker>
-</beans>
-

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/ssl-domain-JaasDualAuthenticationNetworkBridge.properties
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/ssl-domain-JaasDualAuthenticationNetworkBridge.properties b/activemq-unit-tests/src/test/resources/ssl-domain-JaasDualAuthenticationNetworkBridge.properties
new file mode 100644
index 0000000..931e673
--- /dev/null
+++ b/activemq-unit-tests/src/test/resources/ssl-domain-JaasDualAuthenticationNetworkBridge.properties
@@ -0,0 +1,31 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+################################################################################
+#
+# This file contains the valid users who can access this A-MQ using valid SSL certificates.
+# Each line has to be of the format:
+#
+# USER=Sringfied SubjectDN
+#
+#
+# You must have at least one users to be able to access JBoss A-MQ resources
+
+
+# Used by test org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
+
+adminSSL=CN=localhost, OU=activemq.org, O=activemq.org, L=LA, ST=CA, C=US

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/ssl-domain-JaasDualAuthenticationNetworkBridgeTest.properties
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/ssl-domain-JaasDualAuthenticationNetworkBridgeTest.properties b/activemq-unit-tests/src/test/resources/ssl-domain-JaasDualAuthenticationNetworkBridgeTest.properties
deleted file mode 100644
index 931e673..0000000
--- a/activemq-unit-tests/src/test/resources/ssl-domain-JaasDualAuthenticationNetworkBridgeTest.properties
+++ /dev/null
@@ -1,31 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-################################################################################
-#
-# This file contains the valid users who can access this A-MQ using valid SSL certificates.
-# Each line has to be of the format:
-#
-# USER=Sringfied SubjectDN
-#
-#
-# You must have at least one users to be able to access JBoss A-MQ resources
-
-
-# Used by test org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
-
-adminSSL=CN=localhost, OU=activemq.org, O=activemq.org, L=LA, ST=CA, C=US

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/users-JaasDualAuthenticationNetworkBridge.properties
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/users-JaasDualAuthenticationNetworkBridge.properties b/activemq-unit-tests/src/test/resources/users-JaasDualAuthenticationNetworkBridge.properties
new file mode 100644
index 0000000..a48ce7d
--- /dev/null
+++ b/activemq-unit-tests/src/test/resources/users-JaasDualAuthenticationNetworkBridge.properties
@@ -0,0 +1,21 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+#
+# Used by test org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
+
+admin=admin

http://git-wip-us.apache.org/repos/asf/activemq/blob/1ea28973/activemq-unit-tests/src/test/resources/users-JaasDualAuthenticationNetworkBridgeTest.properties
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/resources/users-JaasDualAuthenticationNetworkBridgeTest.properties b/activemq-unit-tests/src/test/resources/users-JaasDualAuthenticationNetworkBridgeTest.properties
deleted file mode 100644
index a48ce7d..0000000
--- a/activemq-unit-tests/src/test/resources/users-JaasDualAuthenticationNetworkBridgeTest.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-#
-# Used by test org.apache.activemq.security.JaasDualAuthenticationNetworkBridgeTest
-
-admin=admin


[2/2] activemq git commit: compact byteSequence before xstream marshall so that only required bytes are base64 encoded

Posted by gt...@apache.org.
compact byteSequence before xstream marshall so that only required bytes are base64 encoded


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/547476d1
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/547476d1
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/547476d1

Branch: refs/heads/master
Commit: 547476d1bc8bd6d5c824d51bc0dc3cdd5a201f4c
Parents: 950dc92
Author: gtully <ga...@gmail.com>
Authored: Wed Aug 26 11:20:18 2015 +0100
Committer: gtully <ga...@gmail.com>
Committed: Thu Aug 27 11:10:08 2015 +0100

----------------------------------------------------------------------
 .../transport/xstream/XStreamWireFormat.java    | 28 +++++++++++++++++++-
 .../xstream/XStreamWireFormatTest.java          | 16 ++++++++++-
 2 files changed, 42 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/547476d1/activemq-http/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java b/activemq-http/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java
index de437c9..179f90d 100755
--- a/activemq-http/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/xstream/XStreamWireFormat.java
@@ -19,9 +19,16 @@ package org.apache.activemq.transport.xstream;
 import java.io.IOException;
 import java.io.Reader;
 
+import com.thoughtworks.xstream.converters.Converter;
+import com.thoughtworks.xstream.converters.ConverterLookup;
+import com.thoughtworks.xstream.converters.MarshallingContext;
+import com.thoughtworks.xstream.converters.UnmarshallingContext;
+import com.thoughtworks.xstream.io.HierarchicalStreamReader;
+import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
 import org.apache.activemq.command.MarshallAware;
 import org.apache.activemq.command.MessageDispatch;
 import org.apache.activemq.transport.util.TextWireFormat;
+import org.apache.activemq.util.ByteSequence;
 import org.apache.activemq.wireformat.WireFormat;
 
 import com.thoughtworks.xstream.XStream;
@@ -110,8 +117,27 @@ public class XStreamWireFormat extends TextWireFormat {
     // Implementation methods
     // -------------------------------------------------------------------------
     protected XStream createXStream() {
-        XStream xstream = new XStream();
+        final XStream xstream = new XStream();
         xstream.ignoreUnknownElements();
+        xstream.registerConverter(new Converter() {
+            final Converter delegate = xstream.getConverterLookup().lookupConverterForType(ByteSequence.class);
+            @Override
+            public void marshal(Object o, HierarchicalStreamWriter hierarchicalStreamWriter, MarshallingContext marshallingContext) {
+                ByteSequence byteSequence = (ByteSequence)o;
+                byteSequence.compact();
+                delegate.marshal(byteSequence, hierarchicalStreamWriter, marshallingContext);
+            }
+
+            @Override
+            public Object unmarshal(HierarchicalStreamReader hierarchicalStreamReader, UnmarshallingContext unmarshallingContext) {
+                return delegate.unmarshal(hierarchicalStreamReader, unmarshallingContext);
+            }
+
+            @Override
+            public boolean canConvert(Class aClass) {
+                return aClass == ByteSequence.class;
+            }
+        });
         return xstream;
     }
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/547476d1/activemq-http/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java b/activemq-http/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java
index daa1468..5a5e611 100755
--- a/activemq-http/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java
+++ b/activemq-http/src/test/java/org/apache/activemq/transport/xstream/XStreamWireFormatTest.java
@@ -18,6 +18,8 @@ package org.apache.activemq.transport.xstream;
 
 import java.io.IOException;
 
+import junit.framework.Test;
+import org.apache.activemq.command.ActiveMQTextMessage;
 import org.apache.activemq.command.Command;
 import org.apache.activemq.command.MessageTest;
 import org.apache.activemq.wireformat.WireFormat;
@@ -33,7 +35,7 @@ public class XStreamWireFormatTest extends MessageTest {
     public void assertBeanMarshalls(Object original) throws IOException {
         super.assertBeanMarshalls(original);
 
-        String xml = getXStreamWireFormat().marshalText((Command) original);
+        String xml = getXStreamWireFormat().marshalText(original);
         LOG.info(original.getClass().getName() + " as XML is:");
         LOG.info(xml);
     }
@@ -45,4 +47,16 @@ public class XStreamWireFormatTest extends MessageTest {
     protected WireFormat createWireFormat() {
         return new XStreamWireFormat();
     }
+
+    public static Test suite() {
+        return suite(XStreamWireFormatTest.class);
+    }
+
+    public void testXmlPayload() throws Exception {
+        ActiveMQTextMessage message = new ActiveMQTextMessage();
+        message.setText("<body val=\"Hi\"/>");
+        message.setStringProperty("body","Hi");
+
+        assertBeanMarshalls(message);
+    }
 }