public static List<UserInfo> getEventMemebers(int eventId)
			throws HibernateException {
		List<UserInfo> eventUserList = null;
		Session session = HibernateUtil.getSessionFactory().getCurrentSession();
		try {
			// Begin unit of work
			session.beginTransaction();

			// get the event users
			String hql = "select eu.eventUser from EventUserInfo as eu where eu.userStatus=1 and eu.eventId="
					+ eventId;

			Query query = session.createQuery(hql);

			@SuppressWarnings("unchecked")
			List<UserInfo> list = query.list();

			if (list.size() > 0) {
				eventUserList = new ArrayList<UserInfo>();
				for (int i = 0; i < list.size(); i++) {
					eventUserList.add(list.get(i));
				}
			}

			// End unit of work
			session.getTransaction().commit();
		} catch (HibernateException hex) {
			logger.error(hex.toString());
			HibernateUtil.getSessionFactory().getCurrentSession()
					.getTransaction().rollback();
		} catch (Exception ex) {
			logger.error(ex.toString());
			HibernateUtil.getSessionFactory().getCurrentSession()
					.getTransaction().rollback();
		}
		return eventUserList;
	}