Sleep Hibernation: StatisticsService ()

I am updating hibernation from 3.6 to 4.3.5.

After replacing the .jar files and some obsolete packages, classes, and also basic data types, I still get some errors with the StatisticsService() and org.hibernate.jmx .

The errors are as follows:

  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 an alternative way to resolve this error?

Thanks.

+5
source share
1 answer

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

+2
source

All Articles