Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 607011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:18:53+00:00 2026-05-13T17:18:53+00:00

I have a Tomcat with some applications running. I cannot restart the Tomcat but

  • 0

I have a Tomcat with some applications running. I cannot restart the Tomcat but I would like to monitor the usage of class files.

I would like to log if a specified class is used. Is this possible?
How could I accomplish it?

Class Usage: If an object for this class is instantiated or methods are called etc.

Clarification: I cannot restart the application. Every solution with recompiling the running code are not acceptable. That makes the problem so hard.

Remote debugging/JMX is not enabled yet. It would be a similar effort like recompiling the application to activate it.

Platform is RHEL, 64 Bit.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T17:18:53+00:00Added an answer on May 13, 2026 at 5:18 pm

    I would like to log if a specified class is used; i.e. if an object for this class is instantiated or methods are called etc.

    A memory profiler would tell you if a reachable instance of a class exists at the instant you run the profiler. An execution profiler could tell you that a method or constructor is called during some interval … though it might also miss a call, due to the way that profilers work.

    The webapp’s classloader could in theory tell you if a class has been loaded, but I doubt there is a way to call the classloader’s method that doesn’t involve a restart. Also, there is no way to know if a method has EVER been called or an instance has EVER been created apart from adding monitoring hooks to the class. And adding those hooks would entail a restart.

    And of course there are other ways that a class could be “used” that don’t entail constructing instances or calling its methods.

    So depending on what you are really trying to figure out, you may be out of luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running tomcat and have some jsp pages that display a subset of a
I have an application running in tomcat that has a bunch of configuration files
I have two web applications running in the same Tomcat Instance. In one of
I have a little project with some jsp deployed on an Tomcat 5.5. Recently
I have a tomcat instance setup but the database connection I have configured in
In tomcat 6 i have a servlet running openbluedragon, everything compiles and servers up
I have two applications under tomcat/webapps folder. tomcat/webapps/App1 tomcat/webapps/App2 Both applications share the same
I have apache 2.2 and tomcat 5.5 running on a Windows XP machine. Which
I have configured Tomcat to use LDAP / AD. How can I get more
I have configured Tomcat 6 to serve Perl CGI scripts. That part is well

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.