Quite simple here. the LocalSessionFactoryBean implements FactoryBean, which is a special interface for Spring. Spring sees that the type of that class is a FactoryBean, so instead of creating the instance of LocalSessionFactoryBean, it calls the special public Object getObject() method, and the object that that returns is what is given out. It is the Factory
pattern at work.
So LocalSessionFactoryBean's getObject() method returns a SessionFactory object.
Mark