Package org.jboss.as.ee.component.interceptors

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


                return context.proceed();
            }
            boolean ok = false;
            try {
                valueReference.set(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


    }

    @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

    }

    @Override
    public Object processInvocation(final InterceptorContext context) throws Exception {
        SessionBeanComponentInstance instance = (SessionBeanComponentInstance) context.getPrivateData(ComponentInstance.class);
        final InvocationType invocationType = context.getPrivateData(InvocationType.class);
        try {
            context.putPrivateData(InvocationType.class, InvocationType.DEPENDENCY_INJECTION);
            ((SessionBean) context.getTarget()).setSessionContext(instance.getEjbContext());
        } finally {
            context.putPrivateData(InvocationType.class, invocationType);
View Full Code Here

        }
    }

    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

            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

    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

            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

            public Object processInvocation(final InterceptorContext context) throws Exception {

                //grab a bean from the pool to invoke the business method on
                final EntityBeanComponentInstance instance = component.acquireUnAssociatedInstance();
                final Object result;
                final InvocationType invocationType = context.getPrivateData(InvocationType.class);
                try {
                    context.putPrivateData(InvocationType.class, InvocationType.HOME_METHOD);
                    //forward the invocation to the component interceptor chain
                    Method oldMethod = context.getMethod();
                    try {
View Full Code Here

        this.actions = actions;
    }

    @Override
    public Object processInvocation(final InterceptorContext context) throws Exception {
        final InvocationType invocationType = context.getPrivateData(InvocationType.class);
        if(invocationType == null) {
            return context.proceed();
        }
        switch (invocationType) {
            case TIMER:
View Full Code Here

        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

Related Classes of org.jboss.as.ee.component.interceptors.InvocationType

Copyright © 2018 www.massapicom. 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.