package org.apache.cxf.dosgi.discovery.zookeeper;
import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Hashtable;
import java.util.List;
-import java.util.Properties;
import org.apache.zookeeper.ZooKeeper;
import org.osgi.framework.Bundle;
}
public synchronized void start() {
- Properties props = new Properties();
+ Dictionary<String, String> props = new Hashtable<String, String>();
props.put(EndpointListener.ENDPOINT_LISTENER_SCOPE,
"(&(" + Constants.OBJECTCLASS + "=*)(" + RemoteConstants.ENDPOINT_FRAMEWORK_UUID
+ "=" + Util.getUUID(bctx) + "))");
*/
package org.apache.cxf.dosgi.discovery.zookeeper;
+import java.util.Dictionary;
import java.util.List;
-import java.util.Properties;
import junit.framework.TestCase;
EasyMock.expect(
ctx.registerService(EasyMock.eq(EndpointListener.class.getName()), EasyMock.eq(eplf),
- (Properties)EasyMock.anyObject())).andReturn(sreg).once();
+ (Dictionary<String, String>)EasyMock.anyObject())).andReturn(sreg).once();
EasyMock.expect(ctx.getProperty(EasyMock.eq("org.osgi.framework.uuid"))).andReturn("myUUID")
.anyTimes();
EasyMock.expect(
ctx.registerService(EasyMock.eq(EndpointListener.class.getName()), EasyMock.eq(eplf),
- (Properties)EasyMock.anyObject())).andReturn(sreg).once();
+ (Dictionary<String, String>)EasyMock.anyObject())).andReturn(sreg).once();
EasyMock.expect(ctx.getProperty(EasyMock.eq("org.osgi.framework.uuid"))).andReturn("myUUID")
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.enterprise</artifactId>
- <version>${osgi.version}</version>
</dependency>
<dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.enterprise</artifactId>
- <version>${osgi.version}</version>
</dependency>
<dependency>
<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.version}.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>
EasyMock.expectLastCall().atLeastOnce();
ServiceRegistration sr = control.createMock(ServiceRegistration.class);
EasyMock.expect(bc.registerService(EasyMock.eq(RemoteServiceAdmin.class.getName()),
- EasyMock.anyObject(), (Dictionary<?, ?>)EasyMock.anyObject()))
+ EasyMock.anyObject(), (Dictionary<String, String>)EasyMock.anyObject()))
.andReturn(sr).atLeastOnce();
control.replay();
public void testCustomGlobalProvider() throws Exception {
ServiceReference sref = EasyMock.createNiceMock(ServiceReference.class);
BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
- bc.getServiceReferences(null, JaxRSUtils.PROVIDERS_FILTER);
+ bc.getServiceReferences((String)null, JaxRSUtils.PROVIDERS_FILTER);
EasyMock.expectLastCall().andReturn(new ServiceReference[] {
sref
});
public void testNoCustomGlobalProvider() throws Exception {
ServiceReference sref = EasyMock.createNiceMock(ServiceReference.class);
BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
- bc.getServiceReferences(null, JaxRSUtils.PROVIDERS_FILTER);
+ bc.getServiceReferences((String)null, JaxRSUtils.PROVIDERS_FILTER);
EasyMock.expectLastCall().andReturn(new ServiceReference[] {
sref
});
public void testCustomGlobalProviderExpected() throws Exception {
ServiceReference sref = EasyMock.createNiceMock(ServiceReference.class);
BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
- bc.getServiceReferences(null, JaxRSUtils.PROVIDERS_FILTER);
+ bc.getServiceReferences((String)null, JaxRSUtils.PROVIDERS_FILTER);
EasyMock.expectLastCall().andReturn(new ServiceReference[] {
sref
});
final Bundle bundle = EasyMock.createNiceMock(Bundle.class);
EasyMock.expect(bundle.getBundleId()).andReturn(42L).anyTimes();
EasyMock.expect(bundle.getSymbolicName()).andReturn("test.bundle").anyTimes();
- Hashtable<String, Object> headers = new Hashtable<String, Object>();
+ Hashtable<String, String> headers = new Hashtable<String, String>();
headers.put("Bundle-Version", "1.2.3.test");
EasyMock.expect(bundle.getHeaders()).andReturn(headers).anyTimes();
EasyMock.replay(bundle);
final Bundle bundle = EasyMock.createNiceMock(Bundle.class);
EasyMock.expect(bundle.getBundleId()).andReturn(42L).anyTimes();
EasyMock.expect(bundle.getSymbolicName()).andReturn("test.bundle").anyTimes();
- EasyMock.expect(bundle.getHeaders()).andReturn(new Hashtable<String, Object>()).anyTimes();
+ EasyMock.expect(bundle.getHeaders()).andReturn(new Hashtable<String, String>()).anyTimes();
EasyMock.replay(bundle);
final Exception exportException = new Exception();
import java.util.Hashtable;
import java.util.List;
import java.util.Map;
-import java.util.Properties;
import org.apache.cxf.dosgi.dsw.handlers.ConfigTypeHandlerFactory;
import org.apache.cxf.dosgi.dsw.handlers.ConfigurationTypeHandler;
EasyMock.expect(bc.getBundle()).andReturn(b).anyTimes();
- Dictionary<?, ?> d = new Properties();
+ Dictionary<String, String> d = new Hashtable<String, String>();
EasyMock.expect(b.getHeaders()).andReturn(d).anyTimes();
ServiceReference sref = c.createMock(ServiceReference.class);
Bundle b = c.createMock(Bundle.class);
BundleContext bc = c.createMock(BundleContext.class);
- Dictionary<?, ?> d = new Properties();
+ Dictionary<String, String> d = new Hashtable<String, String>();
EasyMock.expect(b.getHeaders()).andReturn(d).anyTimes();
EasyMock.expect(bc.getBundle()).andReturn(b).anyTimes();
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.enterprise</artifactId>
- <version>${osgi.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<osgi.version>4.2.0</osgi.version>
-
+ <osgi.enterprise.version>4.2.0</osgi.enterprise.version>
<cxf.version>2.7.2</cxf.version>
<cxf.build-utils.version>2.5.0</cxf.build-utils.version>
<felix.version>3.0.8</felix.version>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.enterprise</artifactId>
- <version>${osgi.version}</version>
+ <version>${osgi.enterprise.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>