use of org.apache.cxf.transport.jms.JMSDestination in project tesb-rt-se by Talend.
the class CallbackActionInterceptor method handleAddressing.
private void handleAddressing(SoapMessage message) {
final AddressingProperties maps = (AddressingProperties) message.getContextualProperty(JAXWSAConstants.ADDRESSING_PROPERTIES_INBOUND);
if (maps == null) {
return;
}
final EndpointReferenceType rpl = maps.getReplyTo();
if (rpl == null) {
return;
}
final AttributedURIType addr = rpl.getAddress();
if (addr == null) {
return;
}
final String replyTo = addr.getValue();
final Exchange exchange = message.getExchange();
if (exchange.getDestination() instanceof JMSDestination) {
ContextUtils.storePartialResponseSent(message);
if (!exchange.isOneWay()) {
exchange.setOneWay(true);
}
} else {
if (exchange.isOneWay()) {
if (!Names.WSA_NONE_ADDRESS.equals(replyTo)) {
// disable creation of "partial" response
// by CXF decoupled response feature
exchange.setOneWay(false);
}
} else {
// and convert it afterwards to one-way.
if (Names.WSA_NONE_ADDRESS.equals(replyTo)) {
addr.setValue(Names.WSA_ANONYMOUS_ADDRESS);
}
}
}
}
use of org.apache.cxf.transport.jms.JMSDestination in project tesb-rt-se by Talend.
the class DurableSubscriptionFeature method initialize.
@Override
public void initialize(Server server, Bus bus) {
Destination destination = server.getDestination();
if (destination instanceof JMSDestination) {
JMSConfiguration jmsConfig = ((JMSDestination) destination).getJmsConfig();
updateJMSConfig(jmsConfig);
}
}
use of org.apache.cxf.transport.jms.JMSDestination in project tesb-rt-se by Talend.
the class DurableSubscriptionFeatureTest method testDurableSubscriptionFeature2.
@Test
public void testDurableSubscriptionFeature2() throws Exception {
DurableSubscriptionFeature f = new DurableSubscriptionFeature();
f.setDurableSubscriptionName("durableSubscriptionName");
f.setDurableSubscriptionClientId("durableSubscriptionClientId");
JMSConfiguration jmsConfig = new JMSConfiguration();
JMSDestination destination = createMock(JMSDestination.class);
expect(destination.getJmsConfig()).andReturn(jmsConfig).anyTimes();
replay(destination);
Server server = createMock(Server.class);
expect(server.getDestination()).andReturn(destination).anyTimes();
replay(server);
Bus bus = createNiceMock(Bus.class);
f.initialize(server, bus);
assertSame("durableSubscriptionName", jmsConfig.getDurableSubscriptionName());
assertSame("durableSubscriptionClientId", jmsConfig.getDurableSubscriptionClientId());
}
Aggregations