Set new connection pools using scripting


 

+

Search Tips   |   Advanced Search

 

Use scripting and wsadmin to configure new connection pools.

  1. Start wsadmin

  2. Identify the parent ID:

    ### Jacl
    set newds [$AdminConfig getid /Cell:mycell/Node:mynode/JDBCProvider:JDBC1/DataSource:DS1/]

    ###Jython...
    newds = AdminConfig.getid('/Cell:mycell/Node:mynode/JDBCProvider:JDBC1/DataSource:DS1/')

    Example output...

    DS1(cells/mycell/nodes/mynode|resources.xml$DataSource_1)

  3. Create connection pool:

    ### Jacl
    $AdminConfig create ConnectionPool $newds {}

    ### Jython
    print AdminConfig.create('ConnectionPool', newds, [])

    Example output...

    (cells/mycell/nodes/mynode|resources.xml#ConnectionPool_1)
  4. Save the configuration changes.
  5. Synchronize the node

 

Related tasks

Use the AdminConfig object for scripted administration

 

Related

Commands for the AdminConfig object