Package org.jboss.wsf.spi.deployment

Examples of org.jboss.wsf.spi.deployment.Deployment


      return spiProvider.getSPI(LifecycleHandlerFactory.class).newLifecylceHandler();
   }

   private InvocationHandler getInvocationHandler(Endpoint ep)
   {
      Deployment dep = ep.getService().getDeployment();
      String key = dep.getType().toString();

      // Use a special key for MDB endpoints
      EJBArchiveMetaData uapp = dep.getAttachment(EJBArchiveMetaData.class);
      if (uapp != null)
      {
         EJBMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
         if (bmd instanceof MDBMetaData)
         {
View Full Code Here


      if(! (transportSpec instanceof HttpSpec))
         throw new IllegalArgumentException("Unknown TransportSpec " + transportSpec);
      HttpSpec httpSpec = (HttpSpec)transportSpec;

      // Create JBossWebMetaData and attach it to the DeploymentUnit
      Deployment topLevelDeployment = endpoint.getService().getDeployment();
      JBossWebMetaData jbwMetaData = generator.create(topLevelDeployment);

      // Server config
      SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
      ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
View Full Code Here

   }

   public void destroyListener(ListenerRef ref)
   {
      Deployment dep = deploymentRegistry.get(ref.getUUID());
      if(null==dep)
         throw new IllegalArgumentException("Unknown ListenerRef " + ref);

      undeploy(dep);
      deploymentRegistry.remove(ref.getUUID());
View Full Code Here

   /**
    * The deployment should be created in phase 1.
    */
   public Deployment createDeployment(DeploymentUnit unit)
   {
      Deployment dep = unit.getAttachment(Deployment.class);
      if (null == dep)
         throw new IllegalStateException("spi.Deployment missing. It should be created in Phase 1");

      return dep;
   }
View Full Code Here

   public boolean isWebServiceDeployment(DeploymentUnit unit)
   {
      if (super.isWebServiceDeployment(unit) == false)
         return false;

      Deployment deployment = unit.getAttachment(Deployment.class);
      return deployment != null;
   }
View Full Code Here

   {
      if(!ignoreDeployment(unit) && isWebServiceDeployment(unit))
      {
         super.deploy(unit); // Calls create

         Deployment dep = unit.getAttachment(Deployment.class);
         if(null==dep || DeploymentState.CREATED != dep.getState())
            throw new DeploymentException("Create step failed");

         // execute the 'start' step
         getWsfRuntime().start(dep);
View Full Code Here

      if(! (transportSpec instanceof HttpSpec))
         throw new IllegalArgumentException("Unknown TransportSpec " + transportSpec);
      HttpSpec httpSpec = (HttpSpec)transportSpec;

      // Create JBossWebMetaData and attach it to the DeploymentUnit
      Deployment topLevelDeployment = endpoint.getService().getDeployment();

      // TODO: Somehow the ServletClass and InitParameter need to go from TransportSpec into generator
      topLevelDeployment.setProperty(HttpSpec.PROPERTY_WEBAPP_SERVLET_CLASS, httpSpec.getServletClass());
      topLevelDeployment.setProperty(HttpSpec.PROPERTY_WEBAPP_CONTEXT_PARAMETERS, httpSpec.getContextParameter());     
      JBossWebMetaData jbwMetaData = generator.create(topLevelDeployment);
      deploymentFactory.create(topLevelDeployment, jbwMetaData);

      SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
      ServerConfigFactory spi = provider.getSPI(ServerConfigFactory.class);
View Full Code Here

   {
      if (!ignoreDeployment(unit) && isWebServiceDeployment(unit))
      {
         log.debug("deploy: " + unit.getName());

         Deployment dep = getDeployment(unit);
         if (dep == null)
         {
            dep = createDeployment(unit);
            dep.addAttachment(DeploymentUnit.class, unit);
         }

         if(Deployment.DeploymentState.UNDEFINED == dep.getState())
         {
            getWsfRuntime().create(dep);
            unit.addAttachment(Deployment.class, dep);
         }
         else
         {
            throw new IllegalArgumentException("Cannot process Deployment in state " + dep.getState() + ": " + dep);
         }
      }
   }
View Full Code Here

   public void undeploy(DeploymentUnit unit)
   {
      if (ignoreDeployment(unit))
         return;

      Deployment dep = getDeployment(unit);
      if (dep != null)
      {
         log.debug("undeploy: " + unit.getName());
         getWsfRuntime().stop(dep);
         getWsfRuntime().destroy(dep);
View Full Code Here

   /** Get the Deployment for a given DeploymentUnit
    */
   public Deployment getDeployment(DeploymentUnit unit)
   {
      Deployment dep = unit.getAttachment(Deployment.class);
      return (dep != null && dep.getType() == getDeploymentType() ? dep : null);
   }
View Full Code Here

TOP

Related Classes of org.jboss.wsf.spi.deployment.Deployment

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.