ejb.search
Interface Search

All Superinterfaces:
EJBObject, Remote

public interface Search
extends EJBObject

The Search interface is the remote interface for the Search EJB component.

This component maintains no state. When a method is called, it connects to the database, reads data and return it to the caller.

This component is in the EJB tier of the architecture.

Category Functionality: use case 1 - search for flights
Behavior This component is a stateless session bean that handles requests to search available seats in flights that meet the search criteria.
Exception handling The client may receive a RemoteException if a communication-related problem occurs during a call to any method of this component. The cause, which is not specific to the code of a particular method, can be:
  • The component is not available because the application server is not running.
  • This specific component is not deployed or the application server was not able to activate an instance to execute the requested method.
  • The reference (EJB handle) passed by the client is invalid.
  • There was a problem while marshalling or unmarshalling a remote call (or its response).
  • The method call and its arguments do not match the available skeleton (probably different versions).
The client may also receive an EJBException if a severe problem occurs when the component instance was processing a call.

Because this component has no state, it's not necessary to synchronize state between copies of the same component (multiple component instances exist on the same machine for performance reasons, and on multiple machines for reliability reasons). Likewise, if any failure occurs, there is no need to recover previous state.

Clients We don't know what clients may connect from outside of our system as the interfaces are exposed.

Version:
1.0
Author:
Team Two: Matthew Bass, Vijay Sai, Mannik Bhojwani, Paulo Merson

Method Summary
 FlightOptions getFlights(String fromCity, String toCity, Date departDate, Date returnDate, boolean isTwoWay, int numOfSeats)
          Given the search criteria, searches the database looking for seats available in flights that match the criteria.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getFlights

public FlightOptions getFlights(String fromCity,
                                String toCity,
                                Date departDate,
                                Date returnDate,
                                boolean isTwoWay,
                                int numOfSeats)
                         throws RemoteException
Given the search criteria, searches the database looking for seats available in flights that match the criteria. The returned data indicates instant availability of seats. The method does not create any type of lock on the searched seats, meaning that the seats may be taken if and when the user decides to make a reservation.
Parameters:
fromCity - name of the city or airport from where the flight is departing.
toCity - name of the city or airport of destination.
departDate - desired depart date.
returnDate - in case it is a two-way trip, returnDate should specify the desired return date; in case it is a one-way trip, this parameter is ignored.
isTwoWay - true if it is a two-way trip; false if it is a one-way trip.
nofSeats - number of seats needed (from 1 to 6)
Throws:
RemoteException - if a problem occured in the communication between the remote client and this component. See the description of Exception handling for this component.


Copyright © 2003 Team Two.