1 Reply Latest reply on Jun 28, 2007 1:05 PM by adrian.brock

    New VFSDeployer Change Question

      In reading about the VFSDeployer change, I was wondering how this might affect what is needed to say create a Deployer for Seam

      Seam has a class that deploys Seam applications based on a File class (see code below) and not using VFS. Will your change mean that it will be easier to wrap Seam's class into a simpler Depoyer class rather than having to create a new seperate deployment classes for Seam in MC.

      Sorry for being so green on this stuff. :)

      try
       {
       log.info("scanning: " + urlPath);
       File file = new File(urlPath);
       if ( file.isDirectory() )
       {
       handleDirectory(file, null);
       }
       else
       {
       handleArchive(file);
       }
       }
       catch (IOException ioe)
       {
       log.warn("could not read entries", ioe);
       }
      


      Thanks, if I made no sense, let me know and we can delete this thread and forget I said anything. :)

        • 1. Re: New VFSDeployer Change Question

          A deployer for seam should just be a case of something that modifies
          the WebMetaData to add the seam servlet context listener (or whatever
          mechanism it uses).

          public MySeamDeployer extends AbstractSimpleVFSRealDeployer<WebMetaData>
          
          public MySeamDeployer()
          {
           super(WebMetaData.class);
           // We modify the web metadata - i.e. we are filter that inputs/outputs WebMetaData
           setOutputs(WebMetaData.class);
          }
          
          public void deploy(VFSDeploymentUnit unit, WebMetaData webMetaData) throws DeploymentException
          {
           if (isSeamDeployment(unit))
           modifyWebMetaDataToAddSeamIfNotAlreadyPresent(webMetaData);
          }
          


          WebMetaData is the object model for [jboss-]web.xml

          Once that is done, you can just deploy a normal war with seam metadata
          (or annotated classes) and it will automatically make the necessary
          configuration changes to web.xml