Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
As outlined by Jean-Francois add a createConfiguration method that detects AnnotationConfiguration on the classpath:
try
{
// Try to instantiate AnnotationConfiguration by reflection
Class clazz = Class.forName( "org.hibernate.cfg.AnnotationConfiguration");
Configuration config = (Configuration) clazz.newInstance();
return config;
}
catch (Exception e)
{
// Fall back to normal configuration
return new Configuration();
}