• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Obtain the ClientConnectionId?

 
Mario Schwaiger
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After the upgrade to Tomcat 8 I read the documentation more carefully and found out about some interesting logging-options. Sometimes queries to a slow DB-Server fail and the logs state an interesting message:


It's quite interesting to to see a ClientConnectionId. I tried to find some information about it and but most Forum-Entries were just related to Tomcat-Logs. Does any one have some information if and how there are possibilities to obtain this ID in Java?

Thank you
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not tried this, but if your database is SQL server, then it's probably obtainable by casting the Connection to SQLServerConnection, and calling this method.

Out of curiosity, how does the client connection ID help you?
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll move this to the JDBC forum, since it's related to JDBC connections, not JSP.
 
Mario Schwaiger
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and calling this method.


Seems to be interesting, yet due to the policies of Microsoft the implementation it's not so easy to actually use it.
I'm having a Maven-Project using Tomcat's data-source - so actually working with a SQLServerConnection-Object is tricky.

But I assume that's the only possible way. Many thanks for your research, I assume this problem is solved
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic