Configure new data sources using scripting
Procedure
- Start wsadmin
- Identify the parent ID:
Jacl:
set newjdbc [$AdminConfig getid /Cell:mycell/Node:mynode/JDBCProvider:JDBC1/] newjdbc = AdminConfig.getid('/Cell:mycell/Node:mynode/JDBCProvider:JDBC1/') print newjdbc
Example output:
JDBC1(cells/mycell/nodes/mynode|resources.xml#JDBCProvider_1)- Obtain the required attributes:
Example output:
Attribute Type name String- Setting up required attributes:
Jacl:
set name [list name DS1] set dsAttrs [list $name] name = ['name', 'DS1'] dsAttrs = [name]
- Create a data source:
Jacl:
set newds [$AdminConfig create DataSource $newjdbc $dsAttrs] $AdminConfig save newds = AdminConfig.create('DataSource', newjdbc, dsAttrs) print newds
Example output:
DS1(cells/mycell/nodes/mynode|resources.xml#DataSource_1)- In a network deployment environment only, synchronize the node.
See Also
AdminConfig object for scripted administration
See Also
Commands for the AdminConfig object