Originally posted by Lilly WS:
Hibernate doesn't provide production-suitable connection pool (my understanding), does Spring provide production-ready pooling?
Hibernate has its own Transaction API that you can use. If you want to use the Transaction API, you have two alternative TransactionManagers/strategies to choose from: net.sf.hibernate.transaction.JDBCTransactionFactory which delegates transaction management to the JDBC driver (this is the default strategy) or net.sf.hibernate.transaction.JTATransactionFactory which delegates to the application server's JTA implementation.Originally posted by Lilly WS:
What about the transaction?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
While it does add another layer on top, it's a small layer that performs transaction processing (see below) and exception translation only. Compared to the database-intensive work that Hibernate does, this is trivial and you won't notice it.Originally posted by Lilly WS:
I am new to both Hibernate and Spring Framework. Could somebody tell me the benefits of using Spring Framework on the top of Hibernate? Since now we add another layer on top of Hibernate, would that affect performance?
By the way, Lilly, would you mind editing your display name to include a full last name -- it's required by our naming policy.
kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Originally posted by David Harkness:
Oh, and you might be wondering what "org.springframework.jdbc.support.lob.OracleLobHandler" is. This handles BLOBs and CLOBs in Hibernate for you. I just map Strings and byte[]s in my domain objects and specify "org.springframework.orm.hibernate.support.BlobByteArrayType" as the type in the mapping file and that's it. I honestly can't say what you need to do with Hibernate alone, but when I looked it up a while ago it looked more complicated than that.
Everybody's invited. Even this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|