I basically asked the same question already on stackoverflow, however without getting any answer till now.
Summarizing it i had this configuration in Hibernate 3.6.8 (and Spring 3.1.0)
Changing it into the following in hibernate 4Code:<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" p:dataSource-ref="dataSource" p:lobHandler-ref="oracleLobHandler">..</bean>
My problem right now is, that I miss the possibility of defining the lobhandler in this org.springframework.orm.hibernate4.LocalSessionFac toryBean, however in the javadoc of the lobhandler interface there is still the suggestion to use a specialized lobHandler.Code:<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean" p:dataSource-ref="dataSource">..</bean>
So, my question is if this is still valid, and if so, where could it be defined?Summarizing the recommended options (for actual LOB fields):
JDBC 4.0 driver: DefaultLobHandler with streamAsLob=true.
PostgreSQL: DefaultLobHandler with wrapAsLob=true.
Oracle 9i/10g: OracleLobHandler with a connection-pool-specific NativeJdbcExtractor.
For all other database drivers (and for non-LOB fields that might potentially turn into LOBs on some databases): a plain DefaultLobHandler.


Reply With Quote
