sf-www

Contents

Component Package sf-www

Summary  
Stable: yes
Documentation PDF
Artifacts sf-www JARs
Dependencies XML

Dependencies

This package depends upon (and exports) the Java servlet.API

Examples

Components

DeployByCopyServer

The DeployByCopyServer components allow SmartFrog to manage the deployment of any WAR/EAR or similar artifact to any application server that supports deploy-by-copy deployments, including JBoss and Tomcat.

DeployByCopyServer extends ApplicationServer {
    sfClass "org.smartfrog.services.www.dbc.DeployByCopyServerImpl";
    deployByCopyServerSchema extends DeployByCopyServerSchema;
    serverHost "localhost";
    port 8080;
    synchronousCopy true;
    supportsServletContext false;
    supportsWAR true;
    supportsEAR true;
    supportsSAR false;
}

LivenessPage

The LivenessPage component can test the health of a web page. They can be used to block deployment until a web server is live, and to probe for the existence of a local/remote server. A failure of the remote page to be served, or to meet other declared critera, will cause the regular liveness test to fail, a fact which is reported to the parent. It is up to the parent components to determine what action need be taken.

 LivenessPage extends WorkflowPrim {
     livenessPageSchema extends LivenessPageSchema;
     sfClass "org.smartfrog.services.www.LivenessPageComponent";
     fetchErrorText true;
     minimumResponseCode HttpCodes:START_2XX;
     maximumResponseCode HttpCodes:END_2XX;
     enabled true;
     followRedirects true;
     checkFrequency 1000;
     checkOnStartup false;
     checkOnLiveness true;
     connectTimeout -1;
     headers [];
     host "127.0.0.1";
     protocol "http";
     port 80;
     page "/";
 }

WaitForPage

The WaitForPage component, blocks any workflow until a page is available, and will fail if it is not present by the time the specified timeout is exceeded. The WaitFor component can be used to the same effect, however this custom component reports HTTP errors better.

  WaitForPage extends LivenessPage {
    WaitForPageSchema extends Schema {
      //timeout in milliseconds
      timeout extends Integer;
    }
    sfClass "org.smartfrog.services.www.WaitForPageImpl";
    checkFrequency 500;
    fetchErrorText false;
    checkOnLiveness false;
    sfShouldTerminate true;
  }
  
Get SmartFrog at SourceForge.net. Fast, secure and Free Open Source software downloads