Package org.jboss.ejb3.annotation.impl

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


/*      */   }
/*      */
/*      */   private void addSimpleJndiAnnotations(EJBContainer container, JBossEnterpriseBeanMetaData enterpriseBean)
/*      */     throws ClassNotFoundException
/*      */   {
/* 1806 */     RemoteBindingImpl remoteBinding = null;
/*      */
/* 1808 */     String jndiName = enterpriseBean.getMappedName();
/* 1809 */     if (jndiName != null)
/*      */     {
/* 1811 */       remoteBinding = new RemoteBindingImpl();
/* 1812 */       remoteBinding.setJndiBinding(jndiName);
/* 1813 */       addClassAnnotation(container, RemoteBinding.class, remoteBinding);
/*      */     }
/*      */
/* 1816 */     if (remoteBinding != null)
/*      */     {
/* 1818 */       RemoteBinding existingBinding = (RemoteBinding)this.ejbClass.getAnnotation(RemoteBinding.class);
/* 1819 */       if (existingBinding != null) {
/* 1820 */         remoteBinding.merge(existingBinding);
/*      */       }
/* 1822 */       addClassAnnotation(container, RemoteBinding.class, remoteBinding);
/*      */     }
/*      */   }
View Full Code Here


/*     */
/*     */   private RemoteBinding initializeRemoteBinding(RemoteBinding binding)
/*     */   {
/* 134 */     if (binding.jndiBinding().length() == 0)
/*     */     {
/* 136 */       return new RemoteBindingImpl(ProxyFactoryHelper.getDefaultRemoteJndiName(this.container), binding.interceptorStack(), binding.clientBindUrl(), binding.factory());
/*     */     }
/* 138 */     return binding;
/*     */   }
View Full Code Here

/*     */         {
/* 152 */           log.debug("there is remote interfaces for " + this.container.getEjbName());
/* 153 */           String jndiName = ProxyFactoryHelper.getDefaultRemoteJndiName(this.container);
/* 154 */           log.debug("default remote binding has jndiName of " + jndiName);
/* 155 */           String uri = "";
/* 156 */           RemoteBinding[] list = { new RemoteBindingImpl(jndiName, "", uri, "RemoteProxyFactory") };
/* 157 */           this.remoteBindings = new RemoteBindingsImpl(list);
/* 158 */           this.container.getAnnotations().addClassAnnotation(RemoteBindings.class, this.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

    // 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());

         if (binding.getProxyFactory() != null)
            bindingAnnotation.setFactory(binding.getProxyFactory());

         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

  
   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

  
   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

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.