Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Active and prepared transactions /w wsadmin

84 views
Skip to first unread message

zba0da

unread,
Nov 11, 2009, 6:33:01 AM11/11/09
to
Hi folks,
I'm trying to print out all transactions related to a specific application server in a network deployment environment but somehow after the following lines

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!

Akash Bharti

unread,
Nov 12, 2009, 2:35:51 AM11/12/09
to
0):
outList.append(item)
return outList
#endDef

servicembean = AdminControl.queryNames("type=TransactionService,*" )
print servicembean
tranList = wsadminToList(AdminControl.invoke(servicembean,"listOfTransactions"))
print tranList

Thanks
Akash

Akash Bharti

unread,
Nov 12, 2009, 2:23:32 AM11/12/09
to
I hope you are running it against AppServer SOAP port (and not dmgr SOAP port). Coz, running it with dmgr port will set it to the list of transaction services on Dmgr and all AppServers under it.

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

Akash Bharti

unread,
Nov 12, 2009, 3:04:45 AM11/12/09
to
When you run the script to dmgr, it says something like :

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

zba0da

unread,
Nov 12, 2009, 3:17:28 AM11/12/09
to
alright, now I'm a little bit stuck: yes I do run it to dmgr!

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

zba0da

unread,
Nov 12, 2009, 2:55:33 AM11/12/09
to
Hi Akash,

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.

zba0da

unread,
Nov 12, 2009, 3:42:49 AM11/12/09
to
yeah, that's the one I was studying the other day! The thing is, I only need a small snippet of the article's code like

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

zba0da

unread,
Nov 12, 2009, 3:21:16 AM11/12/09
to
therefore I cannot run a separate script to see the transaction service details of each of every AppServer. It would be more convinient to run it to dmgr and somehow pass the scope parameter to the queryName(..) call. something like

servicembean = AdminControl.queryNames("WebSphere:type=TransactionService,cell=" + cname + ",node=" + nname + ",process=" + mname + ",*")


of course this one is not working either :-)

Akash Bharti

unread,
Nov 12, 2009, 3:34:59 AM11/12/09
to
All AppServer has an Transaction Service associated to it.

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

0 new messages