Ejemplo n.º 1
0
  public String beginConversation() {
    conversation.begin();
    conversation.setTimeout(500);

    bean.setValue("foo");
    return conversation.getId();
  }
Ejemplo n.º 2
0
  @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());
    }
  }
Ejemplo n.º 3
0
 public void setTimeout(long milliseconds) {
   delegate.setTimeout(milliseconds);
 }