Search in sources :

Example 1 with TestingSubscriptionManager

use of org.apache.cxf.ws.eventing.base.services.TestingSubscriptionManager in project cxf by apache.

the class SimpleEventingIntegrationTest method setUpBeforeClass.

/**
 * Prepares the Event Source and Subscription Manager services
 */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
    bus = BusFactory.getDefaultBus();
    // create and publish event source
    JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
    factory.setBus(bus);
    factory.setServiceBean(new TestingEventSource());
    factory.setAddress(URL_EVENT_SOURCE);
    factory.setTransportId(LocalTransportFactory.TRANSPORT_ID);
    eventSource = factory.create();
    // create and publish subscription manager
    factory = new JaxWsServerFactoryBean();
    factory.setBus(bus);
    factory.setServiceBean(new TestingSubscriptionManager());
    factory.setAddress(URL_SUBSCRIPTION_MANAGER);
    factory.setTransportId(LocalTransportFactory.TRANSPORT_ID);
    subscriptionManager = factory.create();
    new LoggingFeature().initialize(subscriptionManager, bus);
}
Also used : TestingSubscriptionManager(org.apache.cxf.ws.eventing.base.services.TestingSubscriptionManager) LoggingFeature(org.apache.cxf.ext.logging.LoggingFeature) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean) TestingEventSource(org.apache.cxf.ws.eventing.base.services.TestingEventSource) BeforeClass(org.junit.BeforeClass)

Aggregations

LoggingFeature (org.apache.cxf.ext.logging.LoggingFeature)1 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)1 TestingEventSource (org.apache.cxf.ws.eventing.base.services.TestingEventSource)1 TestingSubscriptionManager (org.apache.cxf.ws.eventing.base.services.TestingSubscriptionManager)1 BeforeClass (org.junit.BeforeClass)1