Java Reference
In-Depth Information
finally {
if (connection != null) {
try {
} catch (JMSException e) {
Code amount change is impressive. API simplification was one of the major features of
the new JMS version, and the specification authors did great work on it.
Now, you can use your service to notify some application-specific actions. For example,
we will inject BookingQueueProducer into the BookerService bean and send a
message whenever a user is registered:
public class BookerService implements Serializable {
private BookingQueueProducer bookingQueueProducer;
// Some code
public void bookSeat(long seatId, int price) {"Booking seat " + seatId);
if (price > money) {
final FacesMessage m =
"Not enough Money!",
"Registration successful");
facesContext.addMessage(null, m);
Search WWH ::

Custom Search