public static String getConstraintMessage(EJBException e) {
		String message = "";
		if(e.getCausedByException() instanceof ConstraintViolationException){
			ConstraintViolationException cve = (ConstraintViolationException) e.getCausedByException();
			Set<ConstraintViolation<?>> violations = cve.getConstraintViolations();
			if(violations != null)
				for(ConstraintViolation<?> cur : violations)
					message += cur.getMessage() + " ";
			else
				message += cve.getMessage();
		}
		else
			message += e.getMessage();
		return message;
	}