Monitor the online status of users based on the connection pool monitoring component druid.

Source: Internet
Author: User

Monitor the online status of users based on the connection pool monitoring component druid.

Original article: Monitoring users' online status based on druid, a connection pool monitoring component

Source code: http://www.zuidaima.com/share/1550463574248448.htm

Let me share some code. Recently, I have been monitoring the online status of users and encountered some problems when handling abnormal and unexpected exit (such as direct shutdown and sudden power failure) of client users. I have found many methods and I don't feel very good. I saw a new connection pool management tool yesterday ~ It should be said that it is currently the best --- druid, which is not introduced here. I will give you a connection. If you want to learn it, you can go and see it. It is open-source. There is a way in the http://code.alibabatech.com/wiki/display/Druid/Home druid to get the information of the session in the current project in real time.

Now that we can get the real-time situation of the session, we can handle it. Below are several key configuration files and code first-time sharing. Find me in a group that you don't understand.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.