List of usage examples for com.liferay.portal.kernel.messaging MessageListenerException MessageListenerException
public MessageListenerException(Throwable cause)
From source file:com.liferay.events.global.mobile.util.PollQuestionAutoEnabler.java
License:Open Source License
@Override public void receive(Message message) throws MessageListenerException { try {/* ww w . j a v a 2s .co m*/ List<EventPollQuestion> questions = EventPollQuestionLocalServiceUtil.getAutoEnabled(new Date()); for (EventPollQuestion question : questions) { question.setEnabled(true); question.setAutoEnable(false); EventPollQuestionLocalServiceUtil.updateEventPollQuestion(question); } } catch (Exception e) { e.printStackTrace(); throw new MessageListenerException(e); } }