Hibernate Upgrade : StatisticsService()

心已入冬 提交于 2019-12-01 17:16:48

问题


I am upgrading hibernate from 3.6 to 4.3.5.

After replacing the .jar files and some deprecated packages, classes & also the Basic data types I am still getting some errors with the StatisticsService() & in org.hibernate.jmx package.

The errors are following:

 1. error: package org.hibernate.jmx does not exist
    [javac] import org.hibernate.jmx.StatisticsService;
 2. error: cannot find symbol
    [javac] StatisticsService stats = new StatisticsService(); // MBean implementation

Is there any other method to implement this OR the package itself is deprecated ?

What is the alternative way to resolve this error ?

Thanks.


回答1:


Hibernate StatisticsService is deprecated from 4.0, currently there are no alternative. But according to the link, if you use spring, you can still use the service.



来源:https://stackoverflow.com/questions/23606092/hibernate-upgrade-statisticsservice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!