Moved definition of the moduleSessionFactory Spring bean to modules-applicationcontext-registry.xml and made it lazy initializable. This avoid adding that definition to module's Spring context files (for modules, using Hibernate).
Drop unused method