Package org.jboss.ejb3.annotation.impl

Examples of org.jboss.ejb3.annotation.impl.RemoteBindingImpl


   }

   private void addSimpleJndiAnnotations(EJBContainer container,
         JBossEnterpriseBeanMetaData enterpriseBean) throws ClassNotFoundException
   {
      RemoteBindingImpl remoteBinding = null;

      String jndiName = enterpriseBean.getMappedName();
      if (jndiName != null)
      {
         remoteBinding = new RemoteBindingImpl();
         remoteBinding.setJndiBinding(jndiName);
         addClassAnnotation(container, RemoteBinding.class, remoteBinding);
      }

      if (remoteBinding != null)
      {
         RemoteBinding existingBinding = ejbClass.getAnnotation(RemoteBinding.class);
         if (existingBinding != null)
            remoteBinding.merge(existingBinding);

         addClassAnnotation(container, RemoteBinding.class, remoteBinding);
      }
   }
View Full Code Here


  
   private RemoteBinding initializeRemoteBinding(RemoteBinding binding)
   {
      if(binding.jndiBinding().length() == 0)
      {
         return new RemoteBindingImpl(ProxyFactoryHelper.getDefaultRemoteBusinessJndiName(container), binding
               .interceptorStack(), binding.clientBindUrl(), "");
      }
      return binding;
   }
View Full Code Here

            {
               log.debug("there is remote interfaces for " + container.getEjbName());
               String jndiName = container.getMetaData().getJndiName();
               log.debug("default remote binding has jndiName of " + jndiName);
               String uri = ""; // use the default
               RemoteBinding[] list = {new RemoteBindingImpl(jndiName, "", uri, "")};
               remoteBindings = new RemoteBindingsImpl(list);
               container.getAnnotations().addClassAnnotation(RemoteBindings.class, remoteBindings);
            }
         }
         else
View Full Code Here

  
   private RemoteBinding initializeRemoteBinding(RemoteBinding binding)
   {
      if(binding.jndiBinding().length() == 0)
      {
         return new RemoteBindingImpl(ProxyFactoryHelper.getDefaultRemoteBusinessJndiName(container), binding
               .interceptorStack(), binding.clientBindUrl(), binding.factory());
      }
      return binding;
   }
View Full Code Here

            {
               log.debug("there is remote interfaces for " + container.getEjbName());
               String jndiName = ProxyFactoryHelper.getDefaultRemoteBusinessJndiName(container);
               log.debug("default remote binding has jndiName of " + jndiName);
               String uri = ""; // use the default
               RemoteBinding[] list = {new RemoteBindingImpl(jndiName, "", uri, RemoteBindingDefaults.PROXY_FACTORY_DEFAULT)};
               remoteBindings = new RemoteBindingsImpl(list);
               container.getAnnotations().addClassAnnotation(RemoteBindings.class, remoteBindings);
            }
         }
         else
View Full Code Here

  
   private RemoteBinding initializeRemoteBinding(RemoteBinding binding)
   {
      if(binding.jndiBinding().length() == 0)
      {
         return new RemoteBindingImpl(ProxyFactoryHelper.getDefaultRemoteBusinessJndiName(container), binding
               .interceptorStack(), binding.clientBindUrl(), binding.factory());
      }
      return binding;
   }
View Full Code Here

            {
               log.debug("there is remote interfaces for " + container.getEjbName());
               String jndiName = container.getMetaData().getJndiName();
               log.debug("default remote binding has jndiName of " + jndiName);
               String uri = ""; // use the default
               RemoteBinding[] list = {new RemoteBindingImpl(jndiName, "", uri, RemoteBindingDefaults.PROXY_FACTORY_DEFAULT)};
               remoteBindings = new RemoteBindingsImpl(list);
               container.getAnnotations().addClassAnnotation(RemoteBindings.class, remoteBindings);
            }
         }
         else
View Full Code Here

    // JBCTS-718
      // If jndi-name is defined, use the value specified
      String jndiName = enterpriseBean.getJndiName();
      if (jndiName != null && !jndiName.trim().equals(""))
      {
         RemoteBindingImpl remoteBindingAnnotation = new RemoteBindingImpl();
         remoteBindingAnnotation.setJndiBinding(jndiName);
         addClassAnnotation(container, RemoteBinding.class, remoteBindingAnnotation);
         log.debug("Adding " + RemoteBinding.class.getName() + " to " + container.toString() + ": "
               + remoteBindingAnnotation.toString());
         return;
      }
   
      List<RemoteBindingMetaData> bindingsList = enterpriseBean.getRemoteBindings();
      if (bindingsList == null || bindingsList.size() == 0)
      {
         addSimpleJndiAnnotations(container, enterpriseBean);
         return;
      }

      AnnotationRepository annotations = container.getAnnotations();

      annotations.disableAnnotation(RemoteBinding.class.getName());

      List<RemoteBindingImpl> bindingAnnotationsList = new ArrayList<RemoteBindingImpl>();

      for(RemoteBindingMetaData binding : bindingsList)
      {
         RemoteBindingImpl bindingAnnotation = new RemoteBindingImpl();

         if (binding.getJndiName() != null)
            bindingAnnotation.setJndiBinding(binding.getJndiName());

         if (binding.getClientBindUrl() != null)
            bindingAnnotation.setBindUrl(binding.getClientBindUrl());

         if (binding.getInterceptorStack() != null)
            bindingAnnotation.setStack(binding.getInterceptorStack());

         bindingAnnotationsList.add(bindingAnnotation);

      }
View Full Code Here

   }

   private void addSimpleJndiAnnotations(EJBContainer container,
         JBossEnterpriseBeanMetaData enterpriseBean) throws ClassNotFoundException
   {
      RemoteBindingImpl remoteBinding = null;

      String jndiName = enterpriseBean.getMappedName();
      if (jndiName != null)
      {
         remoteBinding = new RemoteBindingImpl();
         remoteBinding.setJndiBinding(jndiName);
         addClassAnnotation(container, RemoteBinding.class, remoteBinding);
      }

      if (remoteBinding != null)
      {
         RemoteBinding existingBinding = ejbClass.getAnnotation(RemoteBinding.class);
         if (existingBinding != null)
            remoteBinding.merge(existingBinding);

         addClassAnnotation(container, RemoteBinding.class, remoteBinding);
      }
   }
View Full Code Here

/*      */     }
/*      */
/* 1755 */     String jndiName = enterpriseBean.getJndiName();
/* 1756 */     if ((jndiName != null) && (!jndiName.trim().equals("")))
/*      */     {
/* 1758 */       RemoteBindingImpl remoteBindingAnnotation = new RemoteBindingImpl();
/* 1759 */       remoteBindingAnnotation.setJndiBinding(jndiName);
/* 1760 */       addClassAnnotation(container, RemoteBinding.class, remoteBindingAnnotation);
/* 1761 */       log.debug("Adding " + RemoteBinding.class.getName() + " to " + container.toString() + ": " + remoteBindingAnnotation.toString());
/*      */
/* 1763 */       return;
/*      */     }
/*      */
/* 1766 */     List bindingsList = enterpriseBean.getRemoteBindings();
/* 1767 */     if ((bindingsList == null) || (bindingsList.size() == 0))
/*      */     {
/* 1769 */       addSimpleJndiAnnotations(container, enterpriseBean);
/* 1770 */       return;
/*      */     }
/*      */
/* 1773 */     AnnotationRepository annotations = container.getAnnotations();
/*      */
/* 1775 */     annotations.disableAnnotation(RemoteBinding.class.getName());
/*      */
/* 1777 */     List bindingAnnotationsList = new ArrayList();
/*      */
/* 1779 */     for (RemoteBindingMetaData binding : bindingsList)
/*      */     {
/* 1781 */       RemoteBindingImpl bindingAnnotation = new RemoteBindingImpl();
/*      */
/* 1783 */       if (binding.getJndiName() != null) {
/* 1784 */         bindingAnnotation.setJndiBinding(binding.getJndiName());
/*      */       }
/* 1786 */       if (binding.getClientBindUrl() != null) {
/* 1787 */         bindingAnnotation.setBindUrl(binding.getClientBindUrl());
/*      */       }
/* 1789 */       if (binding.getInterceptorStack() != null) {
/* 1790 */         bindingAnnotation.setStack(binding.getInterceptorStack());
/*      */       }
/* 1792 */       if (binding.getProxyFactory() != null) {
/* 1793 */         bindingAnnotation.setFactory(binding.getProxyFactory());
/*      */       }
/* 1795 */       bindingAnnotationsList.add(bindingAnnotation);
/*      */     }
/*      */
/* 1799 */     RemoteBindingsImpl bindingsAnnotation = new RemoteBindingsImpl(bindingAnnotationsList);
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.annotation.impl.RemoteBindingImpl

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.