Examples of RemoteHomeBinding


Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

         }
         RemoteHome homeAnnotation = this.getAnnotation(RemoteHome.class);
         if (homeAnnotation != null)
            home = homeAnnotation.value();

         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());

         EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass, true, false, homeHandle);

         InvocationResponse response = marshallResponse(statefulInvocation, metadata, null);
         return response;
      }
      else if (unadvisedMethod.getName().equals("getHomeHandle"))
      {
         HomeHandleImpl homeHandle = null;

         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());

         InvocationResponse response = marshallResponse(statefulInvocation, homeHandle, null);
         return response;
      }
      else
View Full Code Here

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

         }
         RemoteHome homeAnnotation = this.getAnnotation(RemoteHome.class);
         if (homeAnnotation != null)
            home = homeAnnotation.value();
        
         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());
        
         EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass,
                 true, false, homeHandle);

         return metadata;
      }
      // TODO: should be handled locally
      else if(methodName.equals("getHomeHandle"))
      {
         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         return new HomeHandleImpl(remoteHomeBinding.jndiBinding());
      }
      else
      {
         // remove
         return null;
View Full Code Here

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

      log.warn("Populating JBoss-specific annotation metadata manually until done by deployers: " + this);

      // 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)
      {
View Full Code Here

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

         }
         RemoteHome homeAnnotation = this.getAnnotation(RemoteHome.class);
         if (homeAnnotation != null)
            home = homeAnnotation.value();

         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());

         EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass, true, false, homeHandle);

         InvocationResponse response = marshallResponse(statefulInvocation, metadata, null);
         return response;
      }
      else if (unadvisedMethod.getName().equals("getHomeHandle"))
      {
         HomeHandleImpl homeHandle = null;

         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());

         InvocationResponse response = marshallResponse(statefulInvocation, homeHandle, null);
         return response;
      }
      else
View Full Code Here

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

         }
         RemoteHome homeAnnotation = this.getAnnotation(RemoteHome.class);
         if (homeAnnotation != null)
            home = homeAnnotation.value();
        
         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());
        
         EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass,
                 true, false, homeHandle);

         return metadata;
      }
      // TODO: should be handled locally
      else if(methodName.equals("getHomeHandle"))
      {
         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         return new HomeHandleImpl(remoteHomeBinding.jndiBinding());
      }
      else
      {
         // remove
         return null;
View Full Code Here

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

         }
         RemoteHome homeAnnotation = this.getAnnotation(RemoteHome.class);
         if (homeAnnotation != null)
            home = homeAnnotation.value();
        
         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());
        
         EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass,
                 true, false, homeHandle);

         return metadata;
      }
      // TODO: should be handled locally
      else if(methodName.equals("getHomeHandle"))
      {
         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         return new HomeHandleImpl(remoteHomeBinding.jndiBinding());
      }
      else
      {
         // remove
         return null;
View Full Code Here

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

         }
         RemoteHome homeAnnotation = this.getAnnotation(RemoteHome.class);
         if (homeAnnotation != null)
            home = homeAnnotation.value();
        
         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         homeHandle = new HomeHandleImpl(remoteHomeBinding.jndiBinding());
        
         EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass,
                 true, false, homeHandle);

         return metadata;
      }
      // TODO: should be handled locally
      else if(methodName.equals("getHomeHandle"))
      {
         RemoteHomeBinding remoteHomeBinding = this.getAnnotation(RemoteHomeBinding.class);
         assert remoteHomeBinding != null : "remoteHomeBinding is null";
         return new HomeHandleImpl(remoteHomeBinding.jndiBinding());
      }
      else
      {
         // remove
         return null;
View Full Code Here

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

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

            // Set home for policy
            isHome = true;
         }
      }

      // Determine if local and home
      Class<?> localHome = getLocalHomeInterface(container);
      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

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

   }

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

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

Examples of org.jboss.ejb3.annotation.RemoteHomeBinding

      log.warn("Populating JBoss-specific annotation metadata manually until done by deployers: " + this);

      // 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)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.