• Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate - Configuration and SessionFactory objects

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,
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.

Thanks in advance for any help.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!