Package org.jboss.as.ejb3.component.interceptors

Examples of org.jboss.as.ejb3.component.interceptors.AbstractEJBInterceptor


    }

    @Override
    public Interceptor create(final InterceptorFactoryContext factoryContext) {

        return new AbstractEJBInterceptor() {
            @Override
            public Object processInvocation(final InterceptorContext context) throws Exception {
                final EntityBeanComponent component = getComponent(context, EntityBeanComponent.class);

                final Object primaryKey = context.getPrivateData(EntityBeanComponent.PRIMARY_KEY_CONTEXT_KEY);
View Full Code Here


    public EntityBeanHomeRemoveInterceptorFactory(final boolean remote) {
        this.remote = remote;
    }

    public Interceptor create(final InterceptorFactoryContext context) {
        return new AbstractEJBInterceptor() {
            public Object processInvocation(final InterceptorContext context) throws Exception {
                final EntityBeanComponent component = getComponent(context, EntityBeanComponent.class);
                if(remote) {
                    component.getEJBObject(context.getParameters()[0]).remove();
                } else {
View Full Code Here

*/
public class EntityBeanHomeRemoveByHandleInterceptorFactory implements InterceptorFactory {
    public static final EntityBeanHomeRemoveByHandleInterceptorFactory INSTANCE = new EntityBeanHomeRemoveByHandleInterceptorFactory();

    public Interceptor create(final InterceptorFactoryContext context) {
        return new AbstractEJBInterceptor() {
            public Object processInvocation(final InterceptorContext interceptorContext) throws Exception {
                final Handle handle = (Handle) interceptorContext.getParameters()[0];
                handle.getEJBObject().remove();
                return null;
            }
View Full Code Here

        final Object[] params = SessionBeanHomeInterceptorFactory.INIT_PARAMETERS.get();
        //we remove them immediatly, 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();
        return new AbstractEJBInterceptor() {
            @Override
            public Object processInvocation(final InterceptorContext context) throws Exception {
                if (method != null) {
                    final InvocationType invocationType = context.getPrivateData(InvocationType.class);
                    try {
View Full Code Here

    public CmpEntityBeanRemoveInterceptorFactory(final Method ejbRemove) {
        this.ejbRemove = ejbRemove;
    }

    public Interceptor create(final InterceptorFactoryContext context) {
        return new AbstractEJBInterceptor() {
            public Object processInvocation(final InterceptorContext context) throws Exception {
                final CmpEntityBeanComponent component = getComponent(context, CmpEntityBeanComponent.class);

                final Object primaryKey = context.getPrivateData(EntityBeanComponent.PRIMARY_KEY_CONTEXT_KEY);
                if (primaryKey == null) {
View Full Code Here

    public CmpEntityBeanRemoveInterceptorFactory(final Method ejbRemove) {
        this.ejbRemove = ejbRemove;
    }

    public Interceptor create(final InterceptorFactoryContext context) {
        return new AbstractEJBInterceptor() {
            public Object processInvocation(final InterceptorContext context) throws Exception {
                final CmpEntityBeanComponent component = getComponent(context, CmpEntityBeanComponent.class);

                final Object primaryKey = context.getPrivateData(EntityBeanComponent.PRIMARY_KEY_CONTEXT_KEY);
                if (primaryKey == null) {
View Full Code Here

        final Object[] params = SessionBeanHomeInterceptorFactory.INIT_PARAMETERS.get();
        //we remove them immediatly, 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();
        return new AbstractEJBInterceptor() {
            @Override
            public Object processInvocation(final InterceptorContext context) throws Exception {
                if (method != null) {
                    try {
                        method.invoke(context.getTarget(), params);
View Full Code Here

    }

    @Override
    public Interceptor create(final InterceptorFactoryContext factoryContext) {

        return new AbstractEJBInterceptor() {
            @Override
            public Object processInvocation(final InterceptorContext context) throws Exception {
                final EntityBeanComponent component = getComponent(context, EntityBeanComponent.class);

                final Object primaryKey = context.getPrivateData(EntityBeanComponent.PRIMARY_KEY_CONTEXT_KEY);
View Full Code Here

    private final Logger log = Logger.getLogger(EntityBeanAssociatingInterceptor.class);

    private final Interceptor interceptor;

    public CmpEntityBeanRemoveInterceptorFactory(final Method ejbRemove) {
        this.interceptor = new AbstractEJBInterceptor() {
            public Object processInvocation(final InterceptorContext context) throws Exception {
                final CmpEntityBeanComponent component = getComponent(context, CmpEntityBeanComponent.class);

                final Object primaryKey = context.getPrivateData(EntityBeanComponent.PRIMARY_KEY_CONTEXT_KEY);
                if (primaryKey == null) {
View Full Code Here

    public void processMessage(ChannelAssociation channelAssociation, MessageInputStream messageInputStream) throws IOException {
        final DataInputStream input = new DataInputStream(messageInputStream);
        // read the id of the invocation which needs to be cancelled
        final short invocationToCancel = input.readShort();
        // get the cancellation flag (if any) for the invocation id
        final CancellationFlag cancellationFlag = this.remoteAsyncInvocationCancelStatus.getCancelStatus(invocationToCancel);
        if (cancellationFlag == null) {
            return;
        }
        // mark it as cancelled
        cancellationFlag.set(true);
        logger.debug("Invocation with id " + invocationToCancel + " has been marked as cancelled, as requested");
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.ejb3.component.interceptors.AbstractEJBInterceptor

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.