Announcement Announcement Module
Collapse
No announcement yet.
how to disable sessionFactory connect to database on startu Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to disable sessionFactory connect to database on startu

    how to disable sessionFactory connect to database on startup

    I implemented a custom ConnectionProvider for hibernate to get connection.

    I will set the dataSource params on running.

    the sessionFactory try to get connection on startup, it always show errors.

    it 's not welcome for using.

    how to disable sessionFactory connect to database on startup.

  • #2
    see this thread http://forum.springframework.org/viewtopic.php?t=4836

    Comment


    • #3
      I've set lazy-init=true. but it show errors

      <bean id="securitySessionFactory" class="org.springframework.orm.hibernate.LocalSess ionFactoryBean" lazy-init="true">

      <property name="mappingResources">
      <list>
      <value>UserDetails.hbm.xml</value>
      </list>
      </property>

      <property name="hibernateProperties">
      <props>
      <prop key="hibernate.dialect">${login.hibernate.dialect} </prop>
      <prop key="hibernate.connection.provider_class">${login. hibernate.connection.provider_class}</prop>
      <prop key="hibernate.show_sql">false</prop>
      </props>
      </property>

      </bean>


      ========================
      I've set lazy-init=true. but it show errors

      Comment

      Working...
      X