protected void rebuildSessionFactory() { if (sessionFactory == null) { return; } try { sessionFactory.close(); } catch (Exception ignore) { } buildSessionFactory(); }