int sequenceNumber = SequenceNumberGenerator.getNextSequenceNumber();
_methodInvocationListener.operationIsGoingToBeInvoked(new InvocationEvent(this,sequenceNumber,_exchangeChannelForMethodInvocations));
_service.invoke(_parent.getName(), _name, _hash,objectId,parameters, method,sequenceNumber,objectId.getBankId(),objectId.getBrokerId());
InvocationResult result = _exchangeChannelForMethodInvocations.poll(5000,TimeUnit.MILLISECONDS);
if (result == null)
{
throw new TimeoutException();
}
Map<String, Object> output = method.decodeParameters(result.getOutputAndBidirectionalArgumentValues());
result.setOutputSection(output);
Log.logMethodInvocationResult(result);
if (result.isException())
{
result.createAndThrowException();
}
return result;
} finally
{
_service.close();