Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

kalam king

Greenhorn
+ Follow
since Apr 19, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by kalam king

I am able to run a script a created, the script does not give any errors but does not give any results as well.

i am trying to create a scheduler in websphere application server version 7.0.0.9

Below is the script. Please let me know if you need more information. Kindly review and let me know if i am missing something or i have done it wrong. i have tried three different ways with no sucess. i am adding the 3 scripts for review. Thanks for your time.
---------------------
script1
proc schedulerConfig {} {

global AdminConfig
set cellid [$AdminConfig getid /Cell:/]
set cellName [$AdminConfig showAttribute $cellid name]
set nodeId [$AdminConfig getid /Cell:$cellName/Node:/]
set nodeName [$AdminConfig showAttribute $nodeId name]
set schedprov [$AdminConfig getid /Cell:$cellName/Node:$nodeName/SchedulerProvider:SchedulerProvider]
set name EJBTimerDataSource
set jndi sched/EJBTimerDataSource
set dsjndi jdbc/CTP
set dsalias CTP_USER
set tp EJBTIMER_
set pi 1800
set ar false
set wmijndi wm/default
set spattrs [subst { \ {name $name} \ {jndiName $jndi} \ {scope $scope} \ {datasourceJNDIName $dsjndi} \ {datasourceAlias $dsalias} \ {pollInterval $pi} \ {tablePrefix $tp} \ {useAdminRoles $ar} \ {workManagerInfoJNDIName $wmijndi}}]
$AdminConfig create SchedulerConfiguration $schedprov $spattrs
$AdminConfig save
}

-------------
script 2

proc schedulerconfig {} {

global AdminConfig
set nodeId [$AdminConfig getid /Node:/]
set nodeName [$AdminConfig showAttribute $nodeId name]
set scope [$AdminConfig getid /Node:$nodeName/]
set s4 [$AdminConfig list SchedulerProvider]
$AdminConfig create SchedulerConfiguration $s4 $scope {{name

"EJBTimerDataSource"} {jndiName "jdbc/EJBTimerDataSource"}

{datasourceJNDIName "jdbc/CTP"} {datasourceAlias "CTP_USER"}

{tablePrefix "EJBTIMER_"} {pollInterval "300"}

{workManagerInfoJNDIName "wm/default"} {useAdminRoles "false"}}
$AdminConfig save
}
---------
script 3

proc schedulerConfig {} {

global AdminConfig

set nodeId [$AdminConfig getid /Node:/]
set nodeName [$AdminConfig showAttribute $nodeId name]
set scope [$AdminConfig getid /Node:$nodeName/]
set schedprov [$AdminConfig list SchedulerProvider]
set name [list name EJBTimerDataSource]
set jndi [list jndiName jdbc/EJBTimerDataSource]
set dsjndi [list datasourceJNDIName jdbc/CTP]
set dsalias [list datasourceAlias CTP_USER]
set tp [list tablePrefix EJBTIMER_]
set pi [list pollInterval 300]
set ar [list pollInterval 300]
set wmijndi [list workManagerInfoJNDIName wm/default]
set spattrs [list $name $jndi $dsjndi $dsalias $tp $pi $ar $wmijndi $scope]
$AdminConfig create $schedprov $spattrs
$AdminConfig save
}

12 years ago
I am able to run a script a created, the script does not give any errors but does not give any results as well.

I am trying to add a custom property for data sources

Below is the script. Please let me know if you need more information. Kindly review and let me know if i am missing something or i have done it wrong.


proc ds_custom_prop {} {

global AdminConfig
set cellid [$AdminConfig getid /Cell:/]
set cellName [$AdminConfig showAttribute $cellid name]
set nodeId [$AdminConfig getid /Cell:$cellName/Node:/]
set nodeName [$AdminConfig showAttribute $nodeId name]
set jdbcproviderid [$AdminConfig getid /Cell:$cellName/Node:$nodeName/JDBCProvider]
set jdbcprovidername [$AdminConfig showAttribute $jdbcproviderid name]
set datasourceid [$AdminConfig getid /Cell:$cellName/Node:$nodeName/JDBCProvider:$jdbcprovidername/DataSource]
set datasourcename [$AdminConfig showAttribute $datasourceid name]
set newds [$AdminConfig getid /Cell:$cellName/Node:$nodeName/JDBCProvider:$jdbcprovidername/DataSource:$datasourcename]
$AdminConfig required J2EEResourceProperty
set propSet [$AdminConfig showAttribute $newds propertySet]
set name [list name useRRASetEquals]
set value [list value true]
set rpAttrs [list $name $value]
$AdminConfig create J2EEResourceProperty $propSet $rpAttrs
$AdminConfig save
}
12 years ago