org.objectweb.jass.examples.travelagency.ejbs
Class TravelAgencyBean
java.lang.Object
org.objectweb.jass.examples.travelagency.ejbs.TravelAgencyBean
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
- public class TravelAgencyBean
- extends java.lang.Object
- implements javax.ejb.SessionBean
Makes the composed reservation by invoking the Airline and Hotel EJBs.
It creates a ONT activity that scopes both invocations through the
OpenNested service.
- Author:
- fran
Date: Feb 16, 2004
org.objectweb.jass.examples.travelagency.ejbsTravelAgencyBean.java
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TravelAgencyBean
public TravelAgencyBean()
ejbCreate
public void ejbCreate()
throws javax.ejb.CreateException
- Throws:
javax.ejb.CreateException
ejbActivate
public void ejbActivate()
throws javax.ejb.EJBException
- Specified by:
ejbActivate in interface javax.ejb.SessionBean
- Throws:
javax.ejb.EJBException
ejbPassivate
public void ejbPassivate()
throws javax.ejb.EJBException
- Specified by:
ejbPassivate in interface javax.ejb.SessionBean
- Throws:
javax.ejb.EJBException
ejbRemove
public void ejbRemove()
throws javax.ejb.EJBException
- Specified by:
ejbRemove in interface javax.ejb.SessionBean
- Throws:
javax.ejb.EJBException
setSessionContext
public void setSessionContext(javax.ejb.SessionContext sessionContext)
throws javax.ejb.EJBException
- Specified by:
setSessionContext in interface javax.ejb.SessionBean
- Throws:
javax.ejb.EJBException
makeReservation
public void makeReservation(java.lang.String name,
int nSeats,
int nRooms)
throws java.lang.Exception
- Creates a ONT activity and invokes the Airline and the Hotel EJBs.
If is not possible to make any reservation, the activity is rolled back
and an exception is thrown to the application that uses this EJB.
- Parameters:
name - - not used.nSeats - - number of seats to reserve.nRooms - - number of rooms to reserve.
- Throws:
NotEnoughSeatsException - - thrown if there are not enough seats.
NotEnoughRoomsException - - thrown if there are not enough rooms.
java.lang.Exception