You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bi...@apache.org on 2015/12/22 14:27:59 UTC
cxf git commit: Make the osgi test bookstore a good example of
launching a service in OSGi.
Repository: cxf
Updated Branches:
refs/heads/3.1.x-fixes 60e98931d -> 18d64577e
Make the osgi test bookstore a good example of launching a service in OSGi.
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/18d64577
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/18d64577
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/18d64577
Branch: refs/heads/3.1.x-fixes
Commit: 18d64577e5ef1ef3ce26e82db1821b894bd43578
Parents: 60e9893
Author: Benson Margulies <be...@basistech.com>
Authored: Tue Dec 22 08:27:31 2015 -0500
Committer: Benson Margulies <be...@basistech.com>
Committed: Tue Dec 22 08:27:31 2015 -0500
----------------------------------------------------------------------
.../java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java | 1 -
.../org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/18d64577/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java
----------------------------------------------------------------------
diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java
index dab117b..ccccdcc 100644
--- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java
+++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsServiceTest.java
@@ -73,7 +73,6 @@ public class JaxRsServiceTest extends CXFOSGiTestSupport {
Assert.assertNotNull(response.getLocation());
}
- //@Ignore("this passes with Karaf 4, but not with the test rig here.")
@Test
public void postWithValidation() throws Exception {
Book book = new Book();
http://git-wip-us.apache.org/repos/asf/cxf/blob/18d64577/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java
----------------------------------------------------------------------
diff --git a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java
index 8613f1d..15349be 100644
--- a/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java
+++ b/osgi/itests/src/test/java/org/apache/cxf/osgi/itests/jaxrs/JaxRsTestActivator.java
@@ -18,6 +18,8 @@
*/
package org.apache.cxf.osgi.itests.jaxrs;
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
import org.osgi.framework.BundleActivator;
@@ -29,7 +31,10 @@ public class JaxRsTestActivator implements BundleActivator {
@Override
public void start(BundleContext arg0) throws Exception {
+ Bus bus = BusFactory.newInstance().createBus();
+ bus.setExtension(JaxRsTestActivator.class.getClassLoader(), ClassLoader.class);
JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
+ sf.setBus(bus);
sf.setResourceClasses(BookStore.class);
sf.setAddress("/jaxrs");
server = sf.create();