• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Obtain the ClientConnectionId?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic