Package org.jboss.ejb3.proxy.factory.stateless

Examples of org.jboss.ejb3.proxy.factory.stateless.StatelessLocalProxyFactory


   }

   @Override
   protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
   {
      Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
     
      try
      {
         // start the deployment
         ejb3Deployment.start();
      }
      catch (Exception e)
      {
         throw new DeploymentException("Error starting Ejb3Deployment: " + ejb3Deployment.getName(), e);
      }
   }
View Full Code Here


   }
  
   @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

      return false;
   }
  
   public void undeploy(VFSDeploymentUnit unit)
   {
      Ejb3Deployment deployment = unit.getAttachment(Ejb3Deployment.class);
      if (deployment == null) return;
      try
      {
         deployment.stop();
      }
      catch (Exception e)
      {
         log.error("failed to stop deployment", e);
      }
      try
      {
         deployment.destroy();
      }
      catch (Exception e)
      {
         log.error("failed to destroy 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

   }

   private static String getLocalJndiName(JBossEnterpriseBeanMetaData ejb, Class<?> ejbClass)
   {
      // See if local binding is explicitly-defined
      LocalBinding localBinding = ejbClass.getAnnotation(LocalBinding.class);

      // If none specified
      if (localBinding == null || (localBinding.jndiBinding() != null && localBinding.jndiBinding().trim().length() == 0))
      {
         String name = ejb.getLocalJndiName();
         return name;
      }
      // Local Binding was explicitly-specified, use it
      else
      {
         return localBinding.jndiBinding();
      }
   }
View Full Code Here

      // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String name = new Date().toString();
      String applicationClientName = "ee5client_test";
      String args[] = { name };
     
      ClientLauncher launcher = new ClientLauncher();
      Properties env = getENCProps(applicationClientName);
      launcher.launch(mainClassName, applicationClientName, args, env);
     
      Class<?> clientClass = ClientLauncher.getTheMainClass();
      Class<?> empty[] = {};
      {
         Method getResult = clientClass.getDeclaredMethod("getResult", empty);
View Full Code Here

   {
      String mainClassName = SimpleResourceClient.class.getName();
      String applicationClientName = "ee5client-simpleresource-client"; // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String args[] = { };

      ClientLauncher launcher = new ClientLauncher();
      launcher.launch(mainClassName, applicationClientName, args);
   }
View Full Code Here

   {
      String mainClassName = SimpleResourceClient.class.getName();
      String applicationClientName = "ee5client-simpleresource-client"; // must match JNDI name in jboss-client.xml or display-name in application-client.xml
      String args[] = { };
     
      ClientLauncher launcher = new ClientLauncher();
      launcher.launch(mainClassName, applicationClientName, args);
   }
View Full Code Here

      // JNDI name in jboss-client.xml or display-name in application-client.xml, or client jar simple name
      String applicationClientName = "refs-client";
      String name = new Date().toString();
      String args[] = { name };
     
      ClientLauncher launcher = new ClientLauncher();
      Properties env = getENCProps(applicationClientName);
      launcher.launch(mainClassName, applicationClientName, args, env);

      // Need to use the client class obtained from the launcher
      Class<?> clientClass = ClientLauncher.getTheMainClass();
      Class<?> empty[] = {};
      {
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.proxy.factory.stateless.StatelessLocalProxyFactory

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.