Ubik Batch Server Cold Deployment
From UbikWiki
Contents |
Cold deployment
What is it
This feature enables the (re)deployment at Server Startup of one or more BARs:
- If BAR is already deployed the new version is deployed
- If BAR is not deployed, it is deployed. If file called “<BAR_ID>-binding.xml” is present it is used to customize Pools binding otherwise default mapping is used
What it does exactly
At Startup, the Batch Server will do the following:
- If BAR with another version exists, it will be undeployed
- If file <BAR_ID>-binding.xml exists in batches-cold-deploy folder it will be used
- If file <BAR_ID>-binding.xml does not exist in batches-cold-deploy but exists batches-deploy it will be used
- Otherwise a default binding that maps logical to same physical name will be created
- The BAR will be deployed
- If it succeeds:
- It will appear in deployed BARs on BatchAdmin application
- Success will appear in Deployment History on BatchAdmin application
- If it fails:
- old BAR (if there was one) will be undeployed
- New BAR will not be deployed and moved to batches-deploy-failure and a file called <BAR File Name>.failure will be written that will contains the Failure
- Failure will appear in Deployment History on BatchAdmin application
How To
To do this:
- Put the bar in folder “<INSTALL_DIRECTORY>\batches-cold-deploy”
- Put a file called “<BAR_ID>-binding.xml” where BAR_ID is the <display-name > in bar.xml to customize JNDI Mapping (see next paragraph)
JNDI Mapping Customization
If you have to customize the mapping of JNDI resources (Pools), example map jdbc/masterdatas to jdbc/masterdatas_beta, you must put in the folder “<INSTALL_DIRECTORY>\batches-cold-deploy” a file called “<BAR_ID>-binding.xml” where BAR_ID is the <display-name > in bar.xml.
Example: If your BAR_ID is “STCOM_BATCH”, you will put a file called STCOM_BATCH-binding.xml that contains:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE bar-resources PUBLIC "-//Ubik-Ingenierie //DTD BAR Binding Resource Configuration 1.0//EN" "http://www.ubik-ingenierie.com/consolebatch/config/bar-binding.dtd"> <bar-resources> <bar-resource nameinbar="jdbc/masterdatas" boundname="jdbc/masterdatas_vbeta" /> <bar-resource nameinbar="jdbc/stcom" boundname="jdbc/stcom" /> </bar-resources>