You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ni...@apache.org on 2012/09/16 10:48:44 UTC
svn commit: r1385231 - in /cxf/trunk/services/wsn:
wsn-core/src/main/java/org/apache/cxf/wsn/services/Service.java
wsn-osgi/src/main/resources/OSGI-INF/blueprint/cxf-wsn.xml
Author: ningjiang
Date: Sun Sep 16 08:48:43 2012
New Revision: 1385231
URL: http://svn.apache.org/viewvc?rev=1385231&view=rev
Log:
CXF-4506 Added the support to set the userName and password on WSN service
Modified:
cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/Service.java
cxf/trunk/services/wsn/wsn-osgi/src/main/resources/OSGI-INF/blueprint/cxf-wsn.xml
Modified: cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/Service.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/Service.java?rev=1385231&r1=1385230&r2=1385231&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/Service.java (original)
+++ cxf/trunk/services/wsn/wsn-core/src/main/java/org/apache/cxf/wsn/services/Service.java Sun Sep 16 08:48:43 2012
@@ -33,6 +33,9 @@ import org.apache.cxf.wsn.AbstractNotifi
public class Service {
String rootURL = "http://0.0.0.0:9000/wsn";
String activeMqUrl = "vm:(broker:(tcp://localhost:6000)?persistent=false)";
+ String userName;
+ String password;
+
boolean jmxEnable = true;
AbstractCreatePullPoint createPullPointServer;
@@ -42,6 +45,10 @@ public class Service {
for (int x = 0; x < args.length; x++) {
if ("-brokerUrl".equals(args[x])) {
activeMqUrl = args[++x];
+ } else if ("-userName".equals(args[x])) {
+ userName = args[++x];
+ } else if ("-password".equals(args[x])) {
+ password = args[++x];
} else if ("-rootUrl".equals(args[x])) {
rootURL = args[++x];
} else if ("-jmxEnable".equals(args[x])) {
@@ -60,7 +67,7 @@ public class Service {
}
public void start() throws Exception {
- ActiveMQConnectionFactory activemq = new ActiveMQConnectionFactory(activeMqUrl);
+ ActiveMQConnectionFactory activemq = new ActiveMQConnectionFactory(userName, password, activeMqUrl);
notificationBrokerServer = new JaxwsNotificationBroker("WSNotificationBroker", activemq);
notificationBrokerServer.setAddress(rootURL + "/NotificationBroker");
Modified: cxf/trunk/services/wsn/wsn-osgi/src/main/resources/OSGI-INF/blueprint/cxf-wsn.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/wsn/wsn-osgi/src/main/resources/OSGI-INF/blueprint/cxf-wsn.xml?rev=1385231&r1=1385230&r2=1385231&view=diff
==============================================================================
--- cxf/trunk/services/wsn/wsn-osgi/src/main/resources/OSGI-INF/blueprint/cxf-wsn.xml (original)
+++ cxf/trunk/services/wsn/wsn-osgi/src/main/resources/OSGI-INF/blueprint/cxf-wsn.xml Sun Sep 16 08:48:43 2012
@@ -31,7 +31,9 @@
<!-- ActiveMQ connection factory -->
<bean id="activemq" class="org.apache.activemq.ActiveMQConnectionFactory">
- <argument value="${cxf.wsn.activemq}" />
+ <property name="brokerURL" value="${cxf.wsn.activemq}" />
+ <property name="userName" value="${cxf.wsn.activemq.username}" />
+ <property name="password" value="${cxf.wsn.activemq.password}" />
</bean>
<bean id="JaxwsEndpointManager"