|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jass.examples.travelagency.ejbs.HotelBean
Makes the rooms reservation. It creates a ONT activity through the OpenNested service when methods that perform db changes are invoked (reserveRooms(), unreserveRooms()).
Constructor Summary | |
HotelBean()
|
Method Summary | |
void |
ejbActivate()
|
void |
ejbCreate()
|
void |
ejbPassivate()
|
void |
ejbRemove()
|
int |
getFreeRooms()
Obtains the number of free rooms. |
int |
reserveRooms(int nRooms)
Performs the rooms reservation. |
void |
setSessionContext(javax.ejb.SessionContext sessionContext)
|
int |
unreserveRooms(int nRooms)
Performs the compensation for the reserveRooms() operation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HotelBean()
Method Detail |
public void ejbCreate() throws javax.ejb.CreateException
javax.ejb.CreateException
public void ejbActivate() throws javax.ejb.EJBException
ejbActivate
in interface javax.ejb.SessionBean
javax.ejb.EJBException
public void ejbPassivate() throws javax.ejb.EJBException
ejbPassivate
in interface javax.ejb.SessionBean
javax.ejb.EJBException
public void ejbRemove() throws javax.ejb.EJBException
ejbRemove
in interface javax.ejb.SessionBean
javax.ejb.EJBException
public void setSessionContext(javax.ejb.SessionContext sessionContext) throws javax.ejb.EJBException
setSessionContext
in interface javax.ejb.SessionBean
javax.ejb.EJBException
public int getFreeRooms() throws java.sql.SQLException
java.sql.SQLException
public int reserveRooms(int nRooms) throws NotEnoughRoomsException, java.sql.SQLException
nRooms
- - number of rooms to reserve.
NotEnoughRoomsException
- - thown if there are not enough rooms.
java.sql.SQLException
public int unreserveRooms(int nRooms) throws java.sql.SQLException
nRooms
- - the number of rooms to cancel.
java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |