public Map<String, String> getMailById(Long id) throws SQLException, DataException { Connection conn = connectionManager.getConnection(); Map<String, String> map = null; try { map = mailBoxManagerDao.getMailById(conn, id); } catch (SQLException e) { log.error(e); e.printStackTrace(); throw e; } catch (DataException e) { log.error(e); e.printStackTrace(); throw e; } finally { conn.close(); } return map; }