@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(); }
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); }
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); }
@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(); }