【问题标题】:Payara setup together with sniffy profilerPayara 与嗅探器一起设置
【发布时间】:2016-06-16 12:39:14
【问题描述】:

我正在尝试使用 Sniffy 分析器分析在 Payara 服务器上运行的应用程序。

添加Maven依赖并根据documentation修改文件web.xml。

我已将 sniffy.jar 添加到 payara\payara41\glassfish\domains\domain1\lib\ 文件夹中。

我修改 glassfish-resources.xml 文件如下:

<resources>
  <jdbc-resource enabled="true" jndi-name="jdbc/Agenda" object-type="user" pool-name="AgendaPool">
    <description/>
  </jdbc-resource>
  <jdbc-connection-pool allow-non-component-callers="false" associate-with-thread="false" connection-creation-retry-attempts="0" connection-creation-retry-interval-in-seconds="10" connection-leak-reclaim="false" connection-leak-timeout-in-seconds="0" connection-validation-method="auto-commit" datasource-classname="oracle.jdbc.pool.OracleDataSource" fail-all-connections="false" idle-timeout-in-seconds="300" is-connection-validation-required="false" is-isolation-level-guaranteed="true" lazy-connection-association="false" lazy-connection-enlistment="false" match-connections="false" max-connection-usage-count="0" max-pool-size="32" max-wait-time-in-millis="60000" name="AgendaPool" non-transactional-connections="false" ping="false" pool-resize-quantity="2" pooling="true" res-type="javax.sql.DataSource" statement-cache-size="0" statement-leak-reclaim="false" statement-leak-timeout-in-seconds="0" statement-timeout-in-seconds="-1" steady-pool-size="8" validate-atmost-once-period-in-seconds="0" wrap-jdbc-objects="false">
    <property name="URL" value="sniffer:jdbc:oracle:thin:@localhost:1521:XE"/>    
    <property name="User" value="XXX"/>
    <property name="Password" value="XXX"/>
    <property name="driverClass" value="io.sniffy.MockDriver"/>
  </jdbc-connection-pool>
</resources>

我可以看到 HTTP 方法的响应时间,但不能查询响应时间: No query response time.

我的配置正确吗?为什么执行的查询没有响应时间?

【问题讨论】:

    标签: glassfish sniffy


    【解决方案1】:

    Sniffy 不适用于oracle.jdbc.pool.OracleDataSource

    在这个问题中查看更多细节:Invalid Oracle URL specified with Sniffy

    【讨论】:

    • 感谢@bedrin 的帮助。为了能够查看 Sniffy 响应时间,我从 glassfish-resources.xml 配置文件中删除了oracle.jdbc.pool.OracleDataSource。在 Payara 服务器控制台中,我还更新了 JDBC 连接池设置(Resource Type: java.sql.Driver, Driver Classname: io.sniffy.MockDriver)。
    猜你喜欢
    • 2016-10-04
    • 1970-01-01
    • 1970-01-01
    • 2010-10-20
    • 2011-09-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多