You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by am...@apache.org on 2013/06/05 02:40:58 UTC
svn commit: r1489675 [2/7] - in /cxf/dosgi/trunk: ./ discovery/
discovery/distributed/ discovery/distributed/cxf-discovery/
discovery/distributed/cxf-discovery/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/
discovery/distributed/cxf-discovery/...
Modified: cxf/dosgi/trunk/discovery/distributed/zookeeper-server/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/zookeeper-server/pom.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/zookeeper-server/pom.xml (original)
+++ cxf/dosgi/trunk/discovery/distributed/zookeeper-server/pom.xml Wed Jun 5 00:40:54 2013
@@ -34,7 +34,7 @@
<properties>
<topDirectoryLocation>../../..</topDirectoryLocation>
</properties>
-
+
<dependencies>
<dependency>
<groupId>org.osgi</groupId>
@@ -52,33 +52,33 @@
<exclusions>
<exclusion>
<groupId>com.sun.jdmk</groupId>
- <artifactId>jmxtools</artifactId>
+ <artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
- <artifactId>jmxri</artifactId>
+ <artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
</dependency>
-
+
<!-- We need the newer log4j as the one from zookeeper has some ugly dependencies -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
-
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<scope>test</scope>
- </dependency>
- </dependencies>
+ </dependency>
+ </dependencies>
<build>
<plugins>
@@ -96,7 +96,7 @@
<Export-Package />
</instructions>
</configuration>
- </plugin>
+ </plugin>
</plugins>
- </build>
+ </build>
</project>
Modified: cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/Activator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/Activator.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/Activator.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/Activator.java Wed Jun 5 00:40:54 2013
@@ -26,6 +26,7 @@ import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
public class Activator implements BundleActivator {
+
ZookeeperStarter zkStarter;
public void start(BundleContext context) throws Exception {
@@ -34,7 +35,7 @@ public class Activator implements Bundle
props.put(Constants.SERVICE_PID, "org.apache.cxf.dosgi.discovery.zookeeper.server");
context.registerService(org.osgi.service.cm.ManagedService.class.getName(), zkStarter, props);
}
-
+
public void stop(BundleContext context) throws Exception {
if (zkStarter != null) {
zkStarter.shutdown();
Modified: cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarter.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarter.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarter.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/main/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarter.java Wed Jun 5 00:40:54 2013
@@ -37,6 +37,7 @@ import org.osgi.framework.BundleContext;
import org.osgi.service.cm.ConfigurationException;
public class ZookeeperStarter implements org.osgi.service.cm.ManagedService {
+
private static final Logger LOG = Logger.getLogger(ZookeeperStarter.class); //NOPMD - using log4j here
protected ZookeeperServer main;
@@ -74,7 +75,7 @@ public class ZookeeperStarter implements
/**
* Remove empty values to avoid NumberFormatExceptions
- *
+ *
* @param dict
*/
private void removeEmptyValues(Dictionary<String, Object> dict) {
@@ -145,13 +146,14 @@ public class ZookeeperStarter implements
});
zkMainThread.start();
}
-
+
interface ZookeeperServer {
void startup() throws IOException;
void shutdown();
}
static class MyQuorumPeerMain extends QuorumPeerMain implements ZookeeperServer {
+
private QuorumPeerConfig config;
public MyQuorumPeerMain(QuorumPeerConfig config) {
@@ -170,12 +172,13 @@ public class ZookeeperStarter implements
}
static class MyZooKeeperServerMain extends ZooKeeperServerMain implements ZookeeperServer {
+
private QuorumPeerConfig config;
public MyZooKeeperServerMain(QuorumPeerConfig config) {
this.config = config;
}
-
+
public void startup() throws IOException {
ServerConfig serverConfig = new ServerConfig();
serverConfig.readFrom(config);
@@ -190,5 +193,4 @@ public class ZookeeperStarter implements
}
}
}
-
}
Modified: cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/test/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarterTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/test/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarterTest.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/test/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarterTest.java (original)
+++ cxf/dosgi/trunk/discovery/distributed/zookeeper-server/src/test/java/org/apache/cxf/dosgi/discovery/zookeeper/server/ZookeeperStarterTest.java Wed Jun 5 00:40:54 2013
@@ -35,6 +35,7 @@ import static org.easymock.classextensio
import static org.easymock.classextension.EasyMock.verify;
public class ZookeeperStarterTest extends TestCase {
+
public void testUpdateConfig() throws Exception {
final File tempDir = new File("target");
IMocksControl control = EasyMock.createControl();
@@ -42,9 +43,8 @@ public class ZookeeperStarterTest extend
expect(bc.getDataFile("")).andReturn(tempDir);
final MyZooKeeperServerMain mockServer = control.createMock(MyZooKeeperServerMain.class);
control.replay();
-
- ZookeeperStarter starter = new ZookeeperStarter(bc) {
+ ZookeeperStarter starter = new ZookeeperStarter(bc) {
@Override
protected void startFromConfig(QuorumPeerConfig config) {
assertEquals(1234, config.getClientPortAddress().getPort());
@@ -54,7 +54,6 @@ public class ZookeeperStarterTest extend
assertEquals(5, config.getSyncLimit());
this.main = mockServer;
}
-
};
Dictionary<String, Object> props = new Hashtable<String, Object>();
props.put("clientPort", "1234");
@@ -63,21 +62,20 @@ public class ZookeeperStarterTest extend
control.verify();
}
-
+
public void testRemoveConfiguration() throws Exception {
BundleContext bc = EasyMock.createMock(BundleContext.class);
MyZooKeeperServerMain zkServer = EasyMock.createMock(MyZooKeeperServerMain.class);
zkServer.shutdown();
EasyMock.expectLastCall();
-
+
replay(zkServer);
ZookeeperStarter starter = new ZookeeperStarter(bc);
starter.main = zkServer;
starter.updated(null);
-
+
verify(zkServer);
assertNull("main should be null", starter.main);
}
-
}
Modified: cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtils.java Wed Jun 5 00:40:54 2013
@@ -49,19 +49,15 @@ import org.osgi.service.remoteserviceadm
import org.osgi.service.remoteserviceadmin.RemoteConstants;
import org.slf4j.LoggerFactory;
-
public final class LocalDiscoveryUtils {
- private static final org.slf4j.Logger LOG =
- LoggerFactory.getLogger(LocalDiscoveryUtils.class);
- private static final String REMOTE_SERVICES_HEADER_NAME = "Remote-Service";
- private static final String REMOTE_SERVICES_DIRECTORY =
- "OSGI-INF/remote-service/";
- private static final String REMOTE_SERVICES_NS =
- "http://www.osgi.org/xmlns/sd/v1.0.0"; // this one was replaced by the RSA one in the spec
- private static final String REMOTE_SERVICES_ADMIN_NS =
- "http://www.osgi.org/xmlns/rsa/v1.0.0";
+ private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(LocalDiscoveryUtils.class);
+ private static final String REMOTE_SERVICES_HEADER_NAME = "Remote-Service";
+ private static final String REMOTE_SERVICES_DIRECTORY = "OSGI-INF/remote-service/";
+ // this one was replaced by the RSA one in the spec
+ private static final String REMOTE_SERVICES_NS = "http://www.osgi.org/xmlns/sd/v1.0.0";
+ private static final String REMOTE_SERVICES_ADMIN_NS = "http://www.osgi.org/xmlns/rsa/v1.0.0";
private static final String SERVICE_DESCRIPTION_ELEMENT = "service-description";
private static final String ENDPOINT_DESCRIPTION_ELEMENT = "endpoint-description";
@@ -503,15 +499,15 @@ public final class LocalDiscoveryUtils {
return new XMLOutputter(Format.getPrettyFormat()).outputString(d);
}
- private static Object [] normalizeArray(Object val) {
+ private static Object[] normalizeArray(Object val) {
List<Object> l = new ArrayList<Object>();
if (val instanceof int[]) {
- int[] ia = (int []) val;
+ int[] ia = (int[]) val;
for (int i : ia) {
l.add(i);
}
} else if (val instanceof long[]) {
- long[] la = (long []) val;
+ long[] la = (long[]) val;
for (long i : la) {
l.add(i);
}
@@ -521,27 +517,27 @@ public final class LocalDiscoveryUtils {
l.add(f);
}
} else if (val instanceof byte[]) {
- byte[] ba = (byte []) val;
+ byte[] ba = (byte[]) val;
for (byte b : ba) {
l.add(b);
}
} else if (val instanceof boolean[]) {
- boolean[] ba = (boolean []) val;
+ boolean[] ba = (boolean[]) val;
for (boolean b : ba) {
l.add(b);
}
} else if (val instanceof short[]) {
- short[] sa = (short []) val;
+ short[] sa = (short[]) val;
for (short s : sa) {
l.add(s);
}
} else if (val instanceof char[]) {
- char[] ca = (char []) val;
+ char[] ca = (char[]) val;
for (char c : ca) {
l.add(c);
}
} else {
- return (Object []) val;
+ return (Object[]) val;
}
return l.toArray();
}
@@ -569,7 +565,6 @@ public final class LocalDiscoveryUtils {
@SuppressWarnings("unchecked")
public static List<Element> getElements(InputStream in) throws JDOMException, IOException {
-
List<Element> elements = new ArrayList<Element>();
Document d = new SAXBuilder().build(in);
Modified: cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/Activator.java Wed Jun 5 00:40:54 2013
@@ -28,7 +28,7 @@ public class Activator implements Bundle
private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
LocalDiscovery localDiscovery;
-
+
public synchronized void start(BundleContext context) {
localDiscovery = new LocalDiscovery(context);
LOG.info("Local D-OSGi service discovery started");
Modified: cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/main/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscovery.java Wed Jun 5 00:40:54 2013
@@ -41,16 +41,17 @@ import org.osgi.util.tracker.ServiceTrac
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class LocalDiscovery implements BundleListener {
+public class LocalDiscovery implements BundleListener {
+
private static final Logger LOG = LoggerFactory.getLogger(LocalDiscovery.class);
-
+
// this is effectively a set which allows for multiple service descriptions with the
- // same interface name but different properties and takes care of itself with respect to concurrency
- ConcurrentHashMap<EndpointDescription, Bundle> endpointDescriptions =
+ // same interface name but different properties and takes care of itself with respect to concurrency
+ ConcurrentHashMap<EndpointDescription, Bundle> endpointDescriptions =
new ConcurrentHashMap<EndpointDescription, Bundle>();
- Map<EndpointListener, Collection<String>> listenerToFilters =
+ Map<EndpointListener, Collection<String>> listenerToFilters =
new HashMap<EndpointListener, Collection<String>>();
- Map<String, Collection<EndpointListener>> filterToListeners =
+ Map<String, Collection<EndpointListener>> filterToListeners =
new HashMap<String, Collection<EndpointListener>>();
final BundleContext bundleContext;
@@ -58,7 +59,7 @@ public class LocalDiscovery implements B
public LocalDiscovery(BundleContext bc) {
bundleContext = bc;
-
+
listenerTracker = new ServiceTracker(bundleContext, EndpointListener.class.getName(), null) {
@Override
@@ -72,7 +73,7 @@ public class LocalDiscovery implements B
public void modifiedService(ServiceReference reference, Object service) {
super.modifiedService(reference, service);
clearTracker(service);
-
+
// This may cause duplicate registrations of remote services,
// but that's fine and should be filtered out on another level.
// See Remove Service Admin spec section 122.6.3
@@ -84,20 +85,19 @@ public class LocalDiscovery implements B
super.removedService(reference, service);
clearTracker(service);
}
-
};
listenerTracker.open();
-
+
bundleContext.addBundleListener(this);
processExistingBundles();
}
private void processExistingBundles() {
- Bundle [] bundles = bundleContext.getBundles();
+ Bundle[] bundles = bundleContext.getBundles();
if (bundles == null) {
return;
}
-
+
for (Bundle b : bundles) {
if (b.getState() == Bundle.ACTIVE) {
findDeclaredRemoteServices(b);
@@ -117,7 +117,7 @@ public class LocalDiscovery implements B
if (svc instanceof EndpointListener) {
EndpointListener listener = (EndpointListener) svc;
removeListener(listener);
- // If the tracker was removed or the scope was changed this doesn't require
+ // If the tracker was removed or the scope was changed this doesn't require
// additional callbacks on the tracker. Its the responsibility of the tracker
// itself to clean up any orphans. See Remote Service Admin spec 122.6.3
}
@@ -125,12 +125,12 @@ public class LocalDiscovery implements B
private Collection<String> addListener(ServiceReference reference,
EndpointListener listener) {
- List<String> filters =
+ List<String> filters =
LocalDiscoveryUtils.getStringPlusProperty(reference, EndpointListener.ENDPOINT_LISTENER_SCOPE);
if (filters.isEmpty()) {
return filters;
}
-
+
listenerToFilters.put(listener, filters);
for (String filter : filters) {
Collection<EndpointListener> listeners = filterToListeners.get(filter);
@@ -142,22 +142,22 @@ public class LocalDiscovery implements B
filterToListeners.put(filter, list);
}
}
-
+
return filters;
}
-
+
private void removeListener(EndpointListener listener) {
Collection<String> filters = listenerToFilters.remove(listener);
if (filters == null) {
return;
}
-
+
for (String filter : filters) {
Collection<EndpointListener> listeners = filterToListeners.get(filter);
if (listeners != null) {
listeners.remove(listener);
}
- }
+ }
}
public void shutDown() {
@@ -218,37 +218,37 @@ public class LocalDiscovery implements B
if (!filterMatches(toMatch, ed)) {
return;
}
-
+
if (added) {
listener.endpointAdded(ed, toMatch);
} else {
listener.endpointRemoved(ed, toMatch);
}
}
-
+
private void triggerCallbacks(Collection<String> filters, EndpointListener listener) {
for (String filter : filters) {
for (EndpointDescription ed : endpointDescriptions.keySet()) {
triggerCallbacks(listener, filter, ed, true);
}
}
- }
+ }
private boolean filterMatches(String match, EndpointDescription ed) {
Filter filter = createFilter(match);
return filter != null && filter.match(new Hashtable<String, Object>(ed.getProperties()));
- }
-
- private Filter createFilter(String filterValue) {
+ }
+
+ private Filter createFilter(String filterValue) {
if (filterValue == null) {
return null;
}
-
+
try {
- return bundleContext.createFilter(filterValue);
+ return bundleContext.createFilter(filterValue);
} catch (Exception ex) {
- LOG.error("Problem creating a Filter from " + filterValue, ex);
+ LOG.error("Problem creating a Filter from " + filterValue, ex);
}
return null;
- }
+ }
}
Modified: cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/LocalDiscoveryUtilsTest.java Wed Jun 5 00:40:54 2013
@@ -49,6 +49,7 @@ import org.osgi.service.remoteserviceadm
import org.osgi.service.remoteserviceadmin.RemoteConstants;
public class LocalDiscoveryUtilsTest extends TestCase {
+
private static final String LF = "\n";
public void testNoRemoteServicesXMLFiles() {
@@ -152,10 +153,10 @@ public class LocalDiscoveryUtilsTest ext
assertEquals('@', props.get("char"));
assertEquals('X', props.get("Character2"));
- int [] intArray = (int []) props.get("int-array");
+ int[] intArray = (int[]) props.get("int-array");
assertTrue(Arrays.equals(new int[] {1, 2}, intArray));
- Integer [] integerArray = (Integer []) props.get("Integer-array");
+ Integer[] integerArray = (Integer[]) props.get("Integer-array");
assertTrue(Arrays.equals(new Integer[] {2, 1}, integerArray));
assertEquals(Arrays.asList(true, false), props.get("bool-list"));
@@ -222,7 +223,7 @@ public class LocalDiscoveryUtilsTest ext
Map<String, Object> m = new LinkedHashMap<String, Object>();
m.put("service.imported.configs", "org.apache.cxf.ws");
m.put("endpoint.id", "foo:bar");
- m.put("objectClass", new String [] {"com.acme.HelloService", "some.other.Service"});
+ m.put("objectClass", new String[] {"com.acme.HelloService", "some.other.Service"});
m.put("SomeObject", new Object());
m.put("long", 9223372036854775807L);
m.put("Long2", -1L);
@@ -255,9 +256,9 @@ public class LocalDiscoveryUtilsTest ext
int[] intArray = new int[] {1, 2};
m.put("int-array", intArray);
- String xml = "<xml>" + LF
- + "<t1 xmlns=\"http://www.acme.org/xmlns/other/v1.0.0\">" + LF
- + "<foo type='bar'>haha</foo>" + LF
+ String xml = "<xml>" + LF
+ + "<t1 xmlns=\"http://www.acme.org/xmlns/other/v1.0.0\">" + LF
+ + "<foo type='bar'>haha</foo>" + LF
+ "</t1>" + LF
+ "</xml>";
m.put("someXML", xml);
@@ -273,7 +274,7 @@ public class LocalDiscoveryUtilsTest ext
String s2 = stripComment(s);
String s3 = stripProlog(s2);
Document d = new SAXBuilder().build(new ByteArrayInputStream(s3.getBytes()));
- XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
+ XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
return outputter.outputString(d);
}
@@ -304,7 +305,7 @@ public class LocalDiscoveryUtilsTest ext
}
}
- public static byte [] drainStream(InputStream is) throws IOException {
+ public static byte[] drainStream(InputStream is) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
drainStream(is, baos);
@@ -313,5 +314,4 @@ public class LocalDiscoveryUtilsTest ext
is.close();
}
}
-
}
Modified: cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/internal/ActivatorTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/internal/ActivatorTest.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/internal/ActivatorTest.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/internal/ActivatorTest.java Wed Jun 5 00:40:54 2013
@@ -27,25 +27,26 @@ import org.osgi.framework.Filter;
import org.osgi.framework.FrameworkUtil;
public class ActivatorTest extends TestCase {
+
public void testActivator() throws Exception {
BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
- EasyMock.expect(bc.createFilter((String) EasyMock.anyObject())).andAnswer(new IAnswer<Filter>() {
- public Filter answer() throws Throwable {
+ EasyMock.expect(bc.createFilter((String) EasyMock.anyObject())).andAnswer(new IAnswer<Filter>() {
+ public Filter answer() throws Throwable {
return FrameworkUtil.createFilter((String) EasyMock.getCurrentArguments()[0]);
}
}).anyTimes();
EasyMock.replay(bc);
-
+
Activator a = new Activator();
a.start(bc);
assertNotNull(a.localDiscovery);
-
+
a.localDiscovery = EasyMock.createMock(LocalDiscovery.class);
a.localDiscovery.shutDown();
EasyMock.expectLastCall();
EasyMock.replay(a.localDiscovery);
a.stop(bc);
-
+
EasyMock.verify(a.localDiscovery);
}
}
Modified: cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscoveryTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscoveryTest.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscoveryTest.java (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/java/org/apache/cxf/dosgi/discovery/local/internal/LocalDiscoveryTest.java Wed Jun 5 00:40:54 2013
@@ -48,20 +48,21 @@ import org.osgi.service.remoteserviceadm
import org.osgi.service.remoteserviceadmin.EndpointListener;
public class LocalDiscoveryTest extends TestCase {
+
public void testLocalDiscovery() throws Exception {
Filter filter = EasyMock.createMock(Filter.class);
EasyMock.replay(filter);
-
+
BundleContext bc = EasyMock.createMock(BundleContext.class);
EasyMock.expect(bc.createFilter("(objectClass=org.osgi.service.remoteserviceadmin.EndpointListener)"))
.andReturn(filter);
- bc.addServiceListener((ServiceListener) EasyMock.anyObject(),
+ bc.addServiceListener((ServiceListener) EasyMock.anyObject(),
EasyMock.eq("(objectClass=org.osgi.service.remoteserviceadmin.EndpointListener)"));
EasyMock.expectLastCall();
EasyMock.expect(bc.getServiceReferences("org.osgi.service.remoteserviceadmin.EndpointListener", null))
.andReturn(null);
bc.addBundleListener((BundleListener) EasyMock.anyObject());
- EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
+ EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
assertEquals(LocalDiscovery.class, EasyMock.getCurrentArguments()[0].getClass());
return null;
@@ -69,15 +70,15 @@ public class LocalDiscoveryTest extends
});
EasyMock.expect(bc.getBundles()).andReturn(null);
EasyMock.replay(bc);
-
+
LocalDiscovery ld = new LocalDiscovery(bc);
assertSame(bc, ld.bundleContext);
- assertNotNull(ld.listenerTracker);
-
+ assertNotNull(ld.listenerTracker);
+
EasyMock.verify(bc);
-
+
EasyMock.reset(bc);
- bc.removeBundleListener(ld);
+ bc.removeBundleListener(ld);
EasyMock.expectLastCall();
bc.removeServiceListener((ServiceListener) EasyMock.anyObject());
EasyMock.expectLastCall();
@@ -86,22 +87,22 @@ public class LocalDiscoveryTest extends
ld.shutDown();
EasyMock.verify(bc);
}
-
+
public void testPreExistingBundles() throws Exception {
Filter filter = EasyMock.createMock(Filter.class);
EasyMock.replay(filter);
-
+
BundleContext bc = EasyMock.createMock(BundleContext.class);
EasyMock.expect(bc.createFilter("(objectClass=org.osgi.service.remoteserviceadmin.EndpointListener)"))
.andReturn(filter);
- bc.addServiceListener((ServiceListener) EasyMock.anyObject(),
+ bc.addServiceListener((ServiceListener) EasyMock.anyObject(),
EasyMock.eq("(objectClass=org.osgi.service.remoteserviceadmin.EndpointListener)"));
EasyMock.expectLastCall();
EasyMock.expect(bc.getServiceReferences("org.osgi.service.remoteserviceadmin.EndpointListener", null))
.andReturn(null);
bc.addBundleListener((BundleListener) EasyMock.anyObject());
EasyMock.expectLastCall();
-
+
Bundle b1 = EasyMock.createMock(Bundle.class);
EasyMock.expect(b1.getState()).andReturn(Bundle.RESOLVED);
EasyMock.replay(b1);
@@ -110,19 +111,19 @@ public class LocalDiscoveryTest extends
Dictionary<String, Object> headers = new Hashtable<String, Object>();
headers.put("Remote-Service", "OSGI-INF/remote-service/");
EasyMock.expect(b2.getHeaders()).andReturn(headers);
-
+
URL rs3URL = getClass().getResource("/ed3.xml");
- URL rs4URL = getClass().getResource("/ed4.xml");
+ URL rs4URL = getClass().getResource("/ed4.xml");
List<URL> urls = Arrays.asList(rs3URL, rs4URL);
EasyMock.expect(b2.findEntries("OSGI-INF/remote-service", "*.xml", false))
.andReturn(Collections.enumeration(urls));
EasyMock.replay(b2);
-
- EasyMock.expect(bc.getBundles()).andReturn(new Bundle [] {b1, b2});
+
+ EasyMock.expect(bc.getBundles()).andReturn(new Bundle[] {b1, b2});
EasyMock.replay(bc);
-
+
LocalDiscovery ld = new LocalDiscovery(bc);
-
+
assertEquals(3, ld.endpointDescriptions.size());
Set<String> expected = new HashSet<String>(
Arrays.asList("http://somewhere:12345", "http://somewhere:1", "http://somewhere"));
@@ -133,7 +134,7 @@ public class LocalDiscoveryTest extends
}
assertEquals(expected, actual);
}
-
+
public void testBundleChanged() throws Exception {
LocalDiscovery ld = getLocalDiscovery();
@@ -147,21 +148,21 @@ public class LocalDiscoveryTest extends
.andReturn(Collections.enumeration(
Collections.singleton(getClass().getResource("/ed3.xml"))));
EasyMock.replay(bundle);
-
+
BundleEvent be0 = new BundleEvent(BundleEvent.INSTALLED, bundle);
ld.bundleChanged(be0);
assertEquals(0, ld.endpointDescriptions.size());
-
+
// Create an EndpointListener
final Map<String, Object> props = new Hashtable<String, Object>();
props.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, "(objectClass=*)");
ServiceReference sr = EasyMock.createMock(ServiceReference.class);
- EasyMock.expect(sr.getPropertyKeys()).andReturn(props.keySet().toArray(new String [] {})).anyTimes();
+ EasyMock.expect(sr.getPropertyKeys()).andReturn(props.keySet().toArray(new String[] {})).anyTimes();
EasyMock.expect(sr.getProperty((String) EasyMock.anyObject())).andAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
return props.get(EasyMock.getCurrentArguments()[0]);
}
- }).anyTimes();
+ }).anyTimes();
EasyMock.replay(sr);
EndpointListener el = EasyMock.createMock(EndpointListener.class);
@@ -169,7 +170,7 @@ public class LocalDiscoveryTest extends
EasyMock.expectLastCall();
EasyMock.replay(el);
ld.registerTracker(sr, el);
-
+
// Start the bundle
BundleEvent be = new BundleEvent(BundleEvent.STARTED, bundle);
ld.bundleChanged(be);
@@ -177,7 +178,7 @@ public class LocalDiscoveryTest extends
EndpointDescription ed = ld.endpointDescriptions.keySet().iterator().next();
assertEquals("http://somewhere:12345", ed.getId());
assertSame(bundle, ld.endpointDescriptions.get(ed));
-
+
EasyMock.verify(el);
// Stop the bundle
@@ -185,14 +186,14 @@ public class LocalDiscoveryTest extends
el.endpointRemoved((EndpointDescription) EasyMock.anyObject(), EasyMock.eq("(objectClass=*)"));
EasyMock.expectLastCall();
EasyMock.replay(el);
-
+
BundleEvent be1 = new BundleEvent(BundleEvent.STOPPED, bundle);
ld.bundleChanged(be1);
assertEquals(0, ld.endpointDescriptions.size());
-
+
EasyMock.verify(el);
}
-
+
public void testEndpointListenerService() throws Exception {
LocalDiscovery ld = getLocalDiscovery();
@@ -205,23 +206,23 @@ public class LocalDiscoveryTest extends
.andReturn(Collections.enumeration(
Collections.singleton(getClass().getResource("/ed4.xml"))));
EasyMock.replay(bundle);
-
+
BundleEvent be = new BundleEvent(BundleEvent.STARTED, bundle);
ld.bundleChanged(be);
- assertEquals(2, ld.endpointDescriptions.size());
+ assertEquals(2, ld.endpointDescriptions.size());
final Map<String, Object> props = new Hashtable<String, Object>();
- props.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, new String [] {"(objectClass=org.example.ClassA)"});
+ props.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, new String[] {"(objectClass=org.example.ClassA)"});
ServiceReference sr = EasyMock.createMock(ServiceReference.class);
- EasyMock.expect(sr.getPropertyKeys()).andReturn(props.keySet().toArray(new String [] {})).anyTimes();
+ EasyMock.expect(sr.getPropertyKeys()).andReturn(props.keySet().toArray(new String[] {})).anyTimes();
EasyMock.expect(sr.getProperty((String) EasyMock.anyObject())).andAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
return props.get(EasyMock.getCurrentArguments()[0]);
}
}).anyTimes();
-
+
EasyMock.replay(sr);
-
+
EasyMock.reset(ld.bundleContext);
EndpointListener el = EasyMock.createMock(EndpointListener.class);
EasyMock.expect(ld.bundleContext.getService(sr)).andReturn(el);
@@ -232,32 +233,32 @@ public class LocalDiscoveryTest extends
}
}).anyTimes();
EasyMock.replay(ld.bundleContext);
-
- el.endpointAdded((EndpointDescription) EasyMock.anyObject(),
+
+ el.endpointAdded((EndpointDescription) EasyMock.anyObject(),
EasyMock.eq("(objectClass=org.example.ClassA)"));
EasyMock.expectLastCall();
EasyMock.replay(el);
-
+
// Add the EndpointListener Service
assertEquals("Precondition failed", 0, ld.listenerToFilters.size());
- assertEquals("Precondition failed", 0, ld.filterToListeners.size());
+ assertEquals("Precondition failed", 0, ld.filterToListeners.size());
assertSame(el, ld.listenerTracker.addingService(sr));
-
+
assertEquals(1, ld.listenerToFilters.size());
assertEquals(Collections.singletonList("(objectClass=org.example.ClassA)"), ld.listenerToFilters.get(el));
- assertEquals(1, ld.filterToListeners.size());
+ assertEquals(1, ld.filterToListeners.size());
assertEquals(Collections.singletonList(el), ld.filterToListeners.get("(objectClass=org.example.ClassA)"));
EasyMock.verify(el);
-
+
// Modify the EndpointListener Service
// no need to reset the mock for this...
props.put(EndpointListener.ENDPOINT_LISTENER_SCOPE,
"(|(objectClass=org.example.ClassA)(objectClass=org.example.ClassB))");
-
+
EasyMock.reset(el);
final Set<String> actualEndpoints = new HashSet<String>();
- el.endpointAdded((EndpointDescription) EasyMock.anyObject(),
+ el.endpointAdded((EndpointDescription) EasyMock.anyObject(),
EasyMock.eq("(|(objectClass=org.example.ClassA)(objectClass=org.example.ClassB))"));
EasyMock.expectLastCall().andAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
@@ -270,17 +271,17 @@ public class LocalDiscoveryTest extends
ld.listenerTracker.modifiedService(sr, el);
assertEquals(1, ld.listenerToFilters.size());
- assertEquals(Arrays.asList("(|(objectClass=org.example.ClassA)(objectClass=org.example.ClassB))"),
+ assertEquals(Arrays.asList("(|(objectClass=org.example.ClassA)(objectClass=org.example.ClassB))"),
ld.listenerToFilters.get(el));
- assertEquals(2, ld.filterToListeners.size());
- assertEquals(Collections.singletonList(el),
+ assertEquals(2, ld.filterToListeners.size());
+ assertEquals(Collections.singletonList(el),
ld.filterToListeners.get("(|(objectClass=org.example.ClassA)(objectClass=org.example.ClassB))"));
assertEquals(0, ld.filterToListeners.get("(objectClass=org.example.ClassA)").size());
-
+
EasyMock.verify(el);
Set<String> expectedEndpoints = new HashSet<String>(Arrays.asList("org.example.ClassA", "org.example.ClassB"));
assertEquals(expectedEndpoints, actualEndpoints);
-
+
// Remove the EndpointListener Service
ld.listenerTracker.removedService(sr, el);
assertEquals(0, ld.listenerToFilters.size());
@@ -289,41 +290,41 @@ public class LocalDiscoveryTest extends
assertEquals(0, valIter.next().size());
assertEquals(0, valIter.next().size());
}
-
+
public void testRegisterTracker() throws Exception {
LocalDiscovery ld = getLocalDiscovery();
final Map<String, Object> props = new Hashtable<String, Object>();
props.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, "(objectClass=Aaaa)");
ServiceReference sr = EasyMock.createMock(ServiceReference.class);
- EasyMock.expect(sr.getPropertyKeys()).andReturn(props.keySet().toArray(new String [] {})).anyTimes();
+ EasyMock.expect(sr.getPropertyKeys()).andReturn(props.keySet().toArray(new String[] {})).anyTimes();
EasyMock.expect(sr.getProperty((String) EasyMock.anyObject())).andAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
return props.get(EasyMock.getCurrentArguments()[0]);
}
- }).anyTimes();
+ }).anyTimes();
EasyMock.replay(sr);
EndpointListener el = EasyMock.createMock(EndpointListener.class);
EasyMock.replay(el);
-
+
assertEquals("Precondition failed", 0, ld.listenerToFilters.size());
assertEquals("Precondition failed", 0, ld.filterToListeners.size());
ld.registerTracker(sr, el);
-
+
assertEquals(1, ld.listenerToFilters.size());
assertEquals(Collections.singletonList("(objectClass=Aaaa)"), ld.listenerToFilters.get(el));
assertEquals(1, ld.filterToListeners.size());
assertEquals(Collections.singletonList(el), ld.filterToListeners.get("(objectClass=Aaaa)"));
-
+
// Add another one with the same scope filter
ServiceReference sr2 = EasyMock.createMock(ServiceReference.class);
- EasyMock.expect(sr2.getPropertyKeys()).andReturn(props.keySet().toArray(new String [] {})).anyTimes();
+ EasyMock.expect(sr2.getPropertyKeys()).andReturn(props.keySet().toArray(new String[] {})).anyTimes();
EasyMock.expect(sr2.getProperty((String) EasyMock.anyObject())).andAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
return props.get(EasyMock.getCurrentArguments()[0]);
}
- }).anyTimes();
+ }).anyTimes();
EasyMock.replay(sr2);
EndpointListener el2 = EasyMock.createMock(EndpointListener.class);
@@ -333,20 +334,20 @@ public class LocalDiscoveryTest extends
assertEquals(2, ld.listenerToFilters.size());
assertEquals(Collections.singletonList("(objectClass=Aaaa)"), ld.listenerToFilters.get(el));
assertEquals(Collections.singletonList("(objectClass=Aaaa)"), ld.listenerToFilters.get(el2));
-
+
assertEquals(1, ld.filterToListeners.size());
assertEquals(Arrays.asList(el, el2), ld.filterToListeners.get("(objectClass=Aaaa)"));
-
+
// Add another listener with a multi-value scope
final Map<String, Object> props2 = new Hashtable<String, Object>();
props2.put(EndpointListener.ENDPOINT_LISTENER_SCOPE, Arrays.asList("(objectClass=X)", "(objectClass=Y)"));
ServiceReference sr3 = EasyMock.createMock(ServiceReference.class);
- EasyMock.expect(sr3.getPropertyKeys()).andReturn(props2.keySet().toArray(new String [] {})).anyTimes();
+ EasyMock.expect(sr3.getPropertyKeys()).andReturn(props2.keySet().toArray(new String[] {})).anyTimes();
EasyMock.expect(sr3.getProperty((String) EasyMock.anyObject())).andAnswer(new IAnswer<Object>() {
public Object answer() throws Throwable {
return props2.get(EasyMock.getCurrentArguments()[0]);
}
- }).anyTimes();
+ }).anyTimes();
EasyMock.replay(sr3);
EndpointListener el3 = EasyMock.createMock(EndpointListener.class);
@@ -363,17 +364,17 @@ public class LocalDiscoveryTest extends
assertEquals(Collections.singletonList(el3), ld.filterToListeners.get("(objectClass=X)"));
assertEquals(Collections.singletonList(el3), ld.filterToListeners.get("(objectClass=Y)"));
}
-
+
public void testClearTracker() throws Exception {
LocalDiscovery ld = getLocalDiscovery();
-
+
EndpointListener el = EasyMock.createMock(EndpointListener.class);
ld.listenerToFilters.put(el, new ArrayList<String>(Arrays.asList("(a=b)", "(objectClass=foo.bar.Bheuaark)")));
ld.filterToListeners.put("(a=b)", new ArrayList<EndpointListener>(Arrays.asList(el)));
ld.filterToListeners.put("(objectClass=foo.bar.Bheuaark)", new ArrayList<EndpointListener>(Arrays.asList(el)));
-
+
ld.clearTracker("foobar"); // should not barf
-
+
assertEquals(1, ld.listenerToFilters.size());
assertEquals(2, ld.filterToListeners.size());
assertEquals(1, ld.filterToListeners.values().iterator().next().size());
@@ -382,10 +383,10 @@ public class LocalDiscoveryTest extends
assertEquals(2, ld.filterToListeners.size());
assertEquals(1, ld.filterToListeners.values().iterator().next().size());
ld.clearTracker(el);
- assertEquals(0, ld.listenerToFilters.size());
+ assertEquals(0, ld.listenerToFilters.size());
assertEquals(2, ld.filterToListeners.size());
assertEquals(0, ld.filterToListeners.values().iterator().next().size());
- }
+ }
private LocalDiscovery getLocalDiscovery() throws InvalidSyntaxException {
BundleContext bc = EasyMock.createMock(BundleContext.class);
@@ -394,7 +395,7 @@ public class LocalDiscoveryTest extends
return FrameworkUtil.createFilter((String) EasyMock.getCurrentArguments()[0]);
}
}).anyTimes();
- bc.addServiceListener((ServiceListener) EasyMock.anyObject(),
+ bc.addServiceListener((ServiceListener) EasyMock.anyObject(),
EasyMock.eq("(objectClass=org.osgi.service.remoteserviceadmin.EndpointListener)"));
EasyMock.expectLastCall();
EasyMock.expect(bc.getServiceReferences("org.osgi.service.remoteserviceadmin.EndpointListener", null))
@@ -403,7 +404,7 @@ public class LocalDiscoveryTest extends
EasyMock.expectLastCall();
EasyMock.expect(bc.getBundles()).andReturn(null);
EasyMock.replay(bc);
-
+
return new LocalDiscovery(bc);
- }
+ }
}
Modified: cxf/dosgi/trunk/discovery/local/src/test/resources/ed1.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/resources/ed1.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/resources/ed1.xml (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/resources/ed1.xml Wed Jun 5 00:40:54 2013
@@ -30,13 +30,13 @@
<property name="osgi.remote.requires.intents">
<list>
<value>confidentiality</value>
- </list>
+ </list>
</property>
<property name="testKey" value="testValue"/>
<property name="endpoint.id">http://somewhere:12345</property>
<property name="service.imported.configs" value="org.apache.cxf.ws"/>
</endpoint-description>
-
+
<endpoint-description>
<property name="objectClass">
<array>
@@ -70,4 +70,3 @@
<property name="service.imported.configs" value="org.apache.cxf.ws"/>
</endpoint-description>
</endpoint-descriptions>
-
Modified: cxf/dosgi/trunk/discovery/local/src/test/resources/ed2-generated.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/resources/ed2-generated.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/resources/ed2-generated.xml (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/resources/ed2-generated.xml Wed Jun 5 00:40:54 2013
@@ -26,7 +26,7 @@
<property name="Short2" value-type="Short" value="-99"/>
<property name="char" value-type="Character" value="@"/>
<property name="Character2" value-type="Character" value="X"/>
-
+
<property name="bool-list" value-type="Boolean">
<list>
<value>true</value>
@@ -48,6 +48,6 @@
<value>2</value>
</array>
</property>
- <property name="someXML" value="<xml>
<t1 xmlns="http://www.acme.org/xmlns/other/v1.0.0">
<foo type='bar'>haha</foo>
</t1>
</xml>"/>
+ <property name="someXML" value="<xml>
<t1 xmlns="http://www.acme.org/xmlns/other/v1.0.0">
<foo type='bar'>haha</foo>
</t1>
</xml>"/>
</endpoint-description>
</endpoint-descriptions>
Modified: cxf/dosgi/trunk/discovery/local/src/test/resources/ed2.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/resources/ed2.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/resources/ed2.xml (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/resources/ed2.xml Wed Jun 5 00:40:54 2013
@@ -20,7 +20,7 @@
<value>some.other.Service</value>
</array>
</property>
-
+
<property name="someXML" value-type="String">
<!-- Literal XML to be parsed into the String -->
<xml>
@@ -46,7 +46,7 @@
<property name="Short2" value-type="Short" value="-99"/>
<property name="char" value-type="char">@</property>
<property name="Character2" value-type="Character" value="X"/>
-
+
<property name="bool-list" value-type="boolean">
<list>
<value>true</value>
@@ -80,7 +80,7 @@
<property name="other1">
Hello
- <other:t1/>
+ <other:t1/>
<!-- the above tag is a custom extension -->
</property>
<property name="other2">
@@ -89,11 +89,11 @@
<!-- A value specified as literal XML -->
<xml>
<other:t2/>
- </xml>
+ </xml>
</value>
</list>
<!-- This is a custom extension -->
- <other:t1/>
- </property>
+ <other:t1/>
+ </property>
</endpoint-description>
</endpoint-descriptions>
Modified: cxf/dosgi/trunk/discovery/local/src/test/resources/ed3.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/resources/ed3.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/resources/ed3.xml (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/resources/ed3.xml Wed Jun 5 00:40:54 2013
@@ -30,4 +30,3 @@
<property name="service.imported.configs" value="org.apache.cxf.ws"/>
</endpoint-description>
</endpoint-descriptions>
-
Modified: cxf/dosgi/trunk/discovery/local/src/test/resources/ed4.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/local/src/test/resources/ed4.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/local/src/test/resources/ed4.xml (original)
+++ cxf/dosgi/trunk/discovery/local/src/test/resources/ed4.xml Wed Jun 5 00:40:54 2013
@@ -41,4 +41,3 @@
<property name="service.imported.configs" value="org.apache.cxf.ws"/>
</endpoint-description>
</endpoint-descriptions>
-
Modified: cxf/dosgi/trunk/discovery/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/discovery/pom.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/discovery/pom.xml (original)
+++ cxf/dosgi/trunk/discovery/pom.xml Wed Jun 5 00:40:54 2013
@@ -37,6 +37,5 @@
<module>local</module>
<module>distributed</module>
</modules>
-
</project>
Modified: cxf/dosgi/trunk/distribution/features/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/features/src/main/resources/features.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/features/src/main/resources/features.xml (original)
+++ cxf/dosgi/trunk/distribution/features/src/main/resources/features.xml Wed Jun 5 00:40:54 2013
@@ -8,12 +8,12 @@
<feature>cxf-jaxrs</feature>
<feature>cxf-databinding-aegis</feature>
<feature>cxf-http-jetty</feature>
- <bundle>mvn:org.osgi/org.osgi.enterprise/4.2.0</bundle>
+ <bundle>mvn:org.osgi/org.osgi.enterprise/4.2.0</bundle>
<bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/1.1_3</bundle>
<bundle>mvn:${project.groupId}/cxf-dosgi-ri-topology-manager/${project.version}</bundle>
<bundle>mvn:${project.groupId}/cxf-dosgi-ri-dsw-cxf/${project.version}</bundle>
</feature>
-
+
<feature name="cxf-dosgi-discovery-local" version="${project.version}">
<feature>cxf-dosgi-core</feature>
<bundle>mvn:${project.groupId}/cxf-dosgi-ri-discovery-local/${project.version}</bundle>
@@ -25,7 +25,7 @@
<bundle>mvn:${project.groupId}/cxf-dosgi-ri-discovery-local/${project.version}</bundle>
<bundle>mvn:${project.groupId}/cxf-dosgi-ri-discovery-distributed/${project.version}</bundle>
</feature>
-
+
<feature name="cxf-dosgi-zookeeper-server">
<bundle>mvn:org.apache.zookeeper/zookeeper/3.3.1</bundle>
<bundle>mvn:${project.groupId}/cxf-dosgi-ri-discovery-distributed-zookeeper-server/${project.version}</bundle>
Modified: cxf/dosgi/trunk/distribution/multi-bundle/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/pom.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/pom.xml (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/pom.xml Wed Jun 5 00:40:54 2013
@@ -232,7 +232,7 @@
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.api</artifactId>
<version>1.0.0</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.apache.aries.blueprint</groupId>
<artifactId>org.apache.aries.blueprint.core</artifactId>
@@ -243,7 +243,6 @@
<artifactId>org.apache.aries.blueprint.cm</artifactId>
<version>1.0.1</version>
</dependency>
-
<dependency>
<groupId>org.apache.cxf</groupId>
@@ -314,7 +313,7 @@
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-bundle-compatible</artifactId>
<version>${cxf.version}</version>
- <!-- <exclusions> <exclusion> <groupId>org.apache.cxf</groupId>
+ <!-- <exclusions> <exclusion> <groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-jms</artifactId> </exclusion> </exclusions> -->
</dependency>
@@ -385,8 +384,7 @@
<version>${project.version}</version>
</dependency>
- </dependencies>
-
+ </dependencies>
<build>
<resources>
@@ -473,7 +471,6 @@
</execution>
</executions>
</plugin>
-
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -486,39 +483,39 @@
<pathelement location="." />
</path>
<pathconvert targetos="unix" property="current.dir" refid="current.dir.path" />
-
+
<xslt processor="trax" in="target/classes/distro_bundles.xml" out="target/distribution_configs/felix.config.properties.append" style="src/main/xsl/felix_distro_config.xslt">
<param name="Version" expression="${dosgi.version}" />
<param name="Offset" expression="50" />
</xslt>
-
+
<xslt processor="trax" in="target/classes/distro_bundles.xml" out="target/felix.config.properties.append" style="src/main/xsl/felix_buildsystem_config.xslt">
<param name="TargetDir" expression="${current.dir}/target/" />
<param name="Offset" expression="50" />
</xslt>
-
+
<xslt processor="trax" in="target/classes/distro_bundles.xml" out="target/distribution_configs/equinox.config.ini.append" style="src/main/xsl/equinox_distro_config.xslt">
<param name="Version" expression="${dosgi.version}" />
</xslt>
-
+
<xslt processor="trax" in="target/classes/distro_bundles.xml" out="target/equinox.config.ini.append" style="src/main/xsl/equinox_buildsystem_config.xslt">
<param name="TargetDir" expression="${current.dir}/target/" />
</xslt>
-
+
<xslt processor="trax" in="target/classes/distro_discovery_bundles.xml" out="target/distribution_configs/felix.discovery.config.properties.append" style="src/main/xsl/felix_distro_config.xslt">
<param name="Version" expression="${dosgi.version}" />
<param name="Offset" expression="120" />
</xslt>
-
+
<xslt processor="trax" in="target/classes/distro_discovery_bundles.xml" out="target/felix.discovery.config.properties.append" style="src/main/xsl/felix_buildsystem_config.xslt">
<param name="TargetDir" expression="${current.dir}/target/" />
<param name="Offset" expression="120" />
</xslt>
-
+
<xslt processor="trax" in="target/classes/distro_discovery_bundles.xml" out="target/distribution_configs/equinox.discovery.config.ini.append" style="src/main/xsl/equinox_distro_config.xslt">
<param name="Version" expression="${dosgi.version}" />
</xslt>
-
+
<xslt processor="trax" in="target/classes/distro_discovery_bundles.xml" out="target/equinox.discovery.config.ini.append" style="src/main/xsl/equinox_buildsystem_config.xslt">
<param name="TargetDir" expression="${current.dir}/target/" />
</xslt>
@@ -529,7 +526,7 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin>
</plugins>
</build>
</project>
Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/appended-resources/META-INF/LICENSE.vm
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/src/main/appended-resources/META-INF/LICENSE.vm?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/src/main/appended-resources/META-INF/LICENSE.vm (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/src/main/appended-resources/META-INF/LICENSE.vm Wed Jun 5 00:40:54 2013
@@ -21,14 +21,14 @@
The $projectName
-includes a number of components and libraries with separate
-copyright notices and license terms. Your use of those components are
-subject to the terms and conditions of the following licenses.
+includes a number of components and libraries with separate
+copyright notices and license terms. Your use of those components are
+subject to the terms and conditions of the following licenses.
#set ( $apacheTxt = "The Apache Software License, Version 2.0" )
#foreach ( $project in $projects )
#foreach ( $license in $project.licenses)
-#if ( ! ($apacheTxt == $license.name) )
+#if ( ! ($apacheTxt == $license.name) )
$project.name #if ($project.url)($project.url)#end $project.artifact
License: $license.name #if ($license.url) ($license.url)#end
Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/appended-resources/META-INF/NOTICE
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/src/main/appended-resources/META-INF/NOTICE?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/src/main/appended-resources/META-INF/NOTICE (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/src/main/appended-resources/META-INF/NOTICE Wed Jun 5 00:40:54 2013
@@ -5,9 +5,9 @@ This product also includes schemas and s
- the W3C consortium (http://www.w3c.org)
(http://www.w3.org/XML/1998/namespace)
-
+
This product also includes WS-* schemas developed by International
- Business Machines Corporation, Microsoft Corporation, BEA Systems,
+ Business Machines Corporation, Microsoft Corporation, BEA Systems,
TIBCO Software, SAP AG, Sonic Software, and VeriSign
(http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd)
(http://schemas.xmlsoap.org/ws/2004/08/addressing/)
Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/release/README
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/src/main/release/README?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/src/main/release/README (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/src/main/release/README Wed Jun 5 00:40:54 2013
@@ -8,17 +8,17 @@ Compendium Specification, and OSGi Remot
version 1.0, Chapter 122 in the OSGi Enterprise Specification[1].
-This release is provided for your convenience in three different
+This release is provided for your convenience in three different
distribution formats:
1. Multi-bundle distro: cxf-dosgi-ri-multibundle-distribution-1.2.{tar.gaz|zip}
-Contains the dOSGi implementation and all 3rd party dependencies as
+Contains the dOSGi implementation and all 3rd party dependencies as
separate bundles within an archive. The current distribution is an
instance of this type. The easiest way to get started is to explode
this archive into your Felix or Equinox installation tree. Then
append the contents of the felix.config.properties.append or
-equinox.config.ini.append snippets found in the conf directory to
+equinox.config.ini.append snippets found in the conf directory to
your felix.config.properties or equinox.config.ini. This will cause
all the required bundles to be loaded on start-up. The bundles required
for the Zookeeper-based Discovery Service implementation are also provided
@@ -30,10 +30,10 @@ equinox.discovery.config.ini.append snip
2. Single-bundle distro: cxf-dosgi-ri-singlebundle-distribution-1.2.jar
Contains the dOSGi implementation and all 3rd party dependencies wrapped
-in a single OSGi bundle so as to allow direct installation in your favourite
+in a single OSGi bundle so as to allow direct installation in your favourite
OSGi container in one fell swoop.
-
+
3. Source distro: cxf-dosgi-ri-source-distribution-1.2.{tar.gz|zip}
Contains the entire source tree for dOSGi.
@@ -43,9 +43,9 @@ The best starting point for using dOSGi
Also note the very detailed walk-through of the greeter demo[3].
-If you need more help, or want to provide any feedback, please feel free
+If you need more help, or want to provide any feedback, please feel free
to drop us a note on the CXF dev or users list[4].
-
+
If you trip over any problems with dOSGi, don't hesitate to submit an issue
to the CXF JIRA[5] with the component set to "Distributed-OSGi".
Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/release/release_notes.txt
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/src/main/release/release_notes.txt?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/src/main/release/release_notes.txt (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/src/main/release/release_notes.txt Wed Jun 5 00:40:54 2013
@@ -26,11 +26,11 @@ Many dependencies have been updated, inc
Additionally, a number of bugs has been fixed including:
DOSGI-108 service.exported.interfaces doesn't support comma-seperated String value
-DOSGI-107 Support for a 'wsdl' configuration type
-DOSGI-105 Update greeter_rest demo to use OSGI HttpService
+DOSGI-107 Support for a 'wsdl' configuration type
+DOSGI-105 Update greeter_rest demo to use OSGI HttpService
DOSGI-103 Improve multi-bundle distro configuration for Felix
DOSGI-102 DOSGI RI can not map invocation exceptions to custom exceptions on the client side
-DOSGI-97 Automatically unregister HTTP servlets/resources if exported service goes down
+DOSGI-97 Automatically unregister HTTP servlets/resources if exported service goes down
DOSGI-94 Enhancement to deal with registered services that might have been proxied
DOSGI-91 DOSGI RS Proxies ignore ResponseExceptionMapper providers
DOSGI-85 Unable to export services started after Topology manager
@@ -38,7 +38,7 @@ DOSGI-82 Populate custom servicename,
DOSGI-79 RemoteServiceAdmin.getImportedEndpoints() returns collection of incorrect type
DOSGI-77 NullPointerException from Distributed OSGI when bundle with wanted properties is started.
DOSGI-76 EndpointListener.endpointRemoved
-DOSGI-75 CXF Distributed OSGi isn't using org.apache.cxf.common.logging.LogUtils
+DOSGI-75 CXF Distributed OSGi isn't using org.apache.cxf.common.logging.LogUtils
Apache CXF Distributed OSGi 1.2 Release Notes
@@ -103,7 +103,7 @@ Additionally, a number of bugs has been
version
[DOSGI-61] - The Zookeeper Discovery only supports primitive types as service
properties
-[DOSGI-62] - The DSW creates endpoints with localhost URLs
+[DOSGI-62] - The DSW creates endpoints with localhost URLs
[DOSGI-66] - The DSW only loads the intent map when certain spring bundles
are loaded and started upfront
[DOSGI-67] - Enable filters on DOSGi endpoints
@@ -141,7 +141,7 @@ New features in this release include:
[CXF-2435] - Distributed OSGi having a problem with a custom type method
argument
[CXF-2288] - Bundle cannot be restarted
-[CXF-2385] - Discovery doesn't fully translate 'localhost' into a proper
+[CXF-2385] - Discovery doesn't fully translate 'localhost' into a proper
machine name
[CXF-2200] - Consuming more than 1 service using Spring-DM doesn't work
Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml (original)
+++ cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml Wed Jun 5 00:40:54 2013
@@ -33,14 +33,14 @@
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.specs.jaxws-api-2.2-${servicemix.specs.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.specs.jsr339-api-m10-${servicemix.specs.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.servicemix.bundles.joda-time-1.5.2_4.jar</bundle>
-
+
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.util-1.1.0.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.proxy.api-1.0.0.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.proxy.impl-1.0.1.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.blueprint.api-1.0.0.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.blueprint.core-1.1.0.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.aries.blueprint.cm-1.0.1.jar</bundle>
-
+
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.osgi.enterprise-${osgi.enterprise.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.felix.configadmin-1.6.0.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/org.apache.felix.fileinstall-3.2.6.jar</bundle>
@@ -55,12 +55,12 @@
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-bindings-xml-${cxf.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-bindings-soap-${cxf.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-transports-http-${cxf.version}.jar</bundle>
- <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-transports-http-jetty-${cxf.version}.jar</bundle>
+ <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-transports-http-jetty-${cxf.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-ws-policy-${cxf.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-rt-rs-extension-providers-${cxf.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-bundle-compatible-${cxf.version}.jar</bundle>
-
+
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-dsw-cxf-${project.version}.jar</bundle>
<bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-topology-manager-${project.version}.jar</bundle>
- <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-discovery-local-${project.version}.jar</bundle>
+ <bundle>cxf-dosgi-ri-multibundle-distribution-${project.version}-dir/apache-cxf-dosgi-ri-${project.version}/dosgi_bundles/cxf-dosgi-ri-discovery-local-${project.version}.jar</bundle>
</bundles>
Modified: cxf/dosgi/trunk/distribution/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/pom.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/pom.xml (original)
+++ cxf/dosgi/trunk/distribution/pom.xml Wed Jun 5 00:40:54 2013
@@ -41,5 +41,5 @@
<module>features</module>
<module>multi-bundle</module>
<module>sources</module>
- </modules>
+ </modules>
</project>
Modified: cxf/dosgi/trunk/distribution/sources/src/main/release/LICENSE
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/sources/src/main/release/LICENSE?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/sources/src/main/release/LICENSE (original)
+++ cxf/dosgi/trunk/distribution/sources/src/main/release/LICENSE Wed Jun 5 00:40:54 2013
@@ -203,13 +203,13 @@
The Apache CXF Distributed OSGi DSW Reference Implementation
-includes a number of components and libraries with separate
-copyright notices and license terms. Your use of those components are
-subject to the terms and conditions of the following licenses.
+includes a number of components and libraries with separate
+copyright notices and license terms. Your use of those components are
+subject to the terms and conditions of the following licenses.
AOP alliance (http://aopalliance.sourceforge.net) aopalliance:aopalliance:jar:1.0
- License: Public Domain
+ License: Public Domain
Unnamed - asm:asm:jar:2.2.3 (http://asm.objectweb.org/asm/asm) asm:asm:jar:2.2.3:compile
License: BSD (http://asm.objectweb.org/license.html)
Modified: cxf/dosgi/trunk/distribution/sources/src/main/release/README
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/sources/src/main/release/README?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/sources/src/main/release/README (original)
+++ cxf/dosgi/trunk/distribution/sources/src/main/release/README Wed Jun 5 00:40:54 2013
@@ -8,12 +8,12 @@ Compendium Specification, and OSGi Remot
version 1.0, Chapter 122 in the OSGi Enterprise Specification[1].
-This release is provided for your convenience in three different
+This release is provided for your convenience in three different
distribution formats:
1. Multi-bundle distro: cxf-dosgi-ri-multibundle-distribution-1.3.{tar.gaz|zip}
-Contains the dOSGi implementation and all 3rd party dependencies as
+Contains the dOSGi implementation and all 3rd party dependencies as
separate bundles within an archive. The current distribution is an
instance of this type.
@@ -21,7 +21,7 @@ instance of this type.
2. Single-bundle distro: cxf-dosgi-ri-singlebundle-distribution-1.3.jar
Contains the dOSGi implementation and all 3rd party dependencies wrapped
-in a single OSGi bundle so as to allow direct installation in your favourite
+in a single OSGi bundle so as to allow direct installation in your favourite
OSGi container in one fell swoop.
3. Source distro: cxf-dosgi-ri-source-distribution-1.3.{tar.gz|zip}
@@ -37,9 +37,9 @@ The best starting point for using dOSGi
Also note the very detailed walk-through of the greeter demo[3].
-If you need more help, or want to provide any feedback, please feel free
+If you need more help, or want to provide any feedback, please feel free
to drop us a note on the CXF dev or users list[4].
-
+
If you trip over any problems with dOSGi, don't hesitate to submit an issue
to the CXF Distributed OSGI JIRA[5].
Modified: cxf/dosgi/trunk/distribution/sources/src/main/release/release_notes.txt
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/sources/src/main/release/release_notes.txt?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/sources/src/main/release/release_notes.txt (original)
+++ cxf/dosgi/trunk/distribution/sources/src/main/release/release_notes.txt Wed Jun 5 00:40:54 2013
@@ -42,11 +42,11 @@ Many dependencies have been updated, inc
Additionally, a number of bugs has been fixed including:
DOSGI-108 service.exported.interfaces doesn't support comma-seperated String value
-DOSGI-107 Support for a 'wsdl' configuration type
-DOSGI-105 Update greeter_rest demo to use OSGI HttpService
+DOSGI-107 Support for a 'wsdl' configuration type
+DOSGI-105 Update greeter_rest demo to use OSGI HttpService
DOSGI-103 Improve multi-bundle distro configuration for Felix
DOSGI-102 DOSGI RI can not map invocation exceptions to custom exceptions on the client side
-DOSGI-97 Automatically unregister HTTP servlets/resources if exported service goes down
+DOSGI-97 Automatically unregister HTTP servlets/resources if exported service goes down
DOSGI-94 Enhancement to deal with registered services that might have been proxied
DOSGI-91 DOSGI RS Proxies ignore ResponseExceptionMapper providers
DOSGI-85 Unable to export services started after Topology manager
@@ -54,7 +54,7 @@ DOSGI-82 Populate custom servicename,
DOSGI-79 RemoteServiceAdmin.getImportedEndpoints() returns collection of incorrect type
DOSGI-77 NullPointerException from Distributed OSGI when bundle with wanted properties is started.
DOSGI-76 EndpointListener.endpointRemoved
-DOSGI-75 CXF Distributed OSGi isn't using org.apache.cxf.common.logging.LogUtils
+DOSGI-75 CXF Distributed OSGi isn't using org.apache.cxf.common.logging.LogUtils
Apache CXF Distributed OSGi 1.2 Release Notes
@@ -119,7 +119,7 @@ Additionally, a number of bugs has been
version
[DOSGI-61] - The Zookeeper Discovery only supports primitive types as service
properties
-[DOSGI-62] - The DSW creates endpoints with localhost URLs
+[DOSGI-62] - The DSW creates endpoints with localhost URLs
[DOSGI-66] - The DSW only loads the intent map when certain spring bundles
are loaded and started upfront
[DOSGI-67] - Enable filters on DOSGi endpoints
@@ -157,7 +157,7 @@ New features in this release include:
[CXF-2435] - Distributed OSGi having a problem with a custom type method
argument
[CXF-2288] - Bundle cannot be restarted
-[CXF-2385] - Discovery doesn't fully translate 'localhost' into a proper
+[CXF-2385] - Discovery doesn't fully translate 'localhost' into a proper
machine name
[CXF-2200] - Consuming more than 1 service using Spring-DM doesn't work
Modified: cxf/dosgi/trunk/distribution/subsystem/pom.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/subsystem/pom.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/subsystem/pom.xml (original)
+++ cxf/dosgi/trunk/distribution/subsystem/pom.xml Wed Jun 5 00:40:54 2013
@@ -72,15 +72,15 @@
<groupId>org.osgi</groupId>
<artifactId>org.osgi.enterprise</artifactId>
</dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-jcl</artifactId>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jcl</artifactId>
</dependency>
-
+
<dependency>
<groupId>org.jdom</groupId>
<artifactId>com.springsource.org.jdom</artifactId>
@@ -184,62 +184,62 @@
<dependency>
<groupId>org.apache.ws.xmlschema</groupId>
<artifactId>xmlschema-core</artifactId>
- <version>${xmlschema.bundle.version}</version>
+ <version>${xmlschema.bundle.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId>
- <version>${xmlresolver.bundle.version}</version>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.xmlresolver</artifactId>
+ <version>${xmlresolver.bundle.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.neethi</groupId>
- <artifactId>neethi</artifactId>
- <version>${neethi.bundle.version}</version>
+ <groupId>org.apache.neethi</groupId>
+ <artifactId>neethi</artifactId>
+ <version>${neethi.bundle.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
<version>${wsdl4j.bundle.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.xmlsec</artifactId>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.xmlsec</artifactId>
<version>${xmlsec.bundle.version}</version>
- </dependency>
+ </dependency>
<dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
- <version>${jaxbimpl.bundle.version}</version>
- </dependency>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.jaxb-impl</artifactId>
+ <version>${jaxbimpl.bundle.version}</version>
+ </dependency>
<dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.asm</artifactId>
- <version>${asm.bundle.version}</version>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.asm</artifactId>
+ <version>${asm.bundle.version}</version>
</dependency>
<dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>stax2-api</artifactId>
- <version>3.1.1</version>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>stax2-api</artifactId>
+ <version>3.1.1</version>
</dependency>
<dependency>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>woodstox-core-asl</artifactId>
- <version>${woodstox.bundle.version}</version>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>woodstox-core-asl</artifactId>
+ <version>${woodstox.bundle.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.commons-pool</artifactId>
- <version>${commons.pool.bundle.version}</version>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.commons-pool</artifactId>
+ <version>${commons.pool.bundle.version}</version>
</dependency>
<dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
+ <groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.joda-time</artifactId>
<version>1.5.2_4</version>
</dependency>
<dependency>
- <groupId>org.apache.servicemix.bundles</groupId>
+ <groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.opensaml</artifactId>
<version>2.4.1_1</version>
</dependency>
@@ -269,16 +269,16 @@
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
<version>1.2.8</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.fileinstall</artifactId>
<version>3.1.10</version>
- </dependency>
+ </dependency>
- <dependency>
- <groupId>org.apache.log4j</groupId>
- <artifactId>com.springsource.org.apache.log4j</artifactId>
+ <dependency>
+ <groupId>org.apache.log4j</groupId>
+ <artifactId>com.springsource.org.apache.log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
@@ -288,15 +288,15 @@
<exclusions>
<exclusion>
<groupId>com.sun.jdmk</groupId>
- <artifactId>jmxtools</artifactId>
+ <artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
- <artifactId>jmxri</artifactId>
+ <artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
+ <artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
@@ -315,9 +315,8 @@
<artifactId>cxf-dosgi-ri-discovery-distributed-zookeeper-server-config</artifactId>
<version>${project.version}</version>
</dependency>
-
- </dependencies>
-
+
+ </dependencies>
<build>
<resources>
@@ -347,7 +346,7 @@
</execution>
</executions>
</plugin>
- <!-- Since the assembly plugin has no way to output to an .esa file extension use the antrun
+ <!-- Since the assembly plugin has no way to output to an .esa file extension use the antrun
plugin to copy the file to one with the proper extension -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -365,7 +364,7 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin>
<!-- Attach the .esa file to the project so that it ends up in the repo -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
Modified: cxf/dosgi/trunk/distribution/subsystem/src/main/assembly/subsystem-assembly.xml
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/subsystem/src/main/assembly/subsystem-assembly.xml?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/distribution/subsystem/src/main/assembly/subsystem-assembly.xml (original)
+++ cxf/dosgi/trunk/distribution/subsystem/src/main/assembly/subsystem-assembly.xml Wed Jun 5 00:40:54 2013
@@ -37,12 +37,10 @@
<scope>runtime</scope>
<useTransitiveDependencies>false</useTransitiveDependencies>
<excludes>
- <!-- Exclude the current artifact as it doesn't contribute anything other than the
+ <!-- Exclude the current artifact as it doesn't contribute anything other than the
logic to build the subsystem. -->
<exclude>org.apache.cxf.dosgi:cxf-dosgi-ri-subsystem-distribution</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>
-
-
Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java?rev=1489675&r1=1489674&r2=1489675&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Activator.java Wed Jun 5 00:40:54 2013
@@ -51,6 +51,7 @@ import org.slf4j.LoggerFactory;
// registered as spring bean -> start / stop called accordingly
public class Activator implements ManagedService, BundleActivator {
+
private static final int DEFAULT_INTENT_TIMEOUT = 30000;
private static final Logger LOG = LoggerFactory.getLogger(Activator.class);
private static final String CONFIG_SERVICE_PID = "cxf-dsw";
@@ -85,14 +86,14 @@ public class Activator implements Manage
Dictionary<String, Object> props = new Hashtable<String, Object>();
String[] supportedIntents = intentMap.keySet().toArray(new String[] {});
props.put("remote.intents.supported", supportedIntents);
- props.put("remote.configs.supported",
+ props.put("remote.configs.supported",
obtainSupportedConfigTypes(configTypeHandlerFactory.getSupportedConfigurationTypes()));
LOG.info("Registering RemoteServiceAdminFactory...");
rsaFactoryReg = bc.registerService(RemoteServiceAdmin.class.getName(), rsaf, props);
decoratorReg = bc.registerService(ServiceDecorator.class.getName(), new ServiceDecoratorImpl(bc), null);
}
- // The CT sometimes uses the first element returned to register a service, but
+ // The CT sometimes uses the first element returned to register a service, but
// does not provide any additional configuration.
// Return the configuration type that works without additional configuration as the first in the list.
private String[] obtainSupportedConfigTypes(List<String> types) {