Package org.jboss.soa.bpel.deployer

Examples of org.jboss.soa.bpel.deployer.BPELDeploymentUnit


          logger.warn("Unable to determine last modified time for: "+top);
        }
       
        // TODO: Need to be a more unique name, as it is possible that more
        // than one deployment descriptor may exist in the same AS archive
        BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), lastModTime);

        if (m_deploymentUnits.containsKey(unit.getName())) {
          doUndeploy(du, top);
        }
                   
         
        logger.info("Deploy: "+top.getSimpleName()+" relativePath="+
            du.getRelativePath());
       
        logger.debug("Deployment unit dir="+parent);
     
        // Explore the deployment unit (in place of previous VFSUtils.explode() which no longer exists)
        java.net.URL url=VFSUtils.getPhysicalURL(parent);
        for (VirtualFile vfile : parent.getChildrenRecursively()) {
          VFSUtils.getPhysicalURL(vfile);
        }
       
        logger.debug("Deployment exploded to dir="+root+" URL="+url);

        java.io.File ddfile=new java.io.File(url.getFile(), du.getSimpleName()); //BPELDeploymentUnit.BPEL_DEPLOY_XML);
       
        if (ddfile.exists() == false) {
          logger.error("Failed to deploy '"+ddfile+
              "', unable to locate deployment descriptor file");
        } else {
          unit.setDeploymentDescriptor(ddfile);
         
          synchronized(m_deploymentUnits) {
            m_deploymentUnits.put(unit.getName(), unit);
           
            if (m_listener != null) {
              m_listener.deploy(unit);
            }
          }
View Full Code Here


      if (top.isTopLevel() == false) {
        top = du.getTopLevel();
      }
     
      try {
        BPELDeploymentUnit prev=m_deploymentUnits.get(top.getSimpleName());
       
        java.io.File deployFile=new java.io.File(((VFSDeploymentUnit)top).getRoot().asFileURL().getFile());
       
        // Undeploy if deployment unit no longer exists on the filesystem, OR
        // the last modified time of the cached deployment unit is older than
        // the last modified time of the current deployment unit, signifying
        // it has been updated and therefore must be undeployed first
       
        if (top instanceof VFSDeploymentUnit &&
            (deployFile.exists() == false ||
                (prev != null && prev.getLastModified() <
                    ((VFSDeploymentUnit)top).getRoot().getLastModified()))) {
          doUndeploy(du, top);
        } else {
          logger.debug("Not undeploying BPEL: "+top.getSimpleName()+" relativePath="+
              du.getRelativePath());
View Full Code Here

   
    logger.info("Undeploy: "+top.getSimpleName()+" relativePath="+
        du.getRelativePath());
   
    // TODO: Unique name - see deploy
    BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), 0);
   
    // NOTE: File required to provide path for use in ODE
    // process store impl. When this is replaced, this information
    // will not be required.
    java.io.File ddfile=new java.io.File(((VFSDeploymentUnit)du).getRoot().toURL().getFile());
   
    unit.setDeploymentDescriptor(ddfile);

    synchronized(m_deploymentUnits) {
      m_deploymentUnits.remove(unit.getName());
     
      if (m_listener != null) {
        m_listener.undeploy(unit);
      }
    }
View Full Code Here

          logger.warn("Unable to determine last modified time for: "+top);
        }
       
        // TODO: Need to be a more unique name, as it is possible that more
        // than one deployment descriptor may exist in the same AS archive
        BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), lastModTime);
       
        java.io.File ddfile=new java.io.File(url.getFile(), du.getSimpleName()); //BPELDeploymentUnit.BPEL_DEPLOY_XML);
       
        if (ddfile.exists() == false) {
          logger.error("Failed to deploy '"+ddfile+
              "', unable to locate deployment descriptor file");
        } else {
          unit.setDeploymentDescriptor(ddfile);
         
          synchronized(m_deploymentUnits) {
            m_deploymentUnits.put(unit.getName(), unit);
           
            if (m_listener != null) {
              m_listener.deploy(unit);
            }
          }
View Full Code Here

     
      logger.info("Undeploy: "+top.getSimpleName()+" relativePath="+
          du.getRelativePath());
     
      try {
        BPELDeploymentUnit prev=m_deploymentUnits.get(top.getSimpleName());
       
        // Undeploy if deployment unit no longer exists on the filesystem, OR
        // the last modified time of the cached deployment unit is older than
        // the last modified time of the current deployment unit, signifying
        // it has been updated and therefore must be undeployed first
        if (top instanceof VFSDeploymentUnit &&
            (((VFSDeploymentUnit)top).getRoot().exists() == false ||
                (prev != null && prev.getLastModified() <
                  ((VFSDeploymentUnit)top).getRoot().getLastModified()))) {
     
          // TODO: Unique name - see deploy
          BPELDeploymentUnit unit=new BPELDeploymentUnit(top.getSimpleName(), 0);
         
          // NOTE: File required to provide path for use in ODE
          // process store impl. When this is replaced, this information
          // will not be required.
          java.io.File ddfile=new java.io.File(((VFSDeploymentUnit)du).getRoot().toURL().getFile());
         
          unit.setDeploymentDescriptor(ddfile);

          synchronized(m_deploymentUnits) {
            m_deploymentUnits.remove(unit.getName());
           
            if (m_listener != null) {
              m_listener.undeploy(unit);
            }
          }
View Full Code Here

public class BPELDeploymentUnitTest extends TestCase {

  public void testGetNameAndLastModified() {
    String name="name";
    long modified=40;
    BPELDeploymentUnit unit=new BPELDeploymentUnit(name, modified);
   
    if (unit.getName() == null || unit.getName().equals(name) == false) {
      fail("Unit name expected '"+name+"', but got: "+unit.getName());
    }
   
    if (unit.getLastModified() != modified) {
      fail("Unit last modified expected '"+modified+"', but got: "+unit.getLastModified());
    }
  }
View Full Code Here

TOP

Related Classes of org.jboss.soa.bpel.deployer.BPELDeploymentUnit

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.