Package org.jboss.invocation

Examples of org.jboss.invocation.InterceptorFactoryContext


    private Object readResolve() throws ObjectStreamException {
        ServiceName name = ServiceName.parse(serviceName);
        ServiceController<?> service = currentServiceContainer().getRequiredService(name);
        StatefulSessionComponent component = (StatefulSessionComponent) service.getValue();
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();

        for(final Map.Entry<Object, Object> entry : serializableInterceptors.entrySet()) {
            AtomicReference<ManagedReference> referenceReference = new AtomicReference<ManagedReference>(new ValueManagedReference(new ImmediateValue<Object>(entry.getValue())));
            context.getContextData().put(entry.getKey(), referenceReference);
        }
        context.getContextData().put(SessionID.class, sessionID);
        return component.constructComponentInstance(instance, false, context);
    }
View Full Code Here


    }

    protected Interceptor createInterceptor(final InterceptorFactory factory) {
        if (factory == null)
            return null;
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();
        context.getContextData().put(Component.class, this);
        return factory.create(context);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public synchronized void start() {
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();
        context.getContextData().put(Component.class, this);
        createInterceptors(context);


        this.stopping.set(false);
        gate = true;
View Full Code Here

    }

    protected Interceptor createInterceptor(final InterceptorFactory factory) {
        if (factory == null)
            return null;
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();
        context.getContextData().put(Component.class, this);
        return factory.create(context);
    }
View Full Code Here

    private Object readResolve() throws ObjectStreamException {
        ServiceName name = ServiceName.parse(serviceName);
        ServiceController<?> service = CurrentServiceContainer.getServiceContainer().getRequiredService(name);
        StatefulSessionComponent component = (StatefulSessionComponent) service.getValue();
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();

        for(final Map.Entry<Object, Object> entry : serializableInterceptors.entrySet()) {
            AtomicReference<ManagedReference> referenceReference = new AtomicReference<ManagedReference>(new ValueManagedReference(new ImmediateValue<Object>(entry.getValue())));
            context.getContextData().put(entry.getKey(), referenceReference);
        }
        context.getContextData().put(SessionID.class, sessionID);
        return component.constructComponentInstance(instance, false, context);
    }
View Full Code Here

        this.transactionEntityMap = ejbComponentCreateService.getTransactionEntityMap();
        this.cmp10 = ejbComponentCreateService.getEntityMetaData().isCMP1x();
    }

    protected BasicComponentInstance instantiateComponentInstance(final AtomicReference<ManagedReference> instanceReference, final Interceptor preDestroyInterceptor, final Map<Method, Interceptor> methodInterceptors, final InterceptorFactoryContext interceptorContext) {
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();
        context.getContextData().put(Component.class, this);
        final Interceptor interceptor = relationInterceptorFactory.create(context);
        return new CmpEntityBeanComponentInstance(this, instanceReference, preDestroyInterceptor, methodInterceptors, interceptor);
    }
View Full Code Here

     * Perform any pre-destroy life-cycle routines found on class level interceptors.  By default it will invoke all pre-destroy methods.
     *
     * @param instance The bean instance
     */
    protected void performInterceptorPreDestroyLifecycle(final ComponentInstance instance) {
        final InterceptorFactoryContext interceptorFactoryContext = instance.getInterceptorFactoryContext();
        for (Map.Entry<Class<?>, List<LifecycleInterceptorFactory>> entry : interceptorPreDestroys.entrySet()) {
            final Class<?> interceptorClass = entry.getKey();
            final Object interceptorInstance = interceptorFactoryContext.getContextData().get(interceptorClass);
            if (interceptorInstance == null) {
                throw new RuntimeException("Failed to perform PreDestroy method.  No instance found for interceptor class " + interceptorClass);
            }

            final List<Interceptor> preDestroys = new ArrayList<Interceptor>();
View Full Code Here

    private Object readResolve() throws ObjectStreamException {
        ServiceName name = ServiceName.parse(serviceName);
        ServiceController<?> service = currentServiceContainer().getRequiredService(name);
        StatefulSessionComponent component = (StatefulSessionComponent) service.getValue();
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();

        for(final Map.Entry<Object, Object> entry : serializableInterceptors.entrySet()) {
            AtomicReference<ManagedReference> referenceReference = new AtomicReference<ManagedReference>(new ValueManagedReference(new ImmediateValue<Object>(entry.getValue())));
            context.getContextData().put(entry.getKey(), referenceReference);
        }
        context.getContextData().put(SessionID.class, sessionID);
        return component.constructComponentInstance(instance, false, context);
    }
View Full Code Here

        this.transactionEntityMap = ejbComponentCreateService.getTransactionEntityMap();
        this.cmp10 = ejbComponentCreateService.getEntityMetaData().isCMP1x();
    }

    protected BasicComponentInstance instantiateComponentInstance(final AtomicReference<ManagedReference> instanceReference, final Interceptor preDestroyInterceptor, final Map<Method, Interceptor> methodInterceptors, final InterceptorFactoryContext interceptorContext) {
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();
        context.getContextData().put(Component.class, this);
        final Interceptor interceptor = relationInterceptorFactory.create(context);
        return new CmpEntityBeanComponentInstance(this, instanceReference, preDestroyInterceptor, methodInterceptors, interceptor);
    }
View Full Code Here

        this.transactionEntityMap = ejbComponentCreateService.getTransactionEntityMap();
        this.cmp10 = ejbComponentCreateService.getEntityMetaData().isCMP1x();
    }

    protected BasicComponentInstance instantiateComponentInstance(final AtomicReference<ManagedReference> instanceReference, final Interceptor preDestroyInterceptor, final Map<Method, Interceptor> methodInterceptors, final InterceptorFactoryContext interceptorContext) {
        final InterceptorFactoryContext context = new SimpleInterceptorFactoryContext();
        context.getContextData().put(Component.class, this);
        final Interceptor interceptor = relationInterceptorFactory.create(context);
        return new CmpEntityBeanComponentInstance(this, instanceReference, preDestroyInterceptor, methodInterceptors, interceptor);
    }
View Full Code Here

TOP

Related Classes of org.jboss.invocation.InterceptorFactoryContext

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.