Examples of SessionInvocationContext


Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

      return getCurrentInvocationContext().getBusinessObject(businessInterface);
   }

   protected SessionInvocationContext getCurrentInvocationContext()
   {
      SessionInvocationContext current = CurrentInvocationContext.get(SessionInvocationContext.class);
      assert current.getEJBContext() == this;
      return current;
   }
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

    public Object processInvocation(InterceptorContext context) throws Exception {
        // TODO: fill in the proper invoked business interface
        Class<?> invokedBusinessInterface = null;
        Method method = context.getMethod();
        Object[] parameters = context.getParameters();
        SessionInvocationContext sessionInvocationContext = new CustomSessionInvocationContext(context, invokedBusinessInterface, method, parameters);
        context.putPrivateData(InvocationContext.class, sessionInvocationContext);
        CurrentInvocationContext.push(sessionInvocationContext);
        try {
            return context.proceed();
        }
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

    public Object processInvocation(InterceptorContext context) throws Exception {
        // TODO: fill in the proper invoked business interface
        Class<?> invokedBusinessInterface = null;
        Method method = context.getMethod();
        Object[] parameters = context.getParameters();
        SessionInvocationContext sessionInvocationContext = new CustomSessionInvocationContext(context, invokedBusinessInterface, method, parameters);
        context.putPrivateData(InvocationContext.class, sessionInvocationContext);
        CurrentInvocationContext.push(sessionInvocationContext);
        try {
            return context.proceed();
        }
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

    public Object processInvocation(InterceptorContext context) throws Exception {
        // TODO: fill in the proper invoked business interface
        Class<?> invokedBusinessInterface = null;
        Method method = context.getMethod();
        Object[] parameters = context.getParameters();
        SessionInvocationContext sessionInvocationContext = new CustomSessionInvocationContext(context, invokedBusinessInterface, method, parameters);
        context.putPrivateData(InvocationContext.class, sessionInvocationContext);
        CurrentInvocationContext.push(sessionInvocationContext);
        try {
            return context.proceed();
        } finally {
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

         {
            // FIXME: This is a dirty hack to notify AS EJBTimerService about what's going on
            AllowedOperationsAssociation.pushInMethodFlag(AllowedOperationsAssociation.IN_BEFORE_COMPLETION);
           
            // TODO: use interceptors to setup a context
            SessionInvocationContext invocation = new BaseSessionInvocationContext(null, null, null) {
               @Override
               public Object proceed() throws Exception
               {
                  bean.beforeCompletion();
                  return null;
               }
            };
            invocation.setEJBContext(ctx.getEJBContext());
            CurrentInvocationContext.push(invocation);
            try
            {
               invocation.proceed();
            }
            finally
            {
               CurrentInvocationContext.pop();
            }           
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

            return;
         pushEnc();
         try
         {
            // TODO: use interceptors to setup a context
            SessionInvocationContext invocation = new BaseSessionInvocationContext(null, null, null) {
               @Override
               public Object proceed() throws Exception
               {
                  if (status == Status.STATUS_COMMITTED)
                  {
                     bean.afterCompletion(true);
                  }
                  else
                  {
                     bean.afterCompletion(false);
                  }
                  return null;
               }
            };
            invocation.setEJBContext(ctx.getEJBContext());
            CurrentInvocationContext.push(invocation);
            try
            {
               invocation.proceed();
            }
            finally
            {
               CurrentInvocationContext.pop();
            }
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

         {
            // FIXME: This is a dirty hack to notify AS EJBTimerService about what's going on
            AllowedOperationsAssociation.pushInMethodFlag(AllowedOperationsAssociation.IN_BEFORE_COMPLETION);
           
            // TODO: use interceptors to setup a context
            SessionInvocationContext invocation = new BaseSessionInvocationContext(null, null, null) {
               @Override
               public Object proceed() throws Exception
               {
                  sync.beforeCompletion();
                  return null;
               }
            };
            invocation.setEJBContext(ctx.getEJBContext());
            CurrentInvocationContext.push(invocation);
            try
            {
               invocation.proceed();
            }
            finally
            {
               CurrentInvocationContext.pop();
            }           
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

            return;
         pushEnc();
         try
         {
            // TODO: use interceptors to setup a context
            SessionInvocationContext invocation = new BaseSessionInvocationContext(null, null, null) {
               @Override
               public Object proceed() throws Exception
               {
                  if (status == Status.STATUS_COMMITTED)
                  {
                     sync.afterCompletion(true);
                  }
                  else
                  {
                     sync.afterCompletion(false);
                  }
                  return null;
               }
            };
            invocation.setEJBContext(ctx.getEJBContext());
            CurrentInvocationContext.push(invocation);
            try
            {
               invocation.proceed();
            }
            finally
            {
               CurrentInvocationContext.pop();
            }
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

        final ComponentViewInstance componentViewInstance = context.getPrivateData(ComponentViewInstance.class);
        // For a lifecycle interception, the ComponentViewInstance (and the invoked business interface) will be null.
        // On a normal method invocation, the invoked business interface will be obtained from the ComponentViewInstance
        final Class<?> invokedBusinessInterface = componentViewInstance == null ? null : componentViewInstance.getViewClass();
        Object[] parameters = context.getParameters();
        SessionInvocationContext sessionInvocationContext = new CustomSessionInvocationContext(lifecycleCallback, context, invokedBusinessInterface, invokedMethod, parameters);
        context.putPrivateData(InvocationContext.class, sessionInvocationContext);
        CurrentInvocationContext.push(sessionInvocationContext);
        try {
            return context.proceed();
        } finally {
View Full Code Here

Examples of org.jboss.ejb3.context.spi.SessionInvocationContext

        final ComponentViewInstance componentViewInstance = context.getPrivateData(ComponentViewInstance.class);
        // For a lifecycle interception, the ComponentViewInstance (and the invoked business interface) will be null.
        // On a normal method invocation, the invoked business interface will be obtained from the ComponentViewInstance
        final Class<?> invokedBusinessInterface = componentViewInstance == null ? null : componentViewInstance.getViewClass();
        Object[] parameters = context.getParameters();
        SessionInvocationContext sessionInvocationContext = new CustomSessionInvocationContext(lifecycleCallback, context, invokedBusinessInterface, invokedMethod, parameters);
        context.putPrivateData(InvocationContext.class, sessionInvocationContext);
        CurrentInvocationContext.push(sessionInvocationContext);
        try {
            return context.proceed();
        } finally {
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.