Announcement Announcement Module
Collapse
No announcement yet.
how to access Configuration from LocalSessionFactoryBean Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to access Configuration from LocalSessionFactoryBean

    Hi,

    How can I access LocalSessionFactoryBean from which was sessionFactory created?

    I need to get configuration LocalSessionFactoryBean.getConfiguration() of hibernate but this always return SessionFactory.

    Code:
       <bean id="sessionFactory"
         class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <property name="mappingResources">
    		 <list>
    		 	<value>xxx/yyy/zzz/Login2IdDTO.hbm.xml</value>
    		</list>
        </property>
        <property name="hibernateProperties" ref="hibernateProperties" />
      </bean>

    so is there any way?

    thnx

  • #2
    Have you tried?
    Code:
    applicationContext.getBean("&sessionFactory");
    Last edited by karldmoore; Aug 27th, 2007, 02:54 PM.

    Comment


    • #3
      Originally posted by karldmoore View Post
      Have you tried?
      Code:
      applicationContext.getBean("&sessionFactory");
      thnx helped

      Comment


      • #4
        Originally posted by ferozz View Post
        thnx helped
        Not a problem, glad to help. I think the reference manual covers this, it's always a good place to start.
        Last edited by karldmoore; Aug 27th, 2007, 02:33 PM.

        Comment

        Working...
        X