get_JDBCProvider.jacl

 


###
### get_JDBCProvider.jacl
###
###
### General JACL configuration code by reading
### from an existing configuration
###
### Note that because standard JACL delimiters are curly
### braces {}, if any values retrieved have curly braces,
### they will screw up the code.  For example, 
### ${WAS_LIBS_DIR}/rsadapter.rar}, will cause the code
### to fail....
###
###
### From xmi:type fields in resources.xml
###
###
### Note: In the output, change JDBCProvider names to NOT have spaces
### This is helpful later on, when we do getid
### which seems to have trouble with spaces
###



proc get_JDBCProvider {cname nname sname} {


    global AdminConfig



    ###
    ### Server Level
    ###
    ###
    
    set JDBCProviders [$AdminConfig getid /Cell:$cname/Node:$nname/Server:$sname/JDBCProvider:/]
    
    foreach  JDBCProvider $JDBCProviders {
        set xyz [$AdminConfig showall $JDBCProvider]
        puts "\$AdminConfig create JDBCProvider \$serverid \{ $xyz "
    }

}







###
### Main
###
###


if { !($argc == 3) } {
   puts ""
   puts "Usage: "
   puts " "
   puts "wsadmin.sh -username system -password password -f get_JDBCProvider.jacl cell node server"
   puts " "
} else { 
   set xcell      [lindex $argv 0]  
   set xnode      [lindex $argv 1]  
   set xserver   [lindex $argv 2]  
   get_JDBCProvider $xcell $xnode $xserver 
}