Examples of EZBEventBeanInvocation


Examples of org.ow2.easybeans.api.event.bean.EZBEventBeanInvocation

            public synchronized void handle(final IEvent event) {
                if (EZBEventBeanInvocationBegin.class.isAssignableFrom(event.getClass())) {
                    EZBEventBeanInvocationBegin e = (EZBEventBeanInvocationBegin) event;
                    MeanCallTimeStatistic.this.pendingCall.put(Long.valueOf(e.getInvocationNumber()), e);
                } else {
                    EZBEventBeanInvocation eventEnd = (EZBEventBeanInvocation) event;
                    EZBEventBeanInvocation eventBegin =
                        MeanCallTimeStatistic.this.pendingCall.remove(Long.valueOf(eventEnd.getInvocationNumber()));

                    MeanCallTimeStatistic.this.count++;
                    MeanCallTimeStatistic.this.total += eventEnd.getTime() - eventBegin.getTime();
                    setLastSampleTime(System.currentTimeMillis());
                }
            }
View Full Code Here

Examples of org.ow2.easybeans.api.event.bean.EZBEventBeanInvocation

        // 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);
        }

        // Invoke method
        try {
View Full Code Here

Examples of org.ow2.easybeans.api.event.bean.EZBEventBeanInvocation

        }

        // Create the bean invocation begin event.
        String methodEventProviderId = getMDBMessageEndPointFactory().getJ2EEManagedObjectId() + "/"
                + J2EEManagedObjectNamingHelper.getMethodSignature(method);
        EZBEventBeanInvocation event = getMDBMessageEndPointFactory().getInvocationEventBegin(methodEventProviderId, args);
        long number = event.getInvocationNumber();
        this.eventDispatcher.dispatch(event);
        EZBEventBeanInvocation endEvent = null;

        Method mdbMethod = null;
        // Bean is implementing the interface, keep the given method
        if (this.listenerInterface.isInstance(getEasyBeansMDB())) {
            mdbMethod = method;
View Full Code Here

Examples of org.ow2.easybeans.api.event.bean.EZBEventBeanInvocation

        // Dispatch the bean invocation begin event.
        String methodEventProviderId = getJ2EEManagedObjectId() + "/" + J2EEManagedObjectNamingHelper.getMethodSignature(m)
                    + "@Local";
        boolean enabledEvent = !localCallRequest.isCalledFromRemoteRequest();

        EZBEventBeanInvocation event = null;
        long number = 0;

        // Invocation ID
        IAuditID previousID = null;
        // Compute and send begin event only if required
        if (enabledEvent) {
            if (getCurrentInvocationID() != null) {
                previousID = getCurrentInvocationID().newInvocation();
            }
            event = getInvocationEventBegin(methodEventProviderId, localCallRequest.getMethodArgs());
            number = event.getInvocationNumber();
            getEventDispatcher().dispatch(event);
        }

        synchronized (bean) {
            try {
View Full Code Here

Examples of org.ow2.easybeans.api.event.bean.EZBEventBeanInvocation

            public synchronized void handle(final IEvent event) {
                if (EZBEventBeanInvocationBegin.class.isAssignableFrom(event.getClass())) {
                    EZBEventBeanInvocationBegin e = (EZBEventBeanInvocationBegin) event;
                    TotalCallTimeStatistic.this.pendingCall.put(Long.valueOf(e.getInvocationNumber()), e);
                } else {
                    EZBEventBeanInvocation eventEnd = (EZBEventBeanInvocation) event;
                    EZBEventBeanInvocation eventBegin =
                        TotalCallTimeStatistic.this.pendingCall.remove(Long.valueOf(eventEnd.getInvocationNumber()));

                    TotalCallTimeStatistic.this.total += eventEnd.getTime() - eventBegin.getTime();
                    setLastSampleTime(System.currentTimeMillis());
                }
            }
View Full Code Here

Examples of org.ow2.easybeans.api.event.bean.EZBEventBeanInvocation

        }

        // Dispatch the bean invocation begin event.
        String methodEventProviderId = getJ2EEManagedObjectId() + "/"
            + J2EEManagedObjectNamingHelper.getMethodSignature(calledMethod) + "@Remote";
        EZBEventBeanInvocation event = getInvocationEventBegin(methodEventProviderId, args);
        long number = event.getInvocationNumber();
        getEventDispatcher().dispatch(event);

        try {
            EJBLocalRequestImpl localRequest = new EJBLocalRequestImpl(request.getMethodHash(), args, request.getBeanId(), request
                    .getInvokedBusinessInterfaceName());
View Full Code Here

Examples of org.ow2.easybeans.api.event.bean.EZBEventBeanInvocation

        // 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
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.