// Dispatch the bean invocation begin event.
String methodEventProviderId = getJ2EEManagedObjectId() + "/" + J2EEManagedObjectNamingHelper.getMethodSignature(m)
+ "@Local";
boolean enabledEvent = !localCallRequest.isCalledFromRemoteRequest();
EZBEventBeanInvocation event = null;
long number = 0;
IAuditID previousID = null;
// Compute and send begin event only if required
if (enabledEvent) {
// Invocation ID
if (getCurrentInvocationID() != null) {
previousID = getCurrentInvocationID().newInvocation();
}
event = getInvocationEventBegin(methodEventProviderId, localCallRequest.getMethodArgs());
number = event.getInvocationNumber();
getEventDispatcher().dispatch(event);
}
// TODO: manage lock per method and read or write lock !
// for now, use only write lock