use of org.apache.cxf.transport.jms.ConnectionFactoryFeature in project cxf by apache.
the class ClientMtomXopWithJMSTest method startServers.
@BeforeClass
public static void startServers() throws Exception {
Object implementor = new TestMtomJMSImpl();
bus = BusFactory.getDefaultBus();
ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
PooledConnectionFactory cfp = new PooledConnectionFactory(cf);
cff = new ConnectionFactoryFeature(cfp);
EndpointImpl ep = (EndpointImpl) Endpoint.create(implementor);
ep.getFeatures().add(cff);
ep.getInInterceptors().add(new TestMultipartMessageInterceptor());
ep.getOutInterceptors().add(new TestAttachmentOutInterceptor());
// ep.getInInterceptors().add(new LoggingInInterceptor());
// ep.getOutInterceptors().add(new LoggingOutInterceptor());
SOAPBinding jaxWsSoapBinding = (SOAPBinding) ep.getBinding();
jaxWsSoapBinding.setMTOMEnabled(true);
ep.publish();
}
use of org.apache.cxf.transport.jms.ConnectionFactoryFeature in project cxf by apache.
the class JMSTransactionTest method startBusAndJMS.
public static void startBusAndJMS(String brokerURI) {
try {
transactionManager = new GeronimoTransactionManager();
} catch (XAException e) {
throw new IllegalStateException(e.getMessage(), e);
}
bus = BusFactory.getDefaultBus();
registerTransactionManager();
ActiveMQXAConnectionFactory cf1 = new ActiveMQXAConnectionFactory(brokerURI);
cf1.setRedeliveryPolicy(redeliveryPolicy());
JcaPooledConnectionFactory pcf = new JcaPooledConnectionFactory();
pcf.setTransactionManager(transactionManager);
pcf.setConnectionFactory(cf1);
cf = pcf;
cff = new ConnectionFactoryFeature(pcf);
}
Aggregations