Criteria API drastically degrades performance

Description

Especially in multi-threaded in environments, the classloader is accessed way to often to convert the Criteria Query into SQL. In some containers like Tomcat we observed that the classloader is synchronized. This combination drastically degrades performance of our application servers.

see

http://dimovelev.blogspot.ch/2015/02/performance-pitfalls-hibernate-criteria.html

or

http://stackoverflow.com/questions/26608973/synchronized-classloader-calls-from-hibernate/37279205#37279205

or

https://hibernate.atlassian.net/browse/HHH-9895

which was closed without further information. The code in question:

A solution/workaround for this problem is necssary.

Environment

None

Status

Assignee

Vlad Mihalcea

Reporter

Remo Meier

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Blocker
Configure