Results 1 to 4 of 4

Thread: how to access Configuration from LocalSessionFactoryBean

  1. #1
    Join Date
    Aug 2007
    Posts
    2

    Default 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. #2
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Have you tried?
    Code:
    applicationContext.getBean("&sessionFactory");
    Last edited by karldmoore; Aug 27th, 2007 at 02:54 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

  3. #3
    Join Date
    Aug 2007
    Posts
    2

    Default

    Quote Originally Posted by karldmoore View Post
    Have you tried?
    Code:
    applicationContext.getBean("&sessionFactory");
    thnx helped

  4. #4
    Join Date
    Sep 2006
    Location
    UK
    Posts
    8,424

    Default

    Quote 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 at 02:33 PM.
    Barracuda Networks SSL VPN Lead Developer
    http://pramatr.wordpress.com
    http://twitter.com/karldmoore
    http://www.linkedin.com/in/karldmoore
    Any postings are my own opinion, and should not be attributed to my employer or clients.

Posting Permissions

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