Search in sources :

Example 1 with ManagedApiFeature

use of io.fabric8.cxf.endpoint.ManagedApiFeature in project fabric8 by jboss-fuse.

the class RestJsonSchemaJMXTest method setUp.

@Before
public void setUp() {
    SpringBusFactory bf = new SpringBusFactory();
    Bus bus = bf.createBus("/io/fabric8/cxf/endpoint/jaxrs/jmx-enable.xml");
    BusFactory.setDefaultBus(bus);
    JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
    sf.setResourceClasses(BookStore.class, BookStoreSpring.class);
    sf.setResourceProvider(BookStore.class, new SingletonResourceProvider(new BookStore(), true));
    sf.setResourceProvider(BookStoreSpring.class, new SingletonResourceProvider(new BookStoreSpring(), true));
    sf.setTransportId(LocalTransportFactory.TRANSPORT_ID);
    sf.setAddress("local://books");
    sf.getFeatures().add(new ManagedApiFeature());
    localServer = sf.create();
}
Also used : Bus(org.apache.cxf.Bus) SpringBusFactory(org.apache.cxf.bus.spring.SpringBusFactory) ManagedApiFeature(io.fabric8.cxf.endpoint.ManagedApiFeature) JAXRSServerFactoryBean(org.apache.cxf.jaxrs.JAXRSServerFactoryBean) SingletonResourceProvider(org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider) Before(org.junit.Before)

Example 2 with ManagedApiFeature

use of io.fabric8.cxf.endpoint.ManagedApiFeature in project fabric8 by fabric8io.

the class RestJsonSchemaJMXTest method setUp.

@Before
public void setUp() {
    SpringBusFactory bf = new SpringBusFactory();
    Bus bus = bf.createBus("/io/fabric8/cxf/endpoint/jaxrs/jmx-enable.xml");
    BusFactory.setDefaultBus(bus);
    JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
    sf.setResourceClasses(BookStore.class, BookStoreSpring.class);
    sf.setResourceProvider(BookStore.class, new SingletonResourceProvider(new BookStore(), true));
    sf.setResourceProvider(BookStoreSpring.class, new SingletonResourceProvider(new BookStoreSpring(), true));
    sf.setTransportId(LocalTransportFactory.TRANSPORT_ID);
    sf.setAddress("local://books");
    sf.getFeatures().add(new ManagedApiFeature());
    localServer = sf.create();
}
Also used : Bus(org.apache.cxf.Bus) SpringBusFactory(org.apache.cxf.bus.spring.SpringBusFactory) ManagedApiFeature(io.fabric8.cxf.endpoint.ManagedApiFeature) JAXRSServerFactoryBean(org.apache.cxf.jaxrs.JAXRSServerFactoryBean) SingletonResourceProvider(org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider) Before(org.junit.Before)

Aggregations

ManagedApiFeature (io.fabric8.cxf.endpoint.ManagedApiFeature)2 Bus (org.apache.cxf.Bus)2 SpringBusFactory (org.apache.cxf.bus.spring.SpringBusFactory)2 JAXRSServerFactoryBean (org.apache.cxf.jaxrs.JAXRSServerFactoryBean)2 SingletonResourceProvider (org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider)2 Before (org.junit.Before)2