Package org.jboss.ejb3.context.spi

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


            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

         {
            // 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

            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

        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

        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

      return getCurrentInvocationContext().getBusinessObject(businessInterface);
   }

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

      //DeploymentScope scope = null;
      if (unit.getParent() != null)
      {
         boolean isEar = unit != unit.getTopLevel();
         this.deploymentScope = new JBoss5DeploymentScope(unit.getParent(), isEar);
      }

      ejbResolver = new ClientEjbResolver(deploymentScope, unit.getSimpleName());
      messageDestinationResolver = new MessageDestinationResolver(deploymentScope, xml.getMessageDestinations());
View Full Code Here

         throw new NullPointerException("applicationClientName is mandatory");
      if (classLoader == null)
         throw new NullPointerException("classLoader is mandatory");

      this.deploymentUnit = unit;
      this.ejb3Unit = new JBoss5DeploymentUnit(unit);
      this.clientMetaData = xml;
      this.mainClass = mainClass;
      this.applicationClientName = applicationClientName;
      this.classLoader = classLoader;
View Full Code Here

    * @param shortName
    */
   public JBoss5DeploymentScope(VFSDeploymentUnit parent, boolean isEar, String shortName)
   {
      this(parent, isEar);
      ejbRefResolver = new EjbModuleEjbResolver(this, shortName);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.context.spi.SessionInvocationContext

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.