public String beginConversation() { conversation.begin(); conversation.setTimeout(500); bean.setValue("foo"); return conversation.getId(); }
@Begin public void selectHotel(final Long id) { conversation.setTimeout(600000); // 10 * 60 * 1000 (10 minutes) // NOTE get a fresh reference that's managed by the extended persistence context hotelSelection = em.find(Hotel.class, id); if (hotelSelection != null) { log.hotelSelected( user != null ? user.getName() : "Anonymous", hotelSelection.getName(), hotelSelection.getCity()); } }
public void setTimeout(long milliseconds) { delegate.setTimeout(milliseconds); }