com.ibm.websphere.ant.tasks
Class DefaultBindings
- java.lang.Object
Task
com.ibm.websphere.ant.tasks.DefaultBindings
- public class DefaultBindings
- extends Task
The outputFile attribute is required and contains the path of the bound ear.
The defaultDataSource attribute is optional. It specifies a default data source JNDI name to be used for all EJB 1.x CMPs.
The dbUser attribute is optional. It specifies the user associated with the default data source.
The dbPassword attribute is optional. It specifies the password associated with the default data source.
The defaultConnectionFactory attribute is optional. It specifies the default connection factory to be used for all EJB 2.x CMPs.
The resAuth attribute is optional. It specifies the resource authorization on the connection factory for EJB 2.x CMPs.
The ejbJndiPrefix attribute is optional. It specifies a prefix that is prepended to any generated EJB JNDI names. The default is "ejb".
The virtualHost attribute is optional. It specifies the virtual host for all wars in the application.
The forceBindings attribute is optional. When false, any pre-existing bindings will not be altered. When true, new bindings are completely generated. The default is false.
The strategy attribute is optional. When specified, this attribute points to a custom strategy file that further affects the bindings. See the properties/dfltbndngs.dtd of your WebSphere installation for more details.
The failonerror attribute is optional. When this is specified the build will fail if any exception is thrown. The default is true.
The exportFile attribute is optional. When specified, it points to a file that will be generated containing the bindings information. This file is in the custom strategy format.
To use this task, add the following to your Ant build.xml
Constructor Summary
Constructor and Description |
---|
DefaultBindings()
The default constructor.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
execute()
Executes the ant task, i.e. opens the ear file, populates it with bindings
and writes out to the output ear.
|
|
getDbPassword()
Gets the password associated with the default data source.
|
|
getDbUser()
Gets the userid associated with the default data source.
|
|
getDefaultConnectionFactory()
Gets the JNDI name of defaultConnectionFactory.
|
|
getDefaultDataSource()
Gets the JNDI name of the default data source.
|
|
getEar()
Gets the ear.
|
|
getEjbJndiPrefix()
Gets the ejbJndiPrefix.
|
|
getExportFile()
Returns the exportFile.
|
|
getForceBindings()
Gets the forceBindings flag.
|
|
getOutputFile()
Gets the outputFile.
|
|
getResAuth()
Gets the resAuth.
|
|
getStrategy()
Gets the strategy.
|
|
getVirtualHost()
Gets the virtualHost.
|
|
setDbPassword(java.lang.String dbPassword)
Sets the password associated with the default data source.
|
|
setDbUser(java.lang.String dbUser)
Sets userid associated with the default data source.
|
|
setDefaultConnectionFactory(java.lang.String defaultConnectionFactory)
Sets the JNDI name of defaultConnectionFactory.
|
|
setDefaultDataSource(java.lang.String defaultDataSource)
Sets thethe JNDI name of the default data source.
|
|
setEar(java.lang.String ear)
Sets the ear.
|
|
setEjbJndiPrefix(java.lang.String ejbJndiPrefix)
Sets the ejbJndiPrefix.
|
|
setExportFile(java.lang.String exportFile)
Sets the exportFile.
|
|
setFailonerror(boolean failonerror)
Sets the failonerror flag.
|
|
setForceBindings(boolean forceBindings)
Sets the forceBindingsflag
|
|
setOutputFile(java.lang.String outputFile)
Sets the outputFile.
|
|
setResAuth(java.lang.String resAuth)
Sets the resAuth.
|
|
setStrategy(java.lang.String strategy)
Sets the strategy.
|
|
setVirtualHost(java.lang.String virtualHost)
Sets the virtualHost.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
DefaultBindings
- public DefaultBindings()
The default constructor.
Method Detail
execute
- public void execute()
- throws BuildException
Executes the ant task, i.e. opens the ear file, populates it with bindings
and writes out to the output ear.
getDbPassword
- public java.lang.String getDbPassword( )
Gets the password associated with the default data source.
setDbPassword
- public void setDbPassword(java.lang.String dbPassword)
Sets the password associated with the default data source.
getDbUser
- public java.lang.String getDbUser( )
Gets the userid associated with the default data source.
setDbUser
- public void setDbUser(java.lang.String dbUser)
Sets userid associated with the default data source.
getDefaultConnectionFactory
- public java.lang.String getDefaultConnectionFactory( )
Gets the JNDI name of defaultConnectionFactory. Note that
this is meaningful for EJB jars containing EJB 2.x CMPs.
Returns:
Returns a String
setDefaultConnectionFactory
- public void setDefaultConnectionFactory( java.lang.String defaultConnectionFactory)
Sets the JNDI name of defaultConnectionFactory. Note that
this is meaningful for EJB jars containing EJB 2.x CMPs.
Parameters:
defaultConnectionFactory
- The defaultConnectionFactory to set getDefaultDataSource
- public java.lang.String getDefaultDataSource( )
Gets the JNDI name of the default data source. Note that
this is meaningful for EJB jars containing EJB 1.x CMPs.
Returns:
Returns a String
setDefaultDataSource
- public void setDefaultDataSource( java.lang.String defaultDataSource)
Sets thethe JNDI name of the default data source. Note that
this is meaningful for EJB jars containing EJB 1.x CMPs.
Parameters:
defaultDataSource
- The defaultDataSource to set getEar
- public java.lang.String getEar( )
Gets the ear.
Returns:
Returns a String
setEar
- public void setEar(java.lang.String ear)
Sets the ear.
Parameters:
ear
- The ear to set getEjbJndiPrefix
- public java.lang.String getEjbJndiPrefix( )
Gets the ejbJndiPrefix.
Returns:
Returns a String
setEjbJndiPrefix
- public void setEjbJndiPrefix(java.lang.String ejbJndiPrefix)
Sets the ejbJndiPrefix.
Parameters:
ejbJndiPrefix
- The ejbJndiPrefix to set getForceBindings
- public boolean getForceBindings( )
Gets the forceBindings flag.
Returns:
Returns a boolean
setForceBindings
- public void setForceBindings(boolean forceBindings)
Sets the forceBindingsflag
getOutputFile
- public java.lang.String getOutputFile( )
Gets the outputFile.
Returns:
Returns a String
setOutputFile
- public void setOutputFile(java.lang.String outputFile)
Sets the outputFile.
Parameters:
outputFile
- The outputFile to set getResAuth
- public java.lang.String getResAuth( )
Gets the resAuth.
Returns:
Returns a String
setResAuth
- public void setResAuth(java.lang.String resAuth)
Sets the resAuth.
Parameters:
resAuth
- The resAuth to set getStrategy
- public java.lang.String getStrategy( )
Gets the strategy.
Returns:
Returns a String
setStrategy
- public void setStrategy(java.lang.String strategy)
Sets the strategy.
Parameters:
strategy
- The strategy to set getVirtualHost
- public java.lang.String getVirtualHost( )
Gets the virtualHost.
Returns:
Returns a String
setVirtualHost
- public void setVirtualHost(java.lang.String virtualHost)
Sets the virtualHost.
Parameters:
virtualHost
- The virtualHost to set getExportFile
- public java.lang.String getExportFile( )
Returns the exportFile.
Returns:
String
setExportFile
- public void setExportFile(java.lang.String exportFile)
Sets the exportFile.
Parameters:
exportFile
- The exportFile to set setFailonerror
- public void setFailonerror(boolean failonerror)
Sets the failonerror flag.
Parameters:
failonerror
- The failonerror to set