Package org.jboss.ejb3.context.spi

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


    @Override
    public Object processInvocation(InterceptorContext context) throws Exception {
        Method method = context.getMethod();
        Object[] parameters = context.getParameters();
        InvocationContext invocationContext = new CustomInvocationContext(context, method, parameters);
        context.putPrivateData(InvocationContext.class, invocationContext);
        CurrentInvocationContext.push(invocationContext);
        try {
            return context.proceed();
        } finally {
View Full Code Here


     * </p>
     *
     * @return
     */
    protected boolean isLifecycleCallbackInvocation() {
        InvocationContext currentInvocationContext = null;
        try {
            currentInvocationContext = CurrentInvocationContext.get();
        } catch (IllegalStateException ise) {
            // no context info available so return false
            return false;
        }
        // If the method in current invocation context is null,
        // then it represents a lifecycle callback invocation
        Method invokedMethod = currentInvocationContext.getMethod();
        if (invokedMethod == null) {
            // it's a lifecycle callback
            return true;
        }
        // not an lifecycle callback
View Full Code Here

        }

    }

    private boolean isSingletonBeanInvocation() {
        InvocationContext currentInvocationContext = null;
        try {
            currentInvocationContext = CurrentInvocationContext.get();

            //TODO: do this properly
View Full Code Here

      return getCurrentInvocationContext().getContextData();
   }

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

{
   private static ThreadLocalStack<InvocationContext> stack = new ThreadLocalStack<InvocationContext>();
  
   public static InvocationContext get()
   {
      InvocationContext current = stack.get();
      if(current == null)
         throw new IllegalStateException("No current invocation context available");
      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

            Method method = (Method) injectionPoint.getMember();
            beanInterface = method.getParameterTypes()[0].getName();
         }
      }

      String jndiName = resolver.resolveEjb(topLevelDeploymentUnit, new EjbReference(beanName, beanInterface, null));
      if (jndiName == null)
      {
         throw new IllegalStateException("No EJBs available which can be injected into " + injectionPoint);
      }
      try
View Full Code Here

   @Override
   protected String resolveField(final Field field)
   {
      final EJB ejbAnnotation = field.getAnnotation(EJB.class);
      final Class<?> type = field.getType();
      final EjbReference reference = this.getEjbReference(ejbAnnotation, type);

      return this.delegate.resolveEjb(this.unit, reference);
   }
View Full Code Here

TOP

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

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.