Hello,
I am writing some scripts to create and delete resources in WebSphere Application Server 9.0.5 and am curious about the syntax on this page
JDBCProviderManagement command group for AdminTask objectIn particular this example on that page :-
Using Jython string:
AdminTask.listDatasources('[-scope Cell=my02Cell]')
vs.
Using Jython list:
AdminTask.listDatasources('-scope', 'Cell=my02Cell')
I tried both commands with a Cluster called cluster1 and the format for the Jython list does not work. The first one (Jython string) works fine but the second (Jython list) does not:-
[wsphere@host1 profile_creation_Linux]$ /opt/IBM/WebSphere/AppServer/bin/wsadmin.sh
WASX7209I: Connected to process "dmgr" on node host1CellManager01 using SOAP connector; The type of process is: DeploymentManager
WASX7031I: For help, enter: "print Help.help()"
wsadmin>AdminTask.listDatasources('[-scope Cluster=cluster1]')
u'"Default Datasource(cells/host1Cell01/clusters/cluster1|resources.xml#DataSource_1656872291833)"'
wsadmin>
wsadmin>
wsadmin>AdminTask.listDatasources('-scope', 'Cluster=cluster1')
WASX7015E: Exception running command: "AdminTask.listDatasources('-scope', 'Cluster=cluster1')"; exception information:
com.ibm.bsf.BSFException: exception from Jython:
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: listDatasources(): expected 0-1 args; got 2
wsadmin>
Is there a typo on that page (comma and quotes should not be there delimiting the scope value from the -scope ) or have I translated the example which was for a Cell incorrectly for obtaining a list of datasources in a Cluster using the Jython list format? This works so I am thinking that its a mistake in the example on that page:-
wsadmin>AdminTask.listDatasources('-scope Cluster=cluster1')
u'"Default Datasource(cells/host1Cell01/clusters/cluster1|resources.xml#DataSource_1656872291833)"'
Regards
Rod
------------------------------
Rod Allen
------------------------------