Examples of ItfCallbackLoggerAccess


Examples of org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.ItfCallbackLoggerAccess

     * @throws Exception if invocation fails
     */
    @SuppressWarnings("unchecked")
    public static <E> Object addValue(final InvocationContext invocationContext, final E value, final String className)
            throws Exception {
        ItfCallbackLoggerAccess beanLogger = getBeanRemoteInstance(SLSBCallbackLoggerAccess.class,
                ItfCallbackLoggerAccess.class);
        boolean added = false;

        Object[] arObj = invocationContext.getParameters();

        List<E> arOrder = null;

        if (arObj[0] instanceof List) {
            //Standard interceptor
            arOrder = (List<E>) arObj[0];
            added = arOrder.add(value);

        }else if (arObj[0] instanceof Message){
            //Log event
            beanLogger.insertCallbackLogger(invocationContext.getTarget().getClass().toString(), UNDEFINED, className);
            added = true;
        }

        // If can't add, throw an exception to avoid cascade errors.
        if (!added) {
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.