use of org.apache.cxf.transport.jms.ConnectionFactoryFeature in project cxf by apache.
the class Server method publishEndpoint.
/**
* If you prefer to define the ConnectionFactory directly instead of using a JNDI look.
* // You can inject is like this:
* @param impl
* @param cf
*/
protected void publishEndpoint(Object impl, ConnectionFactory cf) {
EndpointImpl epi = (EndpointImpl) Endpoint.create(impl);
epi.setFeatures(Collections.singletonList(new ConnectionFactoryFeature(cf)));
epi.publish();
}
use of org.apache.cxf.transport.jms.ConnectionFactoryFeature in project cxf by apache.
the class JmsServiceTest method greeterJms.
private static Greeter greeterJms() {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(Greeter.class);
factory.setAddress("jms:queue:greeter");
ConnectionFactory connectionFactory = createConnectionFactory();
factory.setFeatures(Collections.singletonList(new ConnectionFactoryFeature(connectionFactory)));
return factory.create(Greeter.class);
}
use of org.apache.cxf.transport.jms.ConnectionFactoryFeature in project cxf by apache.
the class JmsTestActivator method publishService.
private Server publishService(ConnectionFactory connectionFactory) {
JaxWsServerFactoryBean factory = new JaxWsServerFactoryBean();
factory.setServiceClass(Greeter.class);
factory.setAddress("jms:queue:greeter");
factory.setFeatures(Collections.singletonList(new ConnectionFactoryFeature(connectionFactory)));
factory.setServiceBean(new GreeterImpl());
return factory.create();
}
use of org.apache.cxf.transport.jms.ConnectionFactoryFeature in project cxf by apache.
the class AbstractVmJMSTest method startBusAndJMS.
public static void startBusAndJMS(String brokerURI) {
bus = BusFactory.getDefaultBus();
ActiveMQConnectionFactory cf1 = new ActiveMQConnectionFactory(brokerURI);
RedeliveryPolicy redeliveryPolicy = new RedeliveryPolicy();
redeliveryPolicy.setMaximumRedeliveries(1);
redeliveryPolicy.setInitialRedeliveryDelay(1000);
cf1.setRedeliveryPolicy(redeliveryPolicy());
cf = new PooledConnectionFactory(cf1);
cff = new ConnectionFactoryFeature(cf);
}
use of org.apache.cxf.transport.jms.ConnectionFactoryFeature in project cxf by apache.
the class MultiTransportClientServerTest method startServers.
@BeforeClass
public static void startServers() throws Exception {
bus = BusFactory.getDefaultBus();
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
cff = new ConnectionFactoryFeature(cfp);
String address = "http://localhost:" + PORT + "/SOAPDocLitService/SoapPort";
Endpoint.publish(address, new HTTPGreeterImpl());
EndpointImpl ep1 = (EndpointImpl) Endpoint.create(new JMSGreeterImpl());
ep1.setBus(bus);
ep1.getFeatures().add(cff);
ep1.publish();
}
Aggregations