DevPortal

How do I Validate Application Properties?


The validation tags define the validation behavior of the Deploy Service during deployment. The Deploy Service provides for two types of validations:

How do I Perform DTD Validation?

DTD validation is also performed during creation of the document object model (DOM) structure from Deployment Descriptors. All validation flags can be controlled based on the application action, such as, turn on validation for deploy, turn it off for re-deploy, and so on.

The <validation> tag in the deploy-config.xml shows this:

  1. Application Archive Validation - The <app-archive-validation> tag has configuration information using which you can enable application validation. Application validation can be done at deploy time, on subsequent deployments, or the archive, and at application startup.

    These can be specified by setting the respective attributes to either true or false:

    <app-archive-validation on-deploy="true" on-redeploy="true" on-start="false"/>

    This property can also be set using the Deploy Tool.

  2. DTD Validation - The <dtd-validation> tag is used to enable DTD validation of the applications:

    <dtd-validation on-deploy="false" on-redeploy="false" on-start="false"/>
  3. Application Start Validation - Application validation at startup can be enabled using the <app-start-validation> tag:
    <span style="font-family: monospace;"><app-start-validation enabled="true"><span>

    This property can also be done using the Deploy Tool.

  4. Checking Rules on Application Startup - Rules checks exclusively for CMP beans where the mapping information is validated. The db-table-check checks for existence of the tables the beans are mapped against, while the db-table-mapping-check checks for all CMP field mapping.

    <app-start-validation enabled="true">
      <rules>
        <db-table-check enabled="true"/>
        <db-table-mapping-check enabled="true"/>
      </rules>
    </app-start-validation>
    

How do I Retain Container Generated Files During Deployment?

While deploying EJB components, the container generates various implementation classes for Home Interfaces and Remote Interfaces of the beans. These class files are directly placed in the containers classpath and used. The Deploy Service by default doesn’t retain a copy of the generated source file. These generated source files can be retained on deployment for debugging purposes. The <retain-generated-files> tag can be used to specify this as: <retain-generated-java-files>false<retain-generated-java-files>

The generated source files (.java files ) are placed in application directory of the <install_dir>/server/nodes/default/archives/<app_name>/<app_name_version>/java.

The Deploy Service by default removes all generated files on deployment failures. These can be retained by setting the <retain-files-on-deploy-failure> tag to true as: <retain-files-on-deploy-failure>true<retain-files-on-deploy-failure>

Again, this feature can be used while debugging applications. This property can also be set using the Deploy Tool.


Related Topics:

© Pramati Technologies 2007 Runs on Pramati Server | Feedback | Legal