Examples of InvocationType


Examples of org.jboss.as.ee.component.interceptors.InvocationType

    }

    @Override
    public Object processInvocation(final InterceptorContext context) throws Exception {

        final InvocationType marker = context.getPrivateData(InvocationType.class);
        if (!alwaysActivate && (marker == null || !INVOCATION_TYPES.contains(marker))) {
            return context.proceed();
        }

        //create the context lazily, on the first invocation
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

            public Object processInvocation(final InterceptorContext context) throws Exception {

                //grab a bean from the pool to invoke the finder method on
                final EntityBeanComponentInstance instance = component.acquireUnAssociatedInstance();
                final Object result;
                final InvocationType invocationType = context.getPrivateData(InvocationType.class);
                try {
                    context.putPrivateData(InvocationType.class, InvocationType.FINDER_METHOD);
                    result = invokeFind(context, instance);
                    return prepareResults(context, result, component);
                } finally {
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

        //we remove them immediately, so they are not set for the rest of the invocation
        //TODO: find a better way to handle this
        SessionBeanHomeInterceptorFactory.INIT_METHOD.remove();
        SessionBeanHomeInterceptorFactory.INIT_PARAMETERS.remove();
        if (method != null) {
            final InvocationType invocationType = context.getPrivateData(InvocationType.class);
            try {
                context.putPrivateData(InvocationType.class, InvocationType.SFSB_INIT_METHOD);
                method.invoke(context.getTarget(), params);
            } catch (InvocationTargetException e) {
                if (CreateException.class.isAssignableFrom(e.getCause().getClass())) {
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

            throw Interceptors.rethrow(e.getCause());
        }
    }

    protected Object invokeEjbCreate(final InterceptorContext context, final Method ejbCreate, final EntityBeanComponentInstance instance, final Object[] params) throws Exception {
        final InvocationType invocationType = context.getPrivateData(InvocationType.class);
        try {
            context.putPrivateData(InvocationType.class, InvocationType.ENTITY_EJB_CREATE);
            return ejbCreate.invoke(instance.getInstance(), params);
        } catch (InvocationTargetException e) {
            throw Interceptors.rethrow(e.getCause());
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

*/
public class EjbSuspendInterceptor extends AbstractEJBInterceptor {

    @Override
    public Object processInvocation(InterceptorContext context) throws Exception {
        InvocationType invocation = context.getPrivateData(InvocationType.class);
        if (invocation != InvocationType.REMOTE && invocation != InvocationType.MESSAGE_DELIVERY) {
            return context.proceed();
        }
        EJBComponent component = getComponent(context, EJBComponent.class);
        ControlPoint entryPoint = component.getControlPoint();
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

        final Component component = context.getPrivateData(Component.class);
        if (!(component instanceof EJBComponent)) {
            return;
        }
        final InvocationType invocationType = context.getPrivateData(InvocationType.class);

        ((EJBComponent) component).getAllowedMethodsInformation().realCheckPermission(methodType, invocationType);

    }
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

        }
    }

    public void setupContext(final InterceptorContext interceptorContext) {

        final InvocationType invocationType = interceptorContext.getPrivateData(InvocationType.class);
        try {
            interceptorContext.putPrivateData(InvocationType.class, InvocationType.SET_ENTITY_CONTEXT);
            final EntityContextImpl entityContext = new EntityContextImpl(this);
            setEjbContext(entityContext);
            getInstance().setEntityContext(entityContext);
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

    protected Object invokeEjbCreate(final Map<Object, Object> contextData, final Method ejbCreate, final EntityBeanComponentInstance instance, final Object[] params) throws Exception {

        //there will always be an invocation
        //as this is only used from home invocations
        final InterceptorContext context = CurrentInvocationContext.get();
        final InvocationType invocationType = context.getPrivateData(InvocationType.class);
        try {
            context.putPrivateData(InvocationType.class, InvocationType.ENTITY_EJB_CREATE);
            return ejbCreate.invoke(instance.getInstance(), params);
        } catch (InvocationTargetException e) {
            throw Interceptors.rethrow(e.getCause());
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

                return context.proceed();
            }
            boolean ok = false;
            try {
                componentInstance.setInstanceData(valueKey, reference);
                final InvocationType invocationType = context.getPrivateData(InvocationType.class);
                try {
                    context.putPrivateData(InvocationType.class, InvocationType.DEPENDENCY_INJECTION);
                    method.invoke(target, reference.getInstance());
                } finally {
                    context.putPrivateData(InvocationType.class, invocationType);
View Full Code Here

Examples of org.jboss.as.ee.component.interceptors.InvocationType

        final Component component = context.getPrivateData(Component.class);
        if (!(component instanceof EJBComponent)) {
            return;
        }
        final InvocationType invocationType = context.getPrivateData(InvocationType.class);

        ((EJBComponent) component).getAllowedMethodsInformation().realCheckPermission(methodType, invocationType);

    }
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.