* @return a message exchange factory
*/
public MessageExchangeFactory createExchangeFactory() {
MessageExchangeFactoryImpl result = createMessageExchangeFactory();
result.setContext(context);
ActivationSpec activationSpec = context.getActivationSpec();
if (activationSpec != null) {
String componentName = context.getComponentNameSpace().getName();
// lets auto-default the container-routing information
QName serviceName = activationSpec.getDestinationService();
if (serviceName != null) {
result.setServiceName(serviceName);
LOGGER.debug("default destination serviceName for {} = {}", componentName, serviceName);
}
QName interfaceName = activationSpec.getDestinationInterface();
if (interfaceName != null) {
result.setInterfaceName(interfaceName);
LOGGER.debug("default destination interfaceName for {} = {}", componentName, interfaceName);
}
QName operationName = activationSpec.getDestinationOperation();
if (operationName != null) {
result.setOperationName(operationName);
LOGGER.debug("default destination operationName for {} = {}", componentName, operationName);
}
String endpointName = activationSpec.getDestinationEndpoint();
if (endpointName != null) {
boolean endpointSet = false;
LOGGER.debug("default destination endpointName for {} = {}", componentName, endpointName);
if (serviceName != null && endpointName != null) {
endpointName = endpointName.trim();