Java Reference
In-Depth Information
org.jboss.logging.Logger;
import
com.packtpub.as7development.chapter4.model.Seat;
import java.util.*;
@Singleton
@Startup
public class TheatreBox {
@Inject Event<Seat>seatEvent;
@Lock(WRITE)
public void buyTicket(intseatId ) {
Seat seat = getSeatList().get(seatId);
seat.setBooked(true);
seatEvent.fire(seat);
}
// Code stays the same as chapter3
}
The last class we will include in our project is the Seat bean, which will be used as
our model without any change in it:
package
com.packtpub.as7development.chapter4.model;
import java.io.Serializable;
public class Seat implements Serializable {
// Code stays the same as chapter3
}
Search WWH ::




Custom Search