Package org.jboss.aop

Examples of org.jboss.aop.Advisor


    */
   protected Interceptor[] createLifecycleInterceptors(Class<? extends Annotation> lifecycleCallbackAnnotation)
   {
      // Get the lifecycle interceptor classes of the bean
      List<Class<?>> lifecycleInterceptorClasses = this.getContainer().getLifecycleInterceptorClasses();
      Advisor advisor = this.getContainer().getAdvisor();
      Interceptor interceptors[];
      try
      {
         // Create a AOP interceptor chain out of the lifecycle interceptor classes
         interceptors = LifecycleCallbacks.createLifecycleCallbackInterceptors(advisor, lifecycleInterceptorClasses,
View Full Code Here


            {
               loader = Thread.currentThread().getContextClassLoader();
            }
            Class<?> clazz = loader.loadClass(className);

            Advisor advisor;
            synchronized (ContainerCache.mapLock)
            {
               ContainerCache cache = ContainerCache.initialise(manager, clazz, metaData, true);
               advisor = cache.getAdvisor();
            }
View Full Code Here

    * @return target instance
    * @throws Throwable for any error
    */
   private Object createTarget(ContainerCache cache, AOPProxyFactoryParameters params) throws Throwable
   {
      Advisor advisor = cache.getAdvisor();
      if (advisor != null)
      {
         org.jboss.aop.ConstructorInfo aopinfo = findAopConstructorInfo(advisor);
        
         Interceptor[] interceptors = (aopinfo != null) ? aopinfo.getInterceptors() : null;

         if (interceptors != null)
         {
            ConstructorInvocation inv = new ConstructorInvocation(aopinfo, aopinfo.getInterceptors());
            inv.setArguments(getArguments());
            return inv.invokeNext();
         }
        
         if (getConstructorInfo().getParameterTypes().length > 0)
         {
            Constructor<?> constructor = null;
            if (aopinfo == null)
            {
               //Fall back to using the class;
               Class<?> clazz = advisor.getClazz();
               Constructor<?>[] ctors = clazz.getConstructors();
               for (Constructor<?> ctor : ctors)
               {
                  if (matchConstructor(ctor))
                  {
View Full Code Here

         // Get the method hash
         long methodHash = si.getMethodHash();
         log.debug("Received dynamic invocation for method with hash: " + methodHash);

         // Get the Method via MethodInfo from the Advisor
         Advisor advisor = this.getAdvisor();
         MethodInfo info = advisor.getMethodInfo(methodHash);
         Method unadvisedMethod = info.getMethod();
         SerializableMethod unadvisedMethodSerializable = new SerializableMethod(unadvisedMethod);

         // Get the invoked method from invocation metadata
         Object objInvokedMethod = si.getMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION,
View Full Code Here

   {
      try
      {
         if(injectors == null)
            return;
         Advisor advisor = getAdvisor();
         for (Injector injector : injectors)
         {
            InjectionInvocation invocation = new InjectionInvocation(beanContext, injector, currentInvocationStack);
            invocation.setAdvisor(advisor);
            invocation.setTargetObject(beanContext.getInstance());
View Full Code Here

   }

   public static String getHomeJndiName(Container container)
   {
      // Initialize
      Advisor advisor = (Advisor) container;

      // Use explicitly-specified binding, if defined
      RemoteHomeBinding binding = (RemoteHomeBinding) advisor.resolveAnnotation(RemoteHomeBinding.class);
      if (binding != null)
         return binding.jndiBinding();

      // Use Default JNDI Binding Policy
      return ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultRemoteHomeJndiName(
View Full Code Here

   }

   public static String getLocalHomeJndiName(Container container)
   {
      // Initialize
      Advisor advisor = (Advisor) container;

      // Use explicitly-specified binding, if defined
      LocalHomeBinding binding = (LocalHomeBinding) advisor.resolveAnnotation(LocalHomeBinding.class);
      if (binding != null)
         return binding.jndiBinding();

      // Use Default JNDI Binding Policy
      return ProxyFactoryHelper.getJndiBindingPolicy(container).getDefaultLocalHomeJndiName(
View Full Code Here

   }

   private static String getLocalJndiName(Container container, boolean conflictCheck)
   {
      // Initialize
      Advisor advisor = (Advisor) container;

      // See if local binding is explicitly-defined
      LocalBinding localBinding = (LocalBinding) advisor.resolveAnnotation(LocalBinding.class);

      // If none specified
      if (localBinding == null)
      {
         // Get JNDI name from policy
View Full Code Here

      return getRemoteJndiName(container, true);
   }

   public static String getRemoteJndiName(Container container, boolean check)
   {
      Advisor advisor = (Advisor) container;
      RemoteBinding binding = (RemoteBinding) advisor.resolveAnnotation(RemoteBinding.class);

      return getRemoteJndiName(container, binding);
   }
View Full Code Here

         // Get the method hash
         long methodHash = si.getMethodHash();
         log.debug("Received dynamic invocation for method with hash: " + methodHash);

         // Get the Method via MethodInfo from the Advisor
         Advisor advisor = this.getAdvisor();
         MethodInfo info = advisor.getMethodInfo(methodHash);
         Method unadvisedMethod = info.getMethod();
         SerializableMethod unadvisedMethodSerializable = new SerializableMethod(unadvisedMethod);

         // Get the invoked method from invocation metadata
         Object objInvokedMethod = si.getMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION,
View Full Code Here

TOP

Related Classes of org.jboss.aop.Advisor

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.