Before starting this task, the wsadmin tool must be running. See the Starting the wsadmin scripting client article for more information.
Perform the following steps to configure a new data source:
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)
Example output:
Attribute Type name String
set name [list name DS1] set dsAttrs [list $name]
name = ['name', 'DS1'] dsAttrs = [name]
set newds [$AdminConfig create DataSource $newjdbc $dsAttrs]
newds = AdminConfig.create('DataSource', newjdbc, dsAttrs) print newds
Example output:
DS1(cells/mycell/nodes/mynode|resources.xml#DataSource_1)
Related concepts
AdminConfig object for scripted administration
Related reference
Commands for the AdminConfig object