EXCEPTION HANDLING

 

 

The exceptions are categorized into technical and functional exceptions. The technical category deals with exceptions caused by means of inter-system dependency failures. The functional category consists of those that result from user interactions with the systems. However, in some cases they have been interchangeably represented.

 

Table below shows the exceptions in use by the application. The usage description is provided for a better understanding.

 

 

Exception Types

Usage

AVAILABLE EXCEPTIONS

 

Technical Exceptions

 

Marshalling/Unmarshalling errors

When remote calls are not properly resolved exceptions have been provided to capture such cases

Component unavailable or communication problems between client and specific components

Remote Exception is thrown to indicate communication problems between the client and the various components with appropriate message for specific action.

Incorrect references (EJB handles) passed by client

These exceptions are handled; they typically occur when the reference values passed by the client cannot be successfully used to execute or invoke the bean

Method call mismatch

Exception handling of mismatched method calls have been captured at the appropriate places in the code

Credit Card Component’s Clients ie., servers that are dependent on the credit card component to have the transaction authorized

·       If the URL specification is incorrectly formatted, the system will throw an appropriate exception;

·       Exception will be thrown if  the connection is unable to be established between the server hosting the Credit Component

 

State verification at time of failure is captured through exceptions to support dependable transaction processing after the recovery from fault

Component not deployed

When the component referenced is not deployed, the exception will be thrown.

CreditCardService

Uses exception to handle cases where it is unable to bind itself to the naming service through the RMI registry

 

If SQL Server connection is not made an exception is thrown from this class

SQL Connections

Exceptions are handled if connections to the database server fail and appropriate action can be initiated

User Authentication

Authentication errors are handled thought he AuthenticateBean

Functional Exceptions

 

User login

Validates User logon,

Search Flight

 

RemoteException or EJBException can be thorwn

·       Flight has to exist in the database

·       Requires return date for a roundtrip ticket search

·       Number of seats requested must be available

 

Read Reservation

Validates reservation number,

Reservation and Purchase

·       Validates credit card number,

·       Validates credit card type and date of expiry,

·       Validates balance on the credit card

·       Validates the date and time of reservation time

·       Validates the flight

·       Requires values for passenger names

·       Validates the number of seats

 

Cancel reservation

Validates the reservation number

 

 

 

 

UNAVAILABLE EXCEPTIONS

 

Functional Exceptions

 

Search flights

Wrong data entry for city names is not handled through exception

Credit card component

No validation of credit card holder name; table and related code is not built to handle this