Package org.jboss.ejb3.annotation

Examples of org.jboss.ejb3.annotation.RemoteBindings


   }
  
   @Override
   public void undeploy(VFSDeploymentUnit unit, JBossMetaData metadata)
   {
      Ejb3Deployment deployment = unit.getAttachment(Ejb3Deployment.class);
      if(deployment == null)
         return;

      try
      {
         deployment.stop();
      }
      catch(Exception e)
      {
         log.warn("Failed to stop deployment " + deployment, e);
      }
      try
      {
         deployment.destroy();
      }
      catch(Exception e)
      {
         log.warn("Failed to destroy deployment " + deployment, e);
      }
View Full Code Here


  
   @Override
   protected void registerEJBContainer(Container container) throws Exception
   {
      // Add the jndi supplies
      MCDependencyPolicy dependsPolicy = (MCDependencyPolicy) container.getDependencyPolicy();
      EJBContainer ejbContainer = (EJBContainer) container;
      JBossEnterpriseBeanMetaData beanMD = ejbContainer.getXml();

      ContainerDependencyMetaData cdmd = null;
      if(endpoints != null)
      {
         String ejbKey = "ejb/" + jbossUnit.getRelativePath() + "#" + container.getEjbName();
         cdmd = endpoints.get(ejbKey);
      }
      else
      {
         log.warn(jbossUnit+" has no ContainerDependencyMetaData attachment");
      }

      if(cdmd != null)
      {
         for(String jndiName : cdmd.getJndiNames())
         {
         String supplyName = JNDIKernelRegistryPlugin.JNDI_DEPENDENCY_PREFIX + jndiName;
         AbstractSupplyMetaData supply = new AbstractSupplyMetaData(supplyName);
         dependsPolicy.getSupplies().add(supply);
         }
      }

      // EJBTHREE-1335: container name in meta data
      generateContainerName(container, beanMD);
     
      // setup switchboard
      Barrier switchBoard = this.getSwitchBoardBarrier(container);
      // the container cannot function without an SwitchBoard Barrier
      if (switchBoard == null)
      {
         throw new RuntimeException("No SwitchBoard Barrier found for bean: " + container.getEjbName() + " in unit: "
               + this.jbossUnit + " (or its component deployment unit)");
      }
      // add dependency on START (and not INSTALLED) state of Switchboard, since the container only requires a fully populated ENC context,
      // but doesn't require a invokable context. An invokable context is only needed by Injector.
      dependsPolicy.addDependency(this.createSwitchBoardDependency(ejbContainer, switchBoard));
      log.debug("Added dependency on Switchboard " + switchBoard.getId() + " for EJB container " + ejbContainer.getName());
     
     
      // create and setup Injector(s) for InjectionManager 
      InjectionManager injectionManager = this.getInjectionManager(container);
View Full Code Here

      }

      // Create the metadata for the bean to install
      AbstractBeanMetaData bean = new AbstractBeanMetaData(name, service.getClass().getName());
      bean.setConstructor(new AlreadyInstantiated(service));
      MCDependencyPolicy policy = (MCDependencyPolicy) dependencies;
      bean.setDepends(policy.getDependencies());
      bean.setDemands(policy.getDemands());
      bean.setSupplies(policy.getSupplies());
      log.info("installing bean: " + name);
      log.info("  with dependencies:");
      for (Object obj : policy.getDependencies())
      {
         Object msgObject = obj;
         if (obj instanceof AbstractDemandMetaData)
         {
            msgObject = ((AbstractDemandMetaData)obj).getDemand();
         }
         log.info("\t" + msgObject);
      }
      log.info("  and demands:");
      for(DemandMetaData dmd : policy.getDemands())
      {
         log.info("\t" + dmd.getDemand() + "; Required: " + dmd.getWhenRequired().getStateString());
      }
      log.info("  and supplies:");
      for(SupplyMetaData smd : policy.getSupplies())
      {
         log.info("\t" + smd.getSupply());
      }

      if(service instanceof EJBContainer)
View Full Code Here

            initParameterTypes = unadvisedMethod.getParameterTypes();
            initParameterValues = statefulInvocation.getArguments();
         }

         RemoteBinding binding = null;
         RemoteBindings bindings = this.getAnnotation(RemoteBindings.class);
         if (bindings != null)
            binding = bindings.value()[0];
         else
            binding = this.getAnnotation(RemoteBinding.class);

         StatefulSessionContainerMethodInvocation newStatefulInvocation = buildNewInvocation(
                 info, statefulInvocation, initParameterTypes,
View Full Code Here

    */
   @Deprecated
   protected RemoteBinding getRemoteBinding()
   {
      RemoteBinding binding = null;
      RemoteBindings bindings = getAnnotation(RemoteBindings.class);
      if (bindings != null)
         binding = bindings.value()[0];
      else
         binding = getAnnotation(RemoteBinding.class);
     
      return binding;
   }
View Full Code Here

    */
   @Deprecated
   protected RemoteBinding getRemoteBinding()
   {
      RemoteBinding binding = null;
      RemoteBindings bindings = getAnnotation(RemoteBindings.class);
      if (bindings != null)
         binding = bindings.value()[0];
      else
         binding = getAnnotation(RemoteBinding.class);
     
      return binding;
   }
View Full Code Here

       * http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157770
       */
      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)
View Full Code Here

    */
   @Deprecated
   protected RemoteBinding getRemoteBinding()
   {
      RemoteBinding binding = null;
      RemoteBindings bindings = getAnnotation(RemoteBindings.class);
      if (bindings != null)
         binding = bindings.value()[0];
      else
         binding = getAnnotation(RemoteBinding.class);
     
      return binding;
   }
View Full Code Here

      for (Class<?> clazz : remotes)
      {
         if (clazz.getName().equals(businessInterface.getName()))
         {
            // Check for declared @RemoteBindings
            RemoteBindings bindings = ((EJBContainer) container).getAnnotation(RemoteBindings.class);
            if (bindings != null)
            {
               // Encountered, return
               return bindings.value()[0].jndiBinding();
            }
            // Check for declared @RemoteBinding
            RemoteBinding binding = ((EJBContainer) container).getAnnotation(RemoteBinding.class);
            if (binding != null)
            {
View Full Code Here

       * http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157770
       */
      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)
View Full Code Here

TOP

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

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.