Description
The session factory we create at start up is exposed as a spring bean and is injected into (e.g.) org.springframework.orm.hibernate3.HibernateTransactionManager. When we discard this session factory after migrating databases the original session factory is still used by these beans, causing (e.g.) the plugins pages to try to start a transaction using the old DB.
As a work around a restart after migration will ensure that the correct SessionFactory is used.