em.getTransaction().commit();
cs = connection.prepareCall("{call GetSearchedCourses(?, ?)}");
cs.setString(1, searchKey);
cs.setInt(2, userID);
ResultSet rs = cs.executeQuery();
courseList = new ArrayList<Integer>();
while (rs.next()) {
String courseid = rs.getString("courseid");
courseList.add(new Integer(Integer.parseInt(courseid)));