I need to know how many sessions are active at a perticular time in weblogic 5.1/6.x servers. I coudnt find any reference in 5.1 doc. In 6.x docs i could found out the following things.. public interface WebAppComponentRuntimeMBean which extends weblogic.management.runtime.RuntimeMBean has a method called getOpenSessionsCurrentCount() which returns ant int... It returns the current total number of open sessions in this component. The prob is as its an interface how do i call the method.....
Seems like that information should be available from the console. However, if you need to do it programmatically, then I would look at the WebLogic JMX documentation. Since the name of the interface you mention ends in "MBean", you can get attribute values from objects that implement it by communicating with the WebLogic JMX Server. SteveC
Not only is it available from the console, but there's more too...
In 6.1 go to the web application tab and select the application you want to see. Select "Monitoring" - select "Enable Session Monitoring". Then click on the link below for Monitoring Sessions. You can also monitor SFSB, SLSB, EJBs, JMS messages, the same way. You may have to restart your server to see them though... Best wishes, Chana
Joined: Dec 22, 2000
SteveC U r rite.. i need to find out the class which implements the interface weblogic.management.runtime.RuntimeMBean But i wassnt able to find it.. Here is what i am looking for... I want to track the active sessions .. & the count of it. I know its simple to have a counter in DB But i want to know if weblogic provides an API for it.. As it lets us moniter sessions in console.. I tried to find it out every where but no luck .... U guys have any idea ???
Joined: Oct 19, 2000
What version of Weblogic are you using? If its 6.0 I think this would be a good starting point: http://e-docs.bea.com/wls/docs60/isv/program.html Looks like you will have to use the MBeanHome and then get a list of the MBeans available, then figure out which one has the info you are looking for. I am almost positive that there is a better way to find out which bean you need, I just don't know it.