2

I need to build string with the following pattern:

<Server>;<Node>;<Cell>;<Version>;<MessageListenerThreadPool-ID>;<ORBThreadPool-
ID>;<WebcontainerThreadPool-ID>;<TCPChannelsThreadPool-ID>

So I need to write the ID's of several standard thread pools, but I can't find any information about thread-pools Id's. I found only thread-pool names. May be somebody knows where I can find information about thread-pool Id's?

Thanks!

P.S. I'm using Websphere 7.x

Omar Wagih
  • 8,504
  • 7
  • 59
  • 75
WelcomeTo
  • 19,843
  • 53
  • 170
  • 286
  • What is a "thread pool ID"? What do you intend to do with the ID? – Brett Kail Aug 02 '12 at 14:48
  • @bkail I don't know what is thread pool ID. But I need to get it from WAS. This string (mentioned in question) is used in one of the IBM products. – WelcomeTo Aug 02 '12 at 16:16
  • A Google search turns up "IBM FileNet System Monitor"; is that the product? If yes, it appears to need the configuration ID, which appears to be available from JMX. – Brett Kail Aug 02 '12 at 17:31
  • @bkail hm, yes, is FSM. Can you explain little more deeper about retrieving this thread-pool ID? Thanks. – WelcomeTo Aug 03 '12 at 04:06
  • The FSM monitoring guide suggests it can be obtained from JMX. I have no experience with FSM, sorry. – Brett Kail Aug 03 '12 at 14:04
  • Do you need to get that information once (manually) or do you need to get that information dynamically at runtime (in an application that is deployed on WebSphere)? – Andreas Veithen Aug 10 '12 at 17:03
  • @AndreasVeithen yes, only once. I found answer to my question, see below. – WelcomeTo Aug 14 '12 at 07:17

3 Answers3

2

Use JMX to obtain management objects (JSR-77: J2EETM Management). Example of obtaining them from Websphere is given at http://www.ibm.com/developerworks/websphere/techjournal/0402_qiao/0402_qiao.html.

This API will help you to access JXM.

First find if object are accessible via Administrative console. Then look at list of objects that you'll receive from server via JMX API call.

Artem Oboturov
  • 4,344
  • 2
  • 30
  • 48
2

There does't appear to be a threadpool ID associated with the JMX object; just a threadpool name. You can write a script similar to the one below to list threadpools and their attributes.

wsadmin>pools = AdminConfig.list('ThreadPool').split()
wsadmin>for pool in pools:
wsadmin>        print pool
wsadmin>        print
wsadmin>
Default(cells/cluentiusNode12Cell/nodes/node2/server/provider1|server.xml#ThreadPool_1183121908658)


HAManagerService.Pool(cells/cluentiusNode12Cell/nodes/node2/servers/provider1|hamanagerservice.xml#ThreadPool_1080665401693)

Message.Listener.Pool(cells/cluentiusNode12Cell/nodes/node2/servers/provider1|server.xml#ThreadPool_1183121908663)

ORB.thread.pool(cells/cluentiusNode12Cell/nodes/node2/servers/provider1|server.xml#ThreadPool_1183121908656)

... snip ...

WMQJCAResourceAdapter(cells/cluentiusNode12Cell/nodes/node2/servers/provider1|server.xml#ThreadPool_1332907301375)

WebContainer(cells/cluentiusNode12Cell/nodes/node2/servers/provider1|server.xml#ThreadPool_1183121908657)

server.startup(cells/cluentiusNode12Cell/nodes/node2/servers/provider1|server.xml#ThreadPool_1183121908662)

wsadmin>print AdminConfig.show(pools[9])
[customProperties []]
[inactivityTimeout 60000]
[isGrowable false]
[maximumSize 10]
[minimumSize 5]
[name WebContainer]
wsadmin>

The show() command shows the attributes you do have available to you.

pglezen
  • 961
  • 8
  • 18
0

I found answer to my question.

Thread-pool ID can be obtained from JConsole, under Threadpool node. There many thread-pools, and thread-pools Mbeans listed in question have an objectName attribute, like this:

WebSphere:name=ORB.thread.pool,process=server1,platform=dynamicproxy,.......server.xml#ThreadPool_1183122130078,cell=someCell,spec=1.0

In this case Thread-pool ID is 1183122130078.

Thanks all.

WelcomeTo
  • 19,843
  • 53
  • 170
  • 286
  • @ArtemOboturov yes, I know that I need to use JMX (it was written in gude:) ), but I needed a more accurate answer (i.e. I don't understand how to use JMX to obtain ID's, but I know that main way to solve problem - is using JMX). – WelcomeTo Aug 14 '12 at 08:38
  • Look at code of JConsole (it's open source) at [http://openjdk.java.net/tools/svc/jconsole/](http://openjdk.java.net/tools/svc/jconsole/). – Artem Oboturov Aug 14 '12 at 11:54