Issue
I just downloaded Hibernate 4.2.3 Final and see that it has several optional libraries, though I'm not sure what it uses them for or under what circumstances they are needed/desired:
jboss-logging-3.1.0.GA.jar
- is this a native SLF4J binding? Is there a way to have Hibernate not use this for logging, and instead use SLF4J and a different binding? If so, how?- C3P0 and Proxool JARs are also optionally included; are these the only two connection pool frameworks that Hibernate can be configured to use? What if I wanted to use, day, BoneCP? What if I wanted to let JNDI (Tomcat/DBCP) decide what connection pool to use?
- What is
hibernate-entitymanager
? - What is
hibernate-envers
?
Solution
Hibernate now uses jboss-logging, refer to: How do you configure logging in Hibernate 4 to use SLF4J
I never heard of others, I'm sure they are good for most of use cases. If you want to use Tomcat/DBCP you can use as a JTA datasource. I don't think there is a connection provider for hibernate 3 or 4. Source: http://wiki.apache.org/commons/DBCP/Hibernate
If you want to use the HibernateEntityManager instead the javax.persistence.EntityManager, you can have the jar on your classpath and code with it.
Envers is an "automagical" auditing/versioning extension, where you annotate the Entities with
@Audited
and during the transaction, the changes would be also persisted. There is more here http://www.jboss.org/envers.
Answered By - André
Answer Checked By - Timothy Miller (JavaFixing Admin)