Hibernate - Configuration and SessionFactory objects
posted 7 years ago
I am developing an ejb3 statless on JBoss, using Hibernate as persistence engine.
I now came across the Configuration and SessionFactory objects, that seem to be quite used but that personally I've never explicitly implemented (perhaps due the simplicity of my queries).
Well today I've faced an issue which requires the Criteria object and as far as I now I need those class to proceed.
Until today I've just injected the persistence context using an annotation and setting the persistence.xml file, as I don't need to add any programmatic configurations, I was wondering if I must explicitly implement them anyway in order to use the Criteria object or I can obtain them from the context.