public class CreatePersistenceInstanceTask extends AbstractBaseTask
A Rhino management sub task for creating a persistence instance that can be used by a database resource.
Attribute | Description | Required |
---|---|---|
name |
Name of the persistence instance to create. This name must be unique. |
type |
Type of the persistence instance to create, eg. 'jdbc' or 'cassandra'. |
No. Defaults to 'jdbc'. |
datasourceclass |
Fully-qualified class name the the datasource class to be used by the persistence instance. |
Only if 'type' is 'jdbc'. |
failonerror |
Element | Description | Required |
---|---|---|
configproperty |
Identifies a configuration property of the datasource class.
See |
One |
This task will throw a NonFatalBuildException
if a persistence instance with the same name already exists.
client, failOnError
Constructor and Description |
---|
CreatePersistenceInstanceTask() |
Modifier and Type | Method and Description |
---|---|
void |
addConfiguredConfigProperty(ConfigPropertyElement element) |
protected void |
execute() |
void |
setDatasourceClass(String datasourceClassName) |
void |
setName(String name) |
void |
setType(String type) |
protected void |
validateParameters() |
getExceptionAndMessage, getFailOnError, getMessage, getOverrideFailOnError, getParent, getProject, log, run, setFailOnError
protected void execute() throws org.apache.tools.ant.BuildException
execute
in class AbstractBaseTask
org.apache.tools.ant.BuildException
protected void validateParameters() throws org.apache.tools.ant.BuildException
validateParameters
in class AbstractBaseTask
org.apache.tools.ant.BuildException
public void setName(String name)
public void setType(String type)
public void setDatasourceClass(String datasourceClassName)
public void addConfiguredConfigProperty(ConfigPropertyElement element)