servicembean = AdminControl.queryNames("type=TransactionService," + "process=" + mname + ",*")
wsadminToList(AdminControl.invoke(servicembean, "listOfTransactions"))
..I get an error message like:
WASX7017E: Exception received while running file "xxxxx.py"; exception information: com.ibm.ws.scripting.ScriptingException: WASX7025E: Error found in String ""; cannot create ObjectName.
("mname" is the application server instance name)
Does anyone has an idea, what am I doing wrong?
Many thanks in advance!
servicembean = AdminControl.queryNames("type=TransactionService,*" )
print servicembean
tranList = wsadminToList(AdminControl.invoke(servicembean,"listOfTransactions"))
print tranList
Thanks
Akash
Also, can you try printing the value for "servicebean" variable and see if its set or not ??
servicembean = AdminControl.queryNames("type=TransactionService,*" )
print servicembean
Sorry, if I am repeating something you already know.
Thanks
Akash
ASX7209I: Connected to process "dmgr" on node Ports
and run the script from your AppServer/bin or profile(not dmgr) directory with the correct port number.
Thanks
Akash
The only problem is, this script does a whole bunch of other stuff to the entire ND configuration. Is there any other way to see if there are any transaction services configured in each AppServer of this cell?
I don't have to modify any transaction service or something like that, merely checking to see if there's any available.
I tried yesterday a small method
def testTrans(cname, nname, mname):
serid = AdminConfig.getid('/Cell:' + cname + '/Node:' + nname + '/Server:' + mname)
transactionList = AdminConfig.list('TransactionService',serid).split(lineSeparator)
for trid in transactionList:
print AdminConfig.showall(trid)
#endFor
#endDef
..but this one doesn't give me clue on whether a transaction service on a specific AppServer is running or not - it just gives me details on the service configuration
TIA
thanks for the tip. I've tried the ("type=TransactionService,*" ) call but I've got an error starting with
com.ibm.ws.scripting.ScriptingException: WASX7025E: Error found in String "WebSphere:name=cells/........server.xml#TransactionService_1,cell=......,spec=1.0"; cannot create ObjectName.
And between the dots there's the entire list of server instances. Your remark about the SOAP port caught my attention though... how can I be sure, that the script runs against an AppServer and not a dmgr server SOAP port? (the wsadmin I'm calling is indeed the dmgr's wsadmin command)
I'm thinking maybe that's why the entire ND config is listed in the above error message. Sorry about not being able to put up the entire message - unfortunately it is full of sensitive informations.
Cheers.
tranList = wsadminToList(AdminControl.invoke(servicembean, transtype))
..where transtype is any of the five options (listOfTransactions, etc). And then a simple call for len(tranList) will/would deliver me the desired information - nothing more I need to know.
Many thanks for your effort.
Cheers,
zba0da
servicembean = AdminControl.queryNames("WebSphere:type=TransactionService,cell=" + cname + ",node=" + nname + ",process=" + mname + ",*")
of course this one is not working either :-)
btw, here is a note in IBM infocenter : http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tjta_manage_scripts.html
"The following script is an example of how to use the TransactionService and Transaction MBeans to work with manual transactions. Run the script only against an application server, and not against the deployment manager or node agent."
But let me figure out a way/workaround to it. Will revert once I get some.
Thanks
Akash