Package org.jboss.ejb3.annotation

Examples of org.jboss.ejb3.annotation.LocalHomeBinding


      if (localHome != null)
      {
         if (businessInterface.getName().equals(localHome.getName()))
         {
            // Check for declared @LocalHomeBinding
            LocalHomeBinding binding = ((EJBContainer) container).getAnnotation(LocalHomeBinding.class);
            if (binding != null)
            {
               // Encountered, return
               return binding.jndiBinding();
            }

            // Set local and home for policy
            isHome = true;
            isLocal = true;
         }
      }

      // Determine if local
      Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
      for (Class<?> clazz : locals)
      {
         if (clazz.getName().equals(businessInterface.getName()))
         {
            // Check for declared @LocalBinding
            LocalBinding binding = ((EJBContainer) container).getAnnotation(LocalBinding.class);
            if (binding != null)
            {
               // Encountered, return
               return binding.jndiBinding();
            }

            // Set local for policy
            isLocal = true;
         }
View Full Code Here


   }

   public static String getLocalHomeJndiName(EJBContainer container)
   {
      // Use explicitly-specified binding, if defined
      LocalHomeBinding binding = container.getAnnotation(LocalHomeBinding.class);
      if (binding != null)
         return binding.jndiBinding();

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

      if (localHome != null)
      {
         if (businessInterface.getName().equals(localHome.getName()))
         {
            // Check for declared @LocalHomeBinding
            LocalHomeBinding binding = ((EJBContainer) container).getAnnotation(LocalHomeBinding.class);
            if (binding != null)
            {
               // Encountered, return
               return binding.jndiBinding();
            }

            // Set local and home for policy
            isHome = true;
            isLocal = true;
         }
      }

      // Determine if local
      Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
      for (Class<?> clazz : locals)
      {
         if (clazz.getName().equals(businessInterface.getName()))
         {
            // Check for declared @LocalBinding
            LocalBinding binding = ((EJBContainer) container).getAnnotation(LocalBinding.class);
            if (binding != null)
            {
               // Encountered, return
               return binding.jndiBinding();
            }

            // Set local for policy
            isLocal = true;
         }
View Full Code Here

   }

   public static String getLocalHomeJndiName(EJBContainer container)
   {
      // Use explicitly-specified binding, if defined
      LocalHomeBinding binding = container.getAnnotation(LocalHomeBinding.class);
      if (binding != null)
         return binding.jndiBinding();

      // Use Default JNDI Binding Policy
      JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
      return smd.getLocalHomeJndiName();
   }
View Full Code Here

      // Obtain annotations
      RemoteBindings remoteBindings = this.getAnnotation(RemoteBindings.class);
      RemoteBinding remoteBinding = this.getAnnotation(RemoteBinding.class);
      RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
      LocalHomeBinding localHomeBinding = this.getAnnotation(LocalHomeBinding.class);
      //      LocalBinding localBinding = this.getAnnotation(LocalBinding.class); // < No LocalBindingMetaData?

      // Create a Set to hold RemoteBindings
      Set<RemoteBinding> remoteBindingsSet = new HashSet<RemoteBinding>();

      // Populate Set with Remote Bindings
      if (remoteBindings != null)
      {
         for (RemoteBinding binding : remoteBindings.value())
         {
            remoteBindingsSet.add(binding);
         }
      }
      if (remoteBinding != null)
      {
         remoteBindingsSet.add(remoteBinding);
      }

      // Ensure remote bindings metadata is not null
      List<RemoteBindingMetaData> rbmd = this.getMetaData().getRemoteBindings();
      if (rbmd == null || rbmd.size() == 0)
      {
         rbmd = new ArrayList<RemoteBindingMetaData>();
         this.getMetaData().setRemoteBindings(rbmd);
      }

      // For each remote binding, populate metadata
      for (RemoteBinding binding : remoteBindingsSet)
      {
         RemoteBindingMetaData md = new RemoteBindingMetaData();
         md.setClientBindUrl(binding.clientBindUrl());
         md.setInterceptorStack(binding.interceptorStack());
         md.setJndiName(binding.jndiBinding());
         md.setProxyFactory(binding.factory());
         //TODO binding.invokerName?
         rbmd.add(md);
      }

      // Populate metadata for @RemoteHomeBinding
      if (remoteHomeBinding != null)
      {
         this.getMetaData().setHomeJndiName(remoteHomeBinding.jndiBinding());
      }

      // Populate metadata for @LocalHomeBinding
      if (localHomeBinding != null)
      {
         this.getMetaData().setLocalHomeJndiName(localHomeBinding.jndiBinding());
      }

      /*
       * End Temporary Hack
       */
 
View Full Code Here

/* 455 */     Class localHome = getLocalHomeInterface(container);
/* 456 */     if (localHome != null)
/*     */     {
/* 458 */       if (businessInterface.getName().equals(localHome.getName()))
/*     */       {
/* 461 */         LocalHomeBinding binding = (LocalHomeBinding)((EJBContainer)container).getAnnotation(LocalHomeBinding.class);
/* 462 */         if (binding != null)
/*     */         {
/* 465 */           return binding.jndiBinding();
/*     */         }
/*     */
/* 469 */         isHome = true;
/* 470 */         isLocal = true;
/*     */       }
/*     */
/*     */     }
/*     */
/* 475 */     Class[] locals = getLocalAndBusinessLocalInterfaces(container);
/* 476 */     for (Class clazz : locals)
/*     */     {
/* 478 */       if (!clazz.getName().equals(businessInterface.getName())) {
/*     */         continue;
/*     */       }
/* 481 */       LocalBinding binding = (LocalBinding)((EJBContainer)container).getAnnotation(LocalBinding.class);
/* 482 */       if (binding != null)
/*     */       {
/* 485 */         return binding.jndiBinding();
/*     */       }
/*     */
/* 489 */       isLocal = true;
/*     */     }
/*     */
View Full Code Here

/*     */
/*     */   public static String getLocalHomeJndiName(Container container)
/*     */   {
/* 814 */     Advisor advisor = (Advisor)container;
/*     */
/* 817 */     LocalHomeBinding binding = (LocalHomeBinding)advisor.resolveAnnotation(LocalHomeBinding.class);
/* 818 */     if (binding != null) {
/* 819 */       return binding.jndiBinding();
/*     */     }
/*     */
/* 822 */     return getJndiBindingPolicy(container).getDefaultLocalHomeJndiName(getDeploymentSummaryFromContainer(container));
/*     */   }
View Full Code Here

      if (localHome != null)
      {
         if (businessInterface.getName().equals(localHome.getName()))
         {
            // Check for declared @LocalHomeBinding
            LocalHomeBinding binding = ((EJBContainer) container).getAnnotation(LocalHomeBinding.class);
            if (binding != null)
            {
               // Encountered, return
               return binding.jndiBinding();
            }

            // Set local and home for policy
            isHome = true;
            isLocal = true;
         }
      }

      // Determine if local
      Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
      for (Class<?> clazz : locals)
      {
         if (clazz.getName().equals(businessInterface.getName()))
         {
            // Check for declared @LocalBinding
            LocalBinding binding = ((EJBContainer) container).getAnnotation(LocalBinding.class);
            if (binding != null)
            {
               // Encountered, return
               return binding.jndiBinding();
            }

            // Set local for policy
            isLocal = true;
         }
View Full Code Here

   }

   public static String getLocalHomeJndiName(EJBContainer container)
   {
      // Use explicitly-specified binding, if defined
      LocalHomeBinding binding = container.getAnnotation(LocalHomeBinding.class);
      if (binding != null)
         return binding.jndiBinding();

      // Use Default JNDI Binding Policy
      JBossSessionBeanMetaData smd = (JBossSessionBeanMetaData)container.getXml();
      return smd.getLocalHomeJndiName();
   }
View Full Code Here

      if (localHome != null)
      {
         if (businessInterface.getName().equals(localHome.getName()))
         {
            // Check for declared @LocalHomeBinding
            LocalHomeBinding binding = ((EJBContainer) container).getAnnotation(LocalHomeBinding.class);
            if (binding != null)
            {
               // Encountered, return
               return binding.jndiBinding();
            }

            // Set local and home for policy
            isHome = true;
            isLocal = true;
         }
      }

      // Determine if local
      Class<?>[] locals = getLocalAndBusinessLocalInterfaces(container);
      for (Class<?> clazz : locals)
      {
         if (clazz.getName().equals(businessInterface.getName()))
         {
            // Check for declared @LocalBinding
            LocalBinding binding = ((EJBContainer) container).getAnnotation(LocalBinding.class);
            if (binding != null)
            {
               // Encountered, return
               return binding.jndiBinding();
            }

            // Set local for policy
            isLocal = true;
         }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.annotation.LocalHomeBinding

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.