Databases


  The JEE & Probes is one of two probe sections in JProfiler. This section features the following built-in probes:
  •  JDBC

    The control objects are database connections which can be in the following active states:

    • Statement execution
      A statement created via one of the java.sql.Connection#createStatement(...) methods is being executed.
    • Prepared statement execution
      A statement created via one of the java.sql.Connection#prepareStatement(...) or java.sql.Connection#prepareCall(...) methods is being executed.
    • Batch execution
      java.sql.Statement#executeBatch() is being executed on a statement.

    The probe annotates the SQL strings of statements into the call tree and shows them in the hot spots view. Bound values are not shown for prepared statements. This can be changed in the probe settings.

    The following telemetries are provided:

    • Executed statements
      The number of executed statements per second.
    • Average statement execution time
      The average execution time in seconds for statements that completed in the last second.
    • Recorded open connections
      The number of open database connections at any time.

    The JDBC probe has a "Connection leaks" view that shows open virtual database connections that have not been returned to their database pool. This only affects virtual connections that are created by a pooled database source. Virtual connections are what you get from connection pools and block a physical connection until they are closed. A virtual connection is considered as a potential leak when it has been open for more than 10 seconds. There are two types of leak candidates:

    • Unclosed collected
      This is a virtual connection where the connection object that has been handed out by the database pool has been garbage collected, but close() has not been called on it. This is a definite connection leak.
    • Unclosed
      This is a virtual connection where the connection object that has been handed out by the database pool is still on the heap, but close() has not been called on it. The greater the "Open since" time is, the stronger the virtual connection has to be considered as a leak candidate. However, there is the possibility that close() will still be called on it, and then the entry in the "Connection leaks" view would be removed.

    The "Connection leaks" view provides a "Class name" column that shows the name of the connection class. This will tell you which type of pool has created the connection. JProfiler explicitly supports a large number of database drivers and connection pools and knows which classes are virtual and physical connections, but for unknown pools or database drivers, JProfiler may mistake a physical connection for a virtual one. Since physical connections are often long-lived, it would then show up in the "Connection leaks" view and the class name will then help you to identify it as a false positive.

    By default, when you start probe recording, the connection leaks analysis is not enabled. There is a separate recording button in the "Connection leaks" view whose state corresponds to the "Record open virtual connections for connection leak analysis" check box in the probe settings. The state of the button is persistent, so if you start the analysis once, it will automatically be started for the next session.

  •  JPA/Hibernate

    There are no control objects for this view, so the probe does not have time line and control objects views.

    The probe annotates the SQL strings of persistence operations into the call tree and shows them in the hot spots view.

    The following telemetries are provided:

    • Entity Operation Count
      The number of entity operations per second.
    • Query Count
      The number of executed queries per second.
    • Query Duration
      The average duration of queries in the last second.
  •  MongoDB

    There are no control objects for this view, so the probe does not have time line and control objects views.

    The probe annotates MongoDB operations into the call tree and shows them in the hot spots view.

    The detected MongoDB operation types are

    • Query
    • Retrieve data
    • Update
    • Insert
    • Delete
    • Other

    The probe replaces primitive data with question marks. This can be changed in the probe settings.

    The following telemetries are provided:

    • Executed operations
      The number of executed operations per second.
    • Average operations execution time
      The average execution time in seconds for operations that completed in the last second.
  •  Cassandra

    There are no control objects for this view, so the probe does not have time line and control objects views.

    The probe annotates Cassandra CQL queries into the call tree and shows them in the hot spots view.

    Two query types are distinguished:

    • Statements
    • Prepared statements

    Bound values for prepared statements are not displayed.

    The following telemetries are provided:

    • Executed operations
      The number of executed operations per second.
    • Average operations execution time
      The average execution time in seconds for operations that completed in the last second.
  •  HBase

    There are no control objects for this view, so the probe does not have time line and control objects views.

    The probe annotates HBase commands into the call tree and shows them in the hot spots view.

    The detected HBase operation types are

    • Scanner open
    • Scanner fetch
    • Query
    • Modify
    • Map-reduce
    • Aggregation

    The following telemetries are provided:

    • Executed operations
      The number of executed operations per second.
    • Average operations execution time
      The average execution time in seconds for operations that completed in the last second.