> Is it permissible to have repeated identical "ns_section" calls in the
> nsd.tcl configuration files?  Specifically, could I have more than
> one "ns_section ns/db/pools" section in the file, or would the second one
> wipe the values of the parameters I set in the first one?

You can have "ns_section X" twice, and the contents will accumulate.

Here's a section from my template nsd.tcl.  It calls
"ns_section ns/db/pools" three times.

    if {[info exists env(ORACLE_USER)] && [info exists env(ORACLE_PASSWORD)]} {
        set db_p 1
        set dbuser $env(ORACLE_USER)
        set dbpassword $env(ORACLE_PASSWORD)
    } else {
        set db_p 0
    }

    proc db_pool {pool connections} {
            global dbuser dbpassword

            ns_section ns/db/pools
                    ns_param $pool $pool

            ns_section ns/db/pool/$pool
                    ns_param driver ora8
                    ns_param connections $connections
                    ns_param datasource test_ipc.cog.dqd.com
                    ns_param user $dbuser
                    ns_param password $dbpassword
                    ns_param verbose off
                    ns_param warnempty on
    }

    if $db_p {
        ns_section ns/db/drivers
                ns_param ora8 ora8.so

        ns_section ns/db/driver/ora8
                ns_param debug off

        db_pool main 5
        db_pool subquery 2
        db_pool log 2
    }

Reply via email to