JDBCProviderManagement command group for the AdminTask object
You can use the Jython or Jacl scripting languages in interactive mode to configure data access and data sources with scripting. The commands and parameters in the JDBCProviderManagement group can be used to create or list data sources and Java database connectivity (JDBC) providers. The JDBCProviderManagement command group for the AdminTask object includes the following commands:
createDatasource
The createDatasource command creates a new data source to access the back end data store. Application components use the data source to access connection instances to your database.
Target object
JDBC Provider Object ID - The configuration object of the JDBC provider to which the new data source will belong.
Parameters and return values
- - name
- The name of the data source. (String, required)
- -jndiName
- The Java Naming and Directory Interface (JNDI) name. (String, required)
- -description
- The description of the data source. (String, optional)
- -category
- The category used to to classify a group of data sources. (String, optional)
- -dataStoreHelperClassName
- The name of the DataStoreHelper implementation class that extends the capabilities of the selected JDBC driver implementation class to perform data-specific functions. WAS provides a set of DataStoreHelper implementation classes for each of the JDBC provider drivers it supports. (String, required)
- -componentManagedAuthenticationAlias
- The alias used for database authentication at run time. This alias is only used when the application resource reference is using res-auth=Application. (String, optional)
- -containerManagedPersistence
- Specifies if the data source is used for container managed persistence for enterprise beans. The default value is true. (Boolean, optional)
- configureResourceProperties
- This command step configures the resource properties that are required by the data source. (Required) You can specify the following parameters for this step:
- name
- The name of the resource property. (String, required)
- type
- The type of the resource property. (String, required)
- value
- The value of the resource property. (String, required)
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask createDatasource {-interactive}
- Use Jython string:
AdminTask.createDatasource ('[-interactive]')
- Use Jython list:
AdminTask.createDatasource (['-interactive'])
createJDBCProvider
The createJDBCProvider command creates a new Java database connectivity provider (JDBC) used to to connect to a relational database for data access.
Target object
None
Parameters and return values
- -scope
- The scope for the new JDBC provider. Provide the scope in the form type=name. Type can be Cell, Node, Server, Application, or Cluster, and name is the name of the specific instance of the cell, node, server, application, or cluster that you are using. The default is none. (String, required)
- -databaseType
- The type of database that will be used by the JDBC provider. For example, DB2, Derby, Informix, Oracle, and so on. (String, required)
- -providerType
- The JDBC provider type that will be used by the JDBC provider. (String, required)
- -implementationType
- The implementation type for this JDBC provider. Use Connection pool data source if your application runs in a single phase or a local transaction. Otherwise, use XA data source to run in a global transaction. (String, required)
- -name
- The name of the JDBC provider. The default is the value from the provider template. (String, optional)
- -description
- The description for the JDBC provider. (String, optional)
- -implementationClassName
- Specifies the Java class name for the JDBC driver implementation. (String, optional)
- -classpath
- Specifies a list of paths or JAR file names that form the location for the resource provider classes. (String, optional)
- -nativePath
- Specifies a list of paths that form the location for the resource provider native libraries. (String, optional)
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask createJDBCProvider {-interactive}
- Use Jython string:
AdminTask.createJDBCProvider ('[-interactive]')
- Use Jython list:
AdminTask.createJDBCProvider (['-interactive'])
listDatasources
Use the listDatasources command to list data sources that are contained in the specified scope.
Target object
None
Parameters and return values
- -scope
- The scope for the data sources that will be listed. Provide the scope in the form type=name. Type can be Cell, Node, Server, Application, or Cluster, and name is the name of the specific instance of the cell, node, server, application, or cluster that you are using. The default is All. (String, optional)
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask listDatasources {-interactive}
- Use Jython string:
AdminTask.listDatasources ('[-interactive]')
- Use Jython list:
AdminTask.listDatasources (['-interactive'])
listJDBCProviders
The listJDBCProviders command lists JDBC providers that are contained in the specified scope.
Target object
None
Parameters and return values
- -scope
- The scope for the JDBC providers that will be listed. Provide the scope in the form type=name. Type can be Cell, Node, Server, Application, or Cluster, and name is the name of the specific instance of the cell, node, server, application, or cluster that you are using. The default is All. (String, optional)
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask listJDBCProviders {-interactive}
- Use Jython string:
AdminTask.listJDBCProviders ('[-interactive]')
- Use Jython list:
AdminTask.listJDBCProviders (['-interactive'])
Related tasks
Use the AdminTask object for scripted administration
Related Reference
Commands for the AdminTask object
Reference topic