public class BookingAgentEJB extends Object implements BookingAgentRemote, BookingAgentLocal
Modifier and Type | Field and Description |
---|---|
private BookingAgent |
agent |
private SessionContext |
ctx |
private EntityManager |
em |
private HotelRegistrationRemote |
hotel |
private org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
BookingAgentEJB() |
Modifier and Type | Method and Description |
---|---|
void |
cleanupBooking(String confirmation) |
void |
close()
This method is called whenever the bean is ejected from the container;
which isn't too often for stateless session beans under normal
circumstances.
|
Booking |
getBookingByConfirmation(String confirmation) |
List<Booking> |
getBookings(int index,
int count) |
void |
init()
This method creates the business logic, assigns a DAO, and registers
the EntityManager for the DAO(s) to use.
|
private org.apache.commons.logging.Log log
private HotelRegistrationRemote hotel
private EntityManager em
private SessionContext ctx
private BookingAgent agent
@PostConstruct public void init()
@PreDestroy public void close()
public Booking getBookingByConfirmation(String confirmation) throws AgentReservationException
getBookingByConfirmation
in interface BookingAgent
AgentReservationException
public List<Booking> getBookings(int index, int count) throws AgentReservationException
getBookings
in interface BookingAgent
AgentReservationException
public void cleanupBooking(String confirmation) throws AgentReservationException
cleanupBooking
in interface BookingAgent
AgentReservationException
Copyright © 2015 John's Hopkins University, Engineering Programs for Professionals. All rights reserved.