|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jass.examples.travelagency.ejbs.AirlineBean
Makes the seats reservation. It creates a ONT activity through the OpenNested service when methods that perform db changes are invoked (reserveSeats(), unreserveSeats()).
Constructor Summary | |
AirlineBean()
|
Method Summary | |
void |
ejbActivate()
|
void |
ejbCreate()
|
void |
ejbPassivate()
|
void |
ejbRemove()
|
int |
getFreeSeats()
Obtains the number of free seats. |
int |
reserveSeats(int nSeats)
Performs the seats reservation. |
void |
setSessionContext(javax.ejb.SessionContext sessionContext)
|
int |
unreserveSeats(int nSeats)
Performs the compensation for the reserveSeats() operation. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AirlineBean()
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 getFreeSeats() throws java.sql.SQLException
java.sql.SQLException
public int reserveSeats(int nSeats) throws NotEnoughSeatsException, java.sql.SQLException
nSeats
- - the number of seats to reserve.
NotEnoughSeatsException
- - thown if there are not enough seats.
java.sql.SQLException
public int unreserveSeats(int nSeats) throws java.sql.SQLException
nSeats
- - the number of seats to cancel.
java.sql.SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |