if(dests != null && dests.isEmpty()) {
// don't send if dest list is empty
if(log.isTraceEnabled())
log.trace(new StringBuilder("destination list of ").append(method_call.getName()).
append("() is empty: no need to send message"));
return new RspList();
}
if(log.isTraceEnabled())
log.trace(new StringBuilder("dests=").append(dests).append(", method_call=").append(method_call).
append(", mode=").append(mode).append(", timeout=").append(timeout));
Object buf;
try {
buf=req_marshaller != null? req_marshaller.objectToBuffer(method_call) : Util.objectToByteBuffer(method_call);
}
catch(Exception e) {
// if(log.isErrorEnabled()) log.error("exception", e);
// we will change this in 2.4 to add the exception to the signature
// (see http://jira.jboss.com/jira/browse/JGRP-193). The reason for a RTE is that we cannot change the
// signature in 2.3, otherwise 2.3 would be *not* API compatible to prev releases
throw new RuntimeException("failure to marshal argument(s)", e);
}
Message msg=new Message();
if(buf instanceof Buffer)
msg.setBuffer((Buffer)buf);
else
msg.setBuffer((byte[])buf);
if(oob)
msg.setFlag(Message.OOB);
RspList retval=super.castMessage(dests, msg, mode, timeout, use_anycasting, filter);
if(log.isTraceEnabled()) log.trace("responses: " + retval);
return retval;
}