File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes Getting information from WebLogic Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Getting information from WebLogic" Watch "Getting information from WebLogic" New topic
Author

Getting information from WebLogic

Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
Is it possible to get some information (like the server status (active/inactive), number of active sessions, number of threads & their states) from Weblogic server?
I want to get these information programmatically from a Servlet running in another Weblogic server.
How can I achieve this?
Weblogic version we use is 5.1.
Sai Prasad
Ranch Hand

Joined: Feb 25, 2002
Posts: 560
You may have to write your own listeners to listen for events like client joining a session, attributes getting added and removed, etc.
Aaron Mulder
Author
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
I'm not sure about 5.1, but 6.x and 7.x let you access all of that information via JMX. The hard way is to write a JMX client directly. The easy way is to execute their admin tool to run JMX commands and then parse the results. Also, there's an SNMP interface which may have the same info (never played with it too much). You might want to poke around the 5.1 docs and see if either of these are options for that version.


<a href="http://www.javaranch.com/bookpromo.jsp" target="_blank" rel="nofollow">WebLogic Book Giveaway</a> 2/25-2/27
Mani Ram
Ranch Hand

Joined: Mar 11, 2002
Posts: 1140
Thanks for the replies.
Figured out how to get the status of the server (using the ping() method in AdminServicesDef class)
But looks like I can't get the information regarding the session & thread details.
Another question:
Based on which parameters should I decide the load on the server? Should I look for the number of active threads? waiting threads? Memory? or something else?
In other words, which factor(s) is (are) vital to decide whether the server is heavily loaded?
[ February 28, 2003: Message edited by: R Manivannan ]
Aaron Mulder
Author
Ranch Hand

Joined: Feb 25, 2003
Posts: 65
I'd say that's up to you. You might care if the memory usage gets high, but that's not necessarily an indication of load -- one request can churn through gobs of memory, leaving several CPUs unused, but maybe you want to know how the memory usage is doing for some reason. Active threads is certainly a good indicator, as the threads aren't active unless some sort of request processing is going on. But how many is "too many" depends on the number of CPUs, the number of execute threads/reader threads (see the other message board thread where those settings are being discussed), and so on. Waiting threads doesn't tell you much, except insofar as it's a zero sum game with the active threads. WebLogic tracks stalled or locked threads too, which is really a sign of application problems (or I/O problems or something) more than load, but may be of interest depending on what you're doing.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting information from WebLogic
 
Similar Threads
Active Connections
Load Balancer - Num. Of Active Conn.
Checking active sessions connected to weblogic
problem with Entity bean .
CMP bean commit problem