callbackdestName = (replyTo instanceof Queue) ? ((Queue) replyTo).getQueueName() : ((Topic) replyTo).getTopicName();
}
} else {
if (callbackdestName != null) {
if (!callbackdestName.startsWith("jms:jndi:")) {
throw new JMSBindingException("message property " + JMSBindingConstants.CALLBACK_Q_PROPERTY + " does not start with 'jms:jndi:' found: " + callbackdestName);
} else {
callbackdestName = callbackdestName.substring(9);
}
}
}
if (callbackdestName != null) {
List<EndpointReference> refs = endpoint.getCallbackEndpointReferences();
for (EndpointReference ref : refs ) {
if (ref.getBinding() instanceof JMSBinding ) {
JMSBinding callbackBinding = (JMSBinding) ref.getBinding();
callbackBinding.setDestinationName(callbackdestName);
}
}
}
String callbackID = jmsMsg.getStringProperty(JMSBindingConstants.CALLBACK_ID_PROPERTY);
if (callbackID != null) {
// parameters.setCallbackID(callbackID);
}
}
} catch (JMSException e) {
throw new JMSBindingException(e);
}
return msg;
}