public List<Software> getListByLicenseKey(String key) throws BoException { SqlSession session = null; List<Software> list; try { session = SessionFactory.getSession(); SoftwareDao mapper = session.getMapper(SoftwareDao.class); list = mapper.getListByLicenseKey(key); session.commit(); } catch (Exception e) { session.rollback(); throw new BoException(e); } finally { if (session != null) session.close(); } return list; }