Results 1 to 2 of 2

Thread: hibernate4 SessionFactory and LOBHandler

  1. #1
    Join Date
    Jan 2012
    Posts
    1

    Question hibernate4 SessionFactory and LOBHandler

    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)
    Code:
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" 
    p:dataSource-ref="dataSource" p:lobHandler-ref="oracleLobHandler">..</bean>
    Changing it into the following in hibernate 4
    Code:
    <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean" 
    p:dataSource-ref="dataSource">..</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.
    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.
    So, my question is if this is still valid, and if so, where could it be defined?
    Last edited by hons; Jan 12th, 2012 at 06:36 AM.

  2. #2
    Join Date
    Feb 2005
    Posts
    13

    Default

    I have the same problem, when mirgation from Spring 3.0 and Hibernate 3.6.9 to Spring 3.1.1 and Hibernate 4.1.2.

    In class org.springframework.orm.hibernate4.LocalSessionFac toryBean the property for the lobHandler is missing.

    Is there any other way to define a LobHandler?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •