Message message = (Message) command;
message.setProducerId(message.getMessageId().getProducerId());
}
command.setResponseRequired(true);
if (connection != null) {
Response response = connection.service(command);
if (response != null && response.isException()) {
ExceptionResponse er = (ExceptionResponse) response;
throw JMSExceptionSupport.create(er.getException());
}
return response;
}
else if (transport != null) {
Response response = (Response) transport.request(command);
if (response != null && response.isException()) {
ExceptionResponse er = (ExceptionResponse) response;
throw JMSExceptionSupport.create(er.getException());
}
return response;
}