1 25 26 package org.objectweb.jonas.ant.jonasbase; 27 28 import java.io.File ; 29 30 import org.apache.tools.ant.BuildException; 31 import org.objectweb.jonas.ant.JOnASBaseTask; 32 33 37 public class Dbm extends JTask implements BaseTaskItf { 38 39 42 private static final String INFO = "[DBM] "; 43 44 47 private static final String DATASOURCES_PROPERTY = "jonas.service.dbm.datasources"; 48 49 52 private String dataSources = null; 53 54 57 public Dbm() { 58 super(); 59 } 60 61 65 public void setdataSources(String dataSources) { 66 this.dataSources = dataSources; 67 } 68 69 70 73 private void checkProperties() { 74 if (dataSources == null) { 75 throw new BuildException(INFO + "Property 'dataSource ' is missing."); 76 } 77 } 78 79 82 public void execute() { 83 checkProperties(); 84 85 String jBaseConf = getDestDir().getPath() + File.separator + "conf"; 87 changeValueForKey(INFO, jBaseConf, JOnASBaseTask.JONAS_CONF_FILE, 88 DATASOURCES_PROPERTY, dataSources, false); 89 90 91 } 92 } | Popular Tags |