Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B58231068B for ; Tue, 27 Aug 2013 07:55:04 +0000 (UTC) Received: (qmail 52936 invoked by uid 500); 27 Aug 2013 07:55:03 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 52263 invoked by uid 500); 27 Aug 2013 07:54:52 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 52233 invoked by uid 99); 27 Aug 2013 07:54:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Aug 2013 07:54:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Aug 2013 07:54:46 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 446D32388906; Tue, 27 Aug 2013 07:54:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1517758 - in /cxf/dosgi/trunk: parent/ systests2/common/ systests2/multi-bundle/ systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/ systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/ Date: Tue, 27 Aug 2013 07:54:23 -0000 To: commits@cxf.apache.org From: cschneider@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130827075424.446D32388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cschneider Date: Tue Aug 27 07:54:22 2013 New Revision: 1517758 URL: http://svn.apache.org/r1517758 Log: DOSGI-205 Upgrade zo pax exam 3.2.0, fix rest test Added: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java (with props) cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java (with props) cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java (with props) Modified: cxf/dosgi/trunk/parent/pom.xml cxf/dosgi/trunk/systests2/common/pom.xml cxf/dosgi/trunk/systests2/multi-bundle/pom.xml cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java Modified: cxf/dosgi/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/parent/pom.xml?rev=1517758&r1=1517757&r2=1517758&view=diff ============================================================================== --- cxf/dosgi/trunk/parent/pom.xml (original) +++ cxf/dosgi/trunk/parent/pom.xml Tue Aug 27 07:54:22 2013 @@ -67,7 +67,7 @@ 2.2.1.1_2 1.6.4 2.4.0 - 2.6.0 + 3.2.0 @@ -159,9 +159,9 @@ - org.ops4j.pax.swissbox - pax-swissbox-tinybundles - 1.3.1 + org.ops4j.pax.tinybundles + tinybundles + 2.0.0 Modified: cxf/dosgi/trunk/systests2/common/pom.xml URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/common/pom.xml?rev=1517758&r1=1517757&r2=1517758&view=diff ============================================================================== --- cxf/dosgi/trunk/systests2/common/pom.xml (original) +++ cxf/dosgi/trunk/systests2/common/pom.xml Tue Aug 27 07:54:22 2013 @@ -44,10 +44,8 @@ - org.ops4j.pax.swissbox - pax-swissbox-tinybundles - 1.3.1 - provided + org.ops4j.pax.tinybundles + tinybundles org.apache.cxf Modified: cxf/dosgi/trunk/systests2/multi-bundle/pom.xml URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/pom.xml?rev=1517758&r1=1517757&r2=1517758&view=diff ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/pom.xml (original) +++ cxf/dosgi/trunk/systests2/multi-bundle/pom.xml Tue Aug 27 07:54:22 2013 @@ -57,6 +57,12 @@ pax-exam-link-mvn test + + + org.ops4j.pax.url + pax-url-aether + 1.6.0 + org.eclipse @@ -71,11 +77,6 @@ --> - org.ops4j.pax.swissbox - pax-swissbox-tinybundles - - - org.apache.cxf.dosgi.systests cxf-dosgi-ri-systests2-common ${project.version} Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java?rev=1517758&r1=1517757&r2=1517758&view=diff ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java (original) +++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestCustomIntent.java Tue Aug 27 07:54:22 2013 @@ -35,10 +35,10 @@ import org.apache.cxf.dosgi.systests2.mu import org.apache.cxf.frontend.ClientProxyFactoryBean; import org.junit.Test; import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles; +import org.ops4j.pax.exam.junit.PaxExam; +import org.ops4j.pax.tinybundles.core.TinyBundles; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; @@ -48,14 +48,14 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.streamBundle; import static org.ops4j.pax.exam.CoreOptions.systemProperty; -@RunWith(JUnit4TestRunner.class) +@RunWith(PaxExam.class) public class TestCustomIntent extends AbstractDosgiTest { @Inject BundleContext bundleContext; protected static InputStream getCustomIntentBundle() { - return TinyBundles.newBundle() + return TinyBundles.bundle() .add(CustomIntentActivator.class) .add(CustomFeature.class) .add(AddGreetingPhraseInterceptor.class) @@ -64,7 +64,7 @@ public class TestCustomIntent extends Ab } protected static InputStream getServiceBundle() { - return TinyBundles.newBundle() + return TinyBundles.bundle() .add(GreeterServiceWithCustomIntentActivator.class) .add(EmptyGreeterService.class) .set(Constants.BUNDLE_SYMBOLICNAME, "EmptyGreeterService") Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java?rev=1517758&r1=1517757&r2=1517758&view=diff ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java (original) +++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestDiscoveryExport.java Tue Aug 27 07:54:22 2013 @@ -30,9 +30,9 @@ import org.apache.zookeeper.ZooKeeper; import org.apache.zookeeper.data.Stat; import org.junit.Test; import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; +import org.ops4j.pax.exam.junit.PaxExam; import org.osgi.framework.BundleContext; import org.osgi.service.cm.ConfigurationAdmin; @@ -40,7 +40,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.systemProperty; -@RunWith(JUnit4TestRunner.class) +@RunWith(PaxExam.class) public class TestDiscoveryExport extends AbstractDosgiTest { private static final String GREETER_ZOOKEEPER_NODE Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java?rev=1517758&r1=1517757&r2=1517758&view=diff ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java (original) +++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportRestService.java Tue Aug 27 07:54:22 2013 @@ -18,26 +18,31 @@ */ package org.apache.cxf.dosgi.systests2.multi; +import java.io.InputStream; + import javax.inject.Inject; -import org.apache.cxf.dosgi.samples.greeter.rest.GreeterInfo; -import org.apache.cxf.dosgi.samples.greeter.rest.GreeterService; -import org.apache.cxf.dosgi.samples.greeter.rest.GreetingPhrase; -import org.apache.cxf.jaxrs.client.JAXRSClientFactory; +import org.apache.cxf.dosgi.systests2.multi.rest.RestTranslate; +import org.apache.cxf.dosgi.systests2.multi.rest.RestTranslateImpl; +import org.apache.cxf.dosgi.systests2.multi.rest.TranslateActivator; +import org.apache.cxf.jaxrs.client.WebClient; import org.junit.Assert; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.CoreOptions; import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; +import org.ops4j.pax.exam.junit.PaxExam; +import org.ops4j.pax.tinybundles.core.TinyBundles; import org.osgi.framework.BundleContext; +import org.osgi.framework.Constants; import static org.ops4j.pax.exam.CoreOptions.frameworkStartLevel; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.CoreOptions.systemProperty; -@RunWith(JUnit4TestRunner.class) +@RunWith(PaxExam.class) public class TestExportRestService extends AbstractDosgiTest { @Inject @@ -51,31 +56,35 @@ public class TestExportRestService exten MultiBundleTools.getDistroWithDiscovery(), systemProperty("org.osgi.service.http.port").value(webPort), systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"), - mavenBundle().groupId("org.apache.servicemix.bundles") - .artifactId("org.apache.servicemix.bundles.junit").version("4.9_2"), - mavenBundle().groupId("org.apache.cxf.dosgi.samples") - .artifactId("cxf-dosgi-ri-samples-greeter-rest-interface").versionAsInProject(), mavenBundle().groupId("org.apache.cxf.dosgi.samples") - .artifactId("cxf-dosgi-ri-samples-greeter-rest-impl").versionAsInProject(), - frameworkStartLevel(100) + .artifactId("cxf-dosgi-ri-samples-greeter-interface").versionAsInProject(), + CoreOptions.junitBundles(), + provision(getServiceBundle()), + frameworkStartLevel(100), + //CoreOptions.vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005") }; } + + private InputStream getServiceBundle() { + return TinyBundles.bundle() + .add(RestTranslate.class) + .add(RestTranslateImpl.class) + .add(TranslateActivator.class) + .set(Constants.BUNDLE_SYMBOLICNAME, "RestTranslate") + .set(Constants.BUNDLE_ACTIVATOR, TranslateActivator.class.getName()) + .build(TinyBundles.withBnd()); + } /** * FIXME This test fails.. */ @Test - @Ignore public void testEndpointAvailable() throws Exception { - waitWebPage("http://localhost:" + webPort + "/greeter/greeter/greeting/Chris"); + waitWebPage("http://localhost:" + webPort + "/cxf/translate"); try { - Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); - GreeterService greeterService = JAXRSClientFactory.create("http://localhost:" + webPort + "/greeter", - GreeterService.class); - GreeterInfo result = greeterService.greetMe("Chris"); - GreetingPhrase greeting = result.getGreetings().get(0); - Assert.assertEquals("Hello", greeting.getPhrase()); - Assert.assertEquals("Chris", greeting.getName()); + WebClient client = WebClient.create("http://localhost:" + webPort + "/cxf/translate/hello"); + String result = client.get(String.class); + Assert.assertEquals("hallo", result); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e.getMessage()); Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java?rev=1517758&r1=1517757&r2=1517758&view=diff ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java (original) +++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestExportService.java Tue Aug 27 07:54:22 2013 @@ -38,16 +38,16 @@ import org.apache.cxf.frontend.ClientPro import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; +import org.ops4j.pax.exam.junit.PaxExam; import org.osgi.framework.BundleContext; import static org.ops4j.pax.exam.CoreOptions.frameworkStartLevel; import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.systemProperty; -@RunWith(JUnit4TestRunner.class) +@RunWith(PaxExam.class) public class TestExportService extends AbstractDosgiTest { @Inject Modified: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java?rev=1517758&r1=1517757&r2=1517758&view=diff ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java (original) +++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/TestImportService.java Tue Aug 27 07:54:22 2013 @@ -40,10 +40,10 @@ import org.apache.cxf.frontend.ServerFac import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.Configuration; -import org.ops4j.pax.exam.junit.JUnit4TestRunner; -import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles; +import org.ops4j.pax.exam.junit.PaxExam; +import org.ops4j.pax.tinybundles.core.TinyBundles; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; import org.osgi.framework.ServiceReference; @@ -53,7 +53,7 @@ import static org.ops4j.pax.exam.CoreOpt import static org.ops4j.pax.exam.CoreOptions.provision; import static org.ops4j.pax.exam.CoreOptions.systemProperty; -@RunWith(JUnit4TestRunner.class) +@RunWith(PaxExam.class) public class TestImportService extends AbstractDosgiTest { @Inject @@ -79,7 +79,7 @@ public class TestImportService extends A } protected static InputStream createServiceConsumerBundle() { - return TinyBundles.newBundle() + return TinyBundles.bundle() .add(MyActivator.class) .add(MyServiceTracker.class) .add(StartServiceTracker.class) @@ -109,7 +109,6 @@ public class TestImportService extends A // a service property. // Set up a Server in the test - Thread.sleep(10000); ServerFactoryBean factory = new ServerFactoryBean(); factory.setServiceClass(GreeterService.class); factory.setAddress("http://localhost:9191/grrr"); @@ -127,6 +126,7 @@ public class TestImportService extends A bundleContext.registerService(Object.class.getName(), new Object(), props); // Wait for the service tracker in the test bundle to register a service with the test result + @SuppressWarnings("rawtypes") ServiceReference ref = waitService(bundleContext, String.class, "(testResult=test1)", 20); Assert.assertEquals("HiOSGi;exception", ref.getProperty("result")); } finally { Added: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java?rev=1517758&view=auto ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java (added) +++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java Tue Aug 27 07:54:22 2013 @@ -0,0 +1,34 @@ +/** + * 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. + */ +package org.apache.cxf.dosgi.systests2.multi.rest; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; + +public interface RestTranslate { + + @GET + String englishWords(); + + @GET + @Path("/{word}") + String getTranslation(@PathParam("word") String word); + +} Propchange: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslate.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java?rev=1517758&view=auto ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java (added) +++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java Tue Aug 27 07:54:22 2013 @@ -0,0 +1,41 @@ +/** + * 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. + */ +package org.apache.cxf.dosgi.systests2.multi.rest; + +import java.util.HashMap; +import java.util.Map; + +public class RestTranslateImpl implements RestTranslate { + Map translation; + + public RestTranslateImpl() { + translation = new HashMap(); + translation.put("hello", "hallo"); + } + + @Override + public String englishWords() { + return translation.keySet().toString(); + } + + @Override + public String getTranslation(String word) { + return translation.get(word); + } +} Propchange: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/RestTranslateImpl.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java?rev=1517758&view=auto ============================================================================== --- cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java (added) +++ cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java Tue Aug 27 07:54:22 2013 @@ -0,0 +1,40 @@ +/** + * 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. + */ +package org.apache.cxf.dosgi.systests2.multi.rest; + +import java.util.Dictionary; +import java.util.Hashtable; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class TranslateActivator implements BundleActivator { + + public void start(BundleContext context) throws Exception { + Dictionary props = new Hashtable(); + props.put("service.exported.interfaces", "*"); + props.put("service.exported.configs", "org.apache.cxf.rs"); + props.put("service.exported.intents", "HTTP"); + props.put("org.apache.cxf.rs.address", "/translate"); + context.registerService(RestTranslate.class.getName(), new RestTranslateImpl(), props); + } + + public void stop(BundleContext context) throws Exception { + } +} Propchange: cxf/dosgi/trunk/systests2/multi-bundle/src/test/java/org/apache/cxf/dosgi/systests2/multi/rest/TranslateActivator.java ------------------------------------------------------------------------------ svn:mime-type = text/plain