credit management system (leading indian bank) (java-oracle9i)

Upload: manish-sharma

Post on 03-Apr-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    1/117

    Major Project Report

    PROJECT REPORT ON

    CREDIT MANAGEMENT SYSTEM

    SUBMITTED BY

    ANIL KUMAR YADAV

    Submitted in the partial fulfillment of the requirements for the degree of

    B.C.A

    (BACHELOR OF COMPUTER SCIENCE)

    TO

    SIKKIM MANIPAL UNIVERSITY

    DIRECTORATE OF DISTANCE EDUCATION

    Server Components EJB

    Programming Languages HTML, JSP, Java, JavaScript,Struts

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    2/117

    Operating System Linux 7.1, Windows XP

    Web Server Weblogic 7.0

    Application Server J2EE-compliant application server

    Database Engine Oracle 9i

    Server Network N-tier server centric environmentthat can scale to any number ofservers

    Processor P III, P IV

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    3/117

    Preface

    As with any project, documentation forms an integral part of thisproject too. Documentation plays a vital role in the SoftwareEngineering Process in satisfying the future queries of the user and in theefficient maintenance of the application. Hence this report serves adetailed documentation for this system.

    It has been taken care that this document elicits the systemdevelopment process in a lucid and an understandable manner. The

    contents have been divided into segments, all of which have beenexplained in detail in the following pages. I have tried my best toelucidate all the relevant details of the project to be included in thereport. While in the beginning I have tried to give a general view of the

    project, to make it clearer, in the later stages I have included the portionthat was specifically assigned to me and also describing where that partis actually being used.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    4/117

    Acknowledgement

    Unless you venture into the real world you never know, how futile

    your efforts could be without the help of the various and, how tough thereal world environment is. And even tougher work is enumerating andenlisting all the individuals whose contributions went into the making ofthis project.

    I am grateful to Tata Consultancy Services, for providing me withan opportunity to work with them and be an active team member of a

    project of such importance.

    I would like to especially thankMr. Anand panday for withouttheir continuous help and motivation this project would not have been

    possible. They always endeavored me towards learning and gainingknowledge and helped me at all stages of the project by spending hisinvaluable time and effort.

    Acknowledgements are also due to my parents, friends and allthose people who have been continuous support to me in the successfulcompletion of this project.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    5/117

    IndexContents

    Page No.1.Background

    Information7

    Profile of TATA CONSULTANCY SERVICES

    2.Problem Description andObjectives.12

    2.1. ProjectOverview..13

    2.2. Objective of theProject..14

    2.3. Brief Narrative ofWork....15

    2.4.Salient Features of the

    Project17

    3.Statement ofScope10

    3.1. Scope of theProject21

    3.2. Contributions of the Project

    224.Project

    Plan...24

    4.1. ProjectOrganization...25

    4.2. FunctionalModules....28

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    6/117

    4.2.1. Policy4.2.2. Credit Proposal4.2.3. Credit Appraisal4.2.4. Monitoring

    4.2.5. MIS4.2.6. Document Management System4.2.7. Role Based Security

    4.3. Tools andTechnologies.35

    4.3.1. Bea Weblogic Server7.0..36

    4.3.2. Servlets.384.3.3. Java Server Pages...474.3.4. Enterprise Java Beans554.3.5. Oracle 9i...68

    5.System RequirementSpecifications72

    5.1. AdministrativeRequirements..73

    5.2. Tools andTechnologies...77

    5.2.1. Software Requirements5.2.2. Hardware Requirements

    5.2.3. System Specification at Central site5.2.4. System Specification at Client site

    6.Analysis and

    Modeling..796.1. Proposed

    System.80

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    7/117

    6.2. TechnicalArchitecture81

    6.3. System

    Architecture....826.4. ApplicationArchitecture84

    6.5. ErrorAnalysis...88

    6.5.1Front End Error Analysis6.5.2Back End Error Analysis

    6.6. Data Transfer and

    Communication..926.7. Input and OutputSpecification..94

    6.8. Overview of CreditOperations101

    7.Problem

    Assigned.103

    7.1. Overview..

    7.2. Oracle DatabaseAdministration.

    7.3. User InterfaceDesign

    7.4. Screen

    Design..8.Future Works..

    8.1. Future Scope of Development

    9. Conclusions.9.1 Conclusions Drawn

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    8/117

    10.Appendix10.1. Appendix A Acronyms

    10.2. Appendix B Bibliography

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    9/117

    1.1 Profile of TATA

    CONSULTANCY SERVICES

    Profile

    Tata ConsultancyServices (TCS) is a part of theUS$ 15 billion Tata group ofenterprises. Established in

    1968, Tata ConsultancyServices (TCS) dynamic

    blend of strategy consultingand system integrationservices to help organizationsarchitect and build their

    businesses in the globaleconomy.

    Consistently doublingits revenue every two years,TCS revenue for 2000-01stood at Rs 4560 crores ($1

    billion). It achieved a growth rate of 48.5% - a growth fuelled by acumulative experience of more than 60,000 person years across diversetechnology areas and business domains, enabling TCS to offer end-to-end consulting and IT solutions to more than 800 clients, across 55countries.

    Research & Development

    TCS offerings are backed by its investment (over 4% of itsrevenues) in Research and Development in cutting edge technology. Itssoftware tools foundry at Tata Research Development and DesignCenter, Pune is one of the most advanced in the world. TCS also hasresearch alliances with several world-renowned universities, such as the

    Indias top software exporter since 1968

    Growth rate of48.5% in 2000-01-revenue atRs 4560 crores ($1 billion)

    Over 800 clients; 7 out ofUS Fortune Top10 for 2000 are TCS clients

    More than 60,000 person years of experience Global spread of106 branches in 30 countries

    Projects in 55 countries

    Fifteen development centers assessed at SEICMM Level 5

    Four centers at P-CMM Level 4

    More than 1100 consultants qualified asCertified Quality Analysts (CQAs).

    End-to-end solutions through domain andtechnology expertise.

    Continuous enhancement of abilities throughnew service practices

    Global reputation in providing state of the

    art solutions to complex problems Innovative products

    Expanding capabilities through research andacademic relationships with variousuniversities across the world

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    10/117

    University of California at Riverside and San Diego, the Indian Institutesof Technology (IIT), and the Rotterdam School of Management.

    People

    Over 22,000 consultants form the backbone of the TCS mission,coming from the best universities and institutions in the world. At TCStechnology specialists and business management experts share expertiseto gain a thorough insight into the clients business, and look forinnovative ways to apply technology for lasting solutions.

    Quality

    With fifteen of its centres, and one of its joint ventures companies,assessed at Level 5 - the highest level in the Carnegie Melon SEICapability Maturity Model scale, more consultants over 12,800 -work at SEI-CMM level 5 quality, than in any organization in the world.From these locations, TCS provides several Fortune 500 clients 24x7software support and IT outsourcing through client-dedicated offshoreGlobal Development Centres. TCS also has several Competency Centers

    where technologists develop expertise in niche areas of technology andbusiness domains. In August 2001, TCS became the first organization inthe world to be assessed at P-CMM Level 4.

    Alliances

    TCS increases the diversity of its offerings through strategicalliances and joint ventures with global leaders in technology andeBusiness, such as BEA, Netscape, Microsoft, Macromedia, SAP,McKinsey & Co. and Compaq to name a few. TCS is also a foundermember of the Internet Security Alliance (ISA) and a member of theUniversal Description, Discovery and Integration project (UDDI),through which it works with world technology leaders for enhancingInternet security and usability.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    11/117

    Industry Practice

    Banking, FinancialServices and Insurance(BFSI)

    Telecom

    Manufacturing and

    Process

    Industries

    Transportation

    Healthcare

    Utilities

    Others (Government,

    Technology, Companies,Media, Tourism, etc.)

    Service Practice

    E-Business:Business Intelligence, CRM, ERP, Supply Chain

    Management, Internet Services, Groupware.

    Application Development and Maintenance:

    Re-engineering, Euro Currency, Multimedia, VisualComputing, Image Processing, GIS.

    Engineering Services:

    CAD, CAM, CAE, Real Time Systems and Process

    Controls

    Computer Security:

    Audit, Implementation and Design, Security Architecture

    Large Projects:

    Project Management, Planning and Delivery

    Infrastructure Development and Management:

    (Formerly Outsourcing and Systems Integration)

    Industry and Service Practices

    TCS brings to this professional relationship expertise in the area ofSystem Solution through a tight integration of its Industry Practice (IP)and Service Practice (SP) Groups.

    Banking

    TCS commands a comprehensive array of products, projectimplementation skills, expertise and experience in implementing third

    party solutions, covering the entire logistics of the banking industry. TCShas worked with some of the best banks worldwide, providing them

    mission-critical solutions and services for more than two decades.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    12/117

    Consulting and Research

    TCS offers consulting and research services in the following areas:

    Management consultancy and business process reengineering

    Management information systems and decision support systems

    Management audit

    Systems audit

    Research on credit and non-performing assets (NPA)

    Risk management (both credit and market risk)

    Costing

    Balanced score card and performance management

    Organizational development & restructuring

    IT strategy consultancy

    Service Areas

    TCS also offers various services to the banking industry in realizingoperational solutions.

    e-Banking and e-commerce solutions

    Application software design, development, implementation, trainingand support in the areas of retail banking, wholesale banking, andtreasury

    Integration with a variety of electronic delivery channels like ATM,

    tele-banking, internet, mobile banking and call center operations Facilities management, outsourcing and system integration services

    Performance measurement, review and tuning services

    Real-time gross settlements (RTGS), payment gateways

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    13/117

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    14/117

    2.1 Project Overview

    Project Name : Credit Management System

    Organization Name : TATA Consultancy Services

    Client Name : LEADING INDIAN BANK

    Project Type : Development Project

    Project Categorization : Large Project

    Group Leader : Ms. Shyamali Basu

    Project Leader : Mr. Ashok Avasthi

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    15/117

    2.2 Objective of the Project

    CMS is a web-based credit solution. The system has beendeveloped using J2EE Technology and TCS proprietary tool MasterCraft and runs in Windows NT Environment and using Oracle as adatabase.

    The objective of the projectis to carry out the customization of theexisting product and enhance the functionality to meet the requirementsof the LEADING INDIAN BANK.

    CMS would help the client to meet its objectives of better creditquality and faster turnaround time for credit applications thus increasingthe credit portfolio of the Bank and providing customer satisfaction.

    Other Objectives include

    To fulfill the market need of a web-enabled thin client CreditManagement System.

    Make non-technical users to understand and modify businessprocess.

    Decrease time and cost of initial implementation.

    Customizable, independent applications and components.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    16/117

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    17/117

    Therefore the customization of CMS has to be carried out withpromoting and expansion in mind.

    Design facilitating multi-lingual feature.

    Incorporation of Multi-Currency.

    Design of generic workflow: The application would consist ofworkflow only for the appraisal process. However, the designwould be such as to facilitate its expansion into a full-fledgedworkflow based product.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    18/117

    2.4 Salient Features

    Modular Approach

    The system is modular and its modules are seamlessly integrated.Various modules of CMS are as follows:

    Credit Policy & Guidelines

    This module automates the functions of the Credit Policy Cell ofthe Credit Department at the Head office i.e. to decide upon the creditsanctioning policies of the bank. It captures the Norms and Guidelines,

    Banks Master, ECGC (Export Credit Guarantee Corporation) CautionList, Defaulter List and Central Bank caution list to create the various

    policy masters. It also involves defining various loan facilities and creditschemes provided by the bank, interest rates, recommended financialratios, industrial classification, types of securities, criteria for borrowerrating, methods that can be used for computing the working capitalfinance requirements of a borrower and various fees like processing fee,up-front fees, lead bank fees.

    The key function of this module is to maintain a database of

    Banks policies

    Credit Appraisal

    This module covers the major function of the credit department i.e.to sanction loans falling under its discretionary powers as per the bankscredit policy. It allows user to process credit proposal received from a

    borrower, credit appraisal and capturing the credit decision of sanction or

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    19/117

    rejection of the loan followed by preparation of relevant letters andadvises. It involves trend analysis of the past performance, and analysisof the future prospects based on financial statements of the borrower, andusing financial tools like ratio analysis, fund flow analysis and credit

    sanction models.

    The key functions of this module are:

    Borrower profile

    Proposal

    Appraisal

    Credit Decision

    Credit Monitoring

    Credit Monitoring involves post-sanction follow-up of loans andcredit facilities and assertion of the status of the borrower. Thesanctioning authoritys monitoring is based on various documents andreports like BCC (Branch Compliance Certificate), MOR (MonitoringOfficers Report), QIS (Quarterly Information System), CA stockverification report, post-sanction visit reports, which are submitted by the

    branches. The dealing officer scrutinizes these and obtains clarificationsfrom branches in case any irregularity or non-compliance is observed.

    The key functions of this module are:

    Borrower Monitoring

    Loan Audit Cell

    Documents Management System (DMS)

    This module is responsible for preparation of requisite documents,which are issued to the customer or are to be maintained by the bankitself.

    The key functions of this module are:

    Creation of documents

    Maintenance of documents

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    20/117

    MIS

    This module has functions, which capture the branch data to

    generate quarterly, half-yearly and yearly statutory and regulatory reportsrelated to Credits, Rural Development, Off Site Surveillance andRecovery & Law. This is followed by consolidation of various branchreports at RO and then finally at HO to generate various MIS and RBIreports.

    This module has to provide following types of reports

    Statutory

    Control Statistical

    Simple Functional Interface for the User

    The data entry screens displayed are simple and easilyunderstandable, with Graphical User Interface (GUI). The system has

    been developed keeping in mind that the users may not be well

    acquainted with usage of computers. That is why a simple menu drivenGraphical user interface has been provided. Context Sensitive help isalso available at each page so that user can easily understand the usageand functionality of each screen.

    Several Decision Support Tools for Credit Appraisals

    The system offers several decision support tools for credit

    appraisals, which enhances the speed and quality of the appraisal anddecision-making. Some of these are mentioned below.

    Rating and Pricing

    Ratio Calculations

    Functional Validations

    Re-Computation of financial analysis based on Banksassessment

    Sensitivity Analysis

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    21/117

    Reduces the drudgery of making multiple reports based onrepetitive data.

    Based on one time data received from branches on twostandard formats.

    Addresses issues relating to quality of data and delays inmanual preparation of MIS.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    22/117

    3.1 Scope of the Project

    Corporate Credit Management System would help Banks to meet its

    objectives of better credit quality and faster turnaround time for credit

    applications thus increasing the credit portfolio of the Bank and

    providing customer satisfaction.

    Credit Management Solution provides for follow-up action for non-

    receipt or delayed receipt of reports and review of reports by higher

    officials.

    Helps the bank in creating and tracking credit information regarding

    irregularities with regard to conduct, performance and compliance of

    each account based on feedback from the branches.

    This information can give invaluable early warning signals and bank

    can take mid course corrective and preventive actions.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    23/117

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    24/117

    Automated financial calculations.On-line availability of defaulters list during appraisal.Automated generation of MIS.Automated tracking of irregularity & non-receipt of reports.

    Better Management Control

    Availability of data for analysis and policy formulation.Timely MIS.Rigorous monitoring.

    The project will create a better and more efficient environment for theend user as well as for the bankers. There will be a single repository ofdata from where the information can be shared by Regional, Zonal andBranch offices of the banks.

    Banks are eagerly anticipating such a system which means, they arealso very much looking forward to install a system like CMS.

    The system is committed to change the way loans are disbursed. Auser can access his account at any time and get his status updated.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    25/117

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    26/117

    4.1 Organization of the Project

    The system is organized into the following modules:

    1. Policy

    This module automates the functions of the Credit Policy Cell ofthe Credit Department at the Head office i.e. to decide upon the creditsanctioning policies of the bank. It captures the Norms and Guidelines,Banks Master, ECGC (Export Credit Guarantee Corporation) CautionList, Defaulter List and Central Bank caution list to create the various

    policy masters. It also involves defining various loan facilities and creditschemes provided by the bank, interest rates, recommended financialratios, industrial classification, types of securities, criteria for borrowerrating, methods that can be used for computing the working capitalfinance requirements of a borrower and various fees like processing fee,up-front fees, lead bank fees.

    2. Credit Proposal

    This module covers the major function of the credit department i.e.to sanction loans falling under its discretionary powers as per the bankscredit policy. It allows user to process credit proposal received from a

    borrower, credit appraisal and capturing the credit decision of sanction or

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    27/117

    rejection of the loan followed by preparation of relevant letters andadvises. It involves trend analysis of the past performance, and analysisof the future prospects based on financial statements of the borrower, andusing financial tools like ratio analysis, fund flow analysis and credit

    sanction models.

    3. Credit Appraisal

    This Module deals with handling of sanction or rejection ofproposals that have been approved. Each appraisal results in a creditdecision. The credit decision could be sanction or rejection. The systemcan accord sanctions of various types:

    Fresh : These are accorded for new borrowers/ projects.Renewal: These are accorded to the existing borrowers without increasein banks exposure

    Renewal-cum-Enhancement: These are also accorded to the existingborrowers with increase in banks exposureReduction : These are accorded to the existing borrowers with decreasein banks exposure

    Reschedulment: In this case the loan repayment schedules are changed

    or altered.

    4. Monitoring

    Credit Monitoring involves post-sanction follow-up of loans andcredit facilities and assertion of the status of the borrower. Thesanctioning authoritys monitoring is based on various documents andreports like BCC (Branch Compliance Certificate), MOR (MonitoringOfficers Report), QIS (Quarterly Information System), CA stockverification report, post-sanction visit reports, which are submitted by the

    branches. The dealing officer scrutinizes these and obtains clarificationsfrom branches in case any irregularity or non-compliance is observed.

    5. MIS Report

    This module has functions, which capture the branch data togenerate quarterly, half-yearly and yearly statutory and regulatory reports

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    28/117

    related to Credits, Rural Development, Off Site Surveillance andRecovery & Law. This is followed by consolidation of various branchreports at RO and then finally at HO to generate various MIS and RBIreports.

    6. RBS (Role Based Security)

    This module is responsible for the security of the system. All usersshould not be allowed access to entire database. Each user is assigned aUser ID and a password along with the access rights. RBS modulemaintains a database of these users and their roles and checks whetherthe user is authorised for a particular access or manipulation operation.

    7. DMS (Document Management System)

    This module is responsible for preparation of requisite documents,which are issued to the customer or are to be maintained by the bankitself. The entire procedure of credit management starting from

    customers proposal, to sanction of loan including appraisal and financialanalysis requires a lot of documents to be maintained. All thesedocuments are created and managed by DMS module.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    29/117

    4.2 Functional Modules

    Policy

    Norms

    Appraisal

    CreditDecision

    Rejection

    Monitoring

    Monitoring

    Loan audit

    Sanction

    LoanApplications

    POA SanctionMonitoringReports

    Position ofAccount

    AssetClassification

    MIS

    OPERATIONS

    P

    E

    R

    A

    T

    I

    O

    N

    S

    B

    O

    R

    R

    O

    W

    E

    R

    S

    (Functional architecture of CMS at a glance)

    O

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    30/117

    The above figure depicts the interaction of various modules inCMS. the borrower along with the financial details first submits a loanapplication. The system enters the appraisal module. After analysis, acredit decision is made (sanction/rejection). While taking a decision, the

    policy norms are taken into consideration. This is where policy moduleis needed. After issuing the sanction letter, monitoring phase begins, inwhich the financial activities of customer are monitored. During all these

    phases documents are created and maintained.

    4.2.1 Credit Policy

    Credit policy encapsulates norms, guidelines and benchmarks

    based on guidelines provided by Reserve Bank Of India and the Banksown policies and guidelines. These are used by the system at the time ofassessment of limits or for monitoring or generation of MIS. These aremaintained at the Head Office and can also be used at any site whereCMS is installed.

    RBI guidelines and circulars are gathered and stored in thedatabase along with the BANKs own policies and Benchmarks. Theseact as guidelines for Appraisal, monitoring, MIS, etc. Defaulters list andCaution list maintained by monitoring the performance of customer andchecking it against the policy benchmarks.

    Defaulter lists

    BanksCaution lists

    ECGC

    Policy

    Norms

    Guidelines

    Benchmarks

    Circulars

    Guidelines

    & Circulars

    Banks guidelines andBenchmarks

    Policies & guidelines for Appraisal, Monitoring, MIS

    PolicyreplicationBO

    Centralized Maintenance at HO

    (Schematic diagram showing policy maintenance and utilization)

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    31/117

    4.2.2 Credit Appraisal

    Credit Appraisal addresses assessment of credit needs of theborrowers who deal with the bank. It supports proposal handling andsanction of regular, ad-hoc, renewal and enhancement of limits.

    Functional capabilities of the appraisal module are detailed below:

    Handling of different types of proposals towards sanctioning offund based/non-fund based facilities:

    Working Capital requirements

    Term Loan requirements

    Composite Loan requirements

    Different types of business activities for which appraisals can beundertaken:

    Manufacturing

    Trading

    Manufacturing & Trading

    Leasing & Hire-Purchase

    Specialized Appraisals

    Ship Breaking

    Sugar/Tea/Construction

    Term Loans

    CreditDecisionCredit

    Rating

    Loan

    ApplicationBorrower

    ProfileProposalDetails

    Appraisal /Assessment

    Policy Details

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    32/117

    Export

    Different Methods of Lending like:

    Turnover Method

    First Method

    Second Method

    Cash Budget Methods

    Types of Sanctions

    Fresh

    Renewal Renewal-cum-Enhancement

    Reduction

    CMS can also handle the following

    In-principle Approvals

    Validity Extensions

    Confirmation of Actions

    Follow up mechanism for:

    Renewal and review of accounts

    Adjustment of adhoc/additional limits

    Validity extensions

    Submission of proposal for in-principle approval

    Aids for Credit Appraisal:

    On-line availability of Benchmarks, Guidelines, Norms &Guidelines

    Financial Tools & Techniques

    Break-even Analysis

    Capital Budgeting

    Sensitivity Analysis

    Provision to calculate Standard and Additional Ratios

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    33/117

    Borrower rating for existing cases based on the pre definedparameters

    Search in Defaulters & Caution Lists

    Cash Budget Methods for industries like tea, sugar etc.

    Check list of documents needed for appraisal

    On line availability of loan covenants

    Group exposures & prudential exposure monitoring

    Monitoring Details

    Credit Rating as a tool for borrower Appraisal and Pricing.

    Focus Questions to aid credit officer see deviations invalues of important financial indicators.

    Capture of Credit Decision

    Sanction

    Rejection

    Raising of queries

    Appraisal note with least typing effort:

    Availability of previous data for renewal Executive Summary

    Process notes for:

    Regular sanctions and renewals

    In-principle approvals

    Validity extensions

    Confirmation of actions

    Adhoc /additional limits Electronic Approval of Appraisal Note.

    Generation of Sanction/Rejection Letters and Remindersetc.

    Handling of Amendments of Sanctions/Stipulated Terms &Conditions.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    34/117

    4.2.3 Credit Monitoring

    Credit Monitoring provides for the follow up mechanism after thelimits are sanctioned. It is based on both off-site and on-site reports and

    feedback (Monitoring officers report, Visit report).

    (Flow of monitoring process and activities)

    Borrower accounts are monitored for their conduct after aloan has been sanctioned. Some periodic reports / information arereceived from the borrowers based on the BANK specific guidelines.Bank should be able to assess the health of the borrower account usingthis information. The system generates reports in the form of letters forthe following:

    a. Non-receipt of informationb. On review comments for clarifications raised by the

    reviewerc. On variance analysis made by the system.

    Further, borrower accounts are also monitored based oninternal follow up of the bank. This follow up is undertaken based onvarious internal reports, reviews and follow up measures, like stock

    verification by CA & banks officials, visit reports etc. The system

    TrackIrregularities

    Review

    Reports

    VarianceAnalysis

    SeekClarifications

    GenerateReminders

    RO

    TrackIrregularities

    Review

    Reports

    VarianceAnalysis

    SeekClarifications

    GenerateReminders

    HOBranch

    TrackIrregularities

    Review

    Reports

    VarianceAnalysis

    SeekClarifications

    GenerateReminders

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    35/117

    generates reports in the form of letters for non-receipt of information andbased on review comments.

    Monitoring of sanctioned limits based on the financial details

    submitted by the borrowers in following statutory forms:

    QIS IQIS IIQIS III

    Follow up based on internal reports of the Bank:

    CA Stock Verification

    Compliance Reports like, Branch Compliance Certificatefor a sanction

    Monitoring Officers Reports

    Visit Reports

    Position of Account outstanding amounts due/overdue

    In the system, areas of irregularities can be maintained which canbe linked to bank defined irregularities.

    For each of the internal report, the irregularities are specified andthe reviewer can specify review remarks.

    The system tracks irregularities/clarifications and reviewscomments .

    Generation of letters and reminders for CMS user of irregularitiesand clarifications.

    Loan Audit Cell

    Review of appraisals made / loans sanctioned by branch officesunder their discretion by the higher office

    Generation of letters and reminders from BO/HO seekingclarifications.

    4.2.4 Credit MIS

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    36/117

    Over two hundred reports are generated for credit departmentincluding priority sector and recovery reports. These reports are meantfor control, top management and for statutory reporting.

    4.3 Methodology

    Software Engineering Model Used- RATIONAL UNIFIEDPROCESS

    The Rational Unified Process (RUP) is an iterative softwaredevelopment framework that enhances team productivity and promotesteam unity by delivering software best practices to all team members.The RUP standards make it easier to manage the development anddeployment of our Business Internet Solutions, allowing us to achievefaster time-to-market with new products and services.

    R E C O V E R yP R I O R I T y

    MIS

    CreditReports Other

    Departmental

    Reports

    Overdue LoanProposals

    Proposal/DisposalRegisters

    Statement ofStandardIrregularAccounts

    DiscretionRegisterConsortiumRegister

    Top

    Mgmt

    StatutoryControl

    (Type of MIS, which can be generated using CMS)

    Reports

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    37/117

    Rational Unified Process (RUP) is an object-oriented and Web-enabled program development methodology. RUP and similar products -such as Object-Oriented Software Process (OOSP), and the OPENProcess - are comprehensive software engineering tools that combine the

    procedural aspects of development (such as defined stages, techniques,and practices) with other components of development (such asdocuments, models, manuals, code, and so on) within a unifyingframework.

    RUP establishes four phases of development, each of which isorganized into a number of separate iterations that must satisfy definedcriteria before the next phase is undertaken: in the inception phase,developers define the scope of the project and its business case; in the

    elaboration phase, developers analyze the project's needs in greater detailand define its architectural foundation; in the construction phase,developers create the application design and source code; and in thetransition phase, developers deliver the system to users. RUP provides a

    prototype at the completion of each iteration.

    Architecture of the RUP

    The process has two structures or, if you prefer, two dimensions:The horizontal dimension represents time and shows the lifecycle

    aspects of the process as it unfolds.The vertical dimension represents core process disciplines (or

    workflow) that logically group software-engineering activities by theirnature.

    The first (horizontal) dimension represents the dynamic aspect ofthe process expressed in terms of cycles, phases, iterations, andmilestones. In the RUP, a software product is designed and built in asuccession of incremental iterations. This allows testing and validationof design ideas, as well as risk mitigation, to occur earlier in the

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    38/117

    lifecycle. The second (vertical) dimension represents the static aspect ofthe process described in terms of process components: activities,disciplines, artifacts, and roles.

    (Two Dimensions of the RUP)

    4.3.1 Bea Weblogic Server 7.0

    Weblogic server is an industrial-strength implementation of the

    J2EE platform suitable for developing high-volume, dynamic web sitesand enterprise applications. It gives developers unmatched flexibility inhow they design, implements, and deploys these systems on theircorporate networks.

    Weblogic provides exhausted support for all aspects of the J2EEstandard; making it easy to build Web and Enterprise applications thatconnect to databases, mail systems, messaging systems, CORBA-basedsystems, and legacy systems on a variety of platforms. Extensive

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    39/117

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    40/117

    Figure: Weblogic directory Structure

    Directory Contents

    jdk Contains the java development kit.

    CMS Domain created for deploying the project.

    applications This folder contains the .jar files i.e. the java archive containing theEJB class files and deployment descriptors.

    DefaultWebApp This folder contains the GUI components i.e. the JSPs and HTMLfiles.

    classes This folder contains the servlets.

    Other directories They contain the necessary java files, utilities and Weblogic libraryfiles and JARs needed by the application.

    JDBC Drivers:

    One of the most common uses of Weblogic server is to Web-enable data residing in relational database management systems(RDBMSs), such as Oracle.

    New driver can be configured through the Weblogic console. Here

    we first create a connection pool by specifying the URL of the databaseserver. Then we create the Data Source using this connection pool.

    After creating the domain and configuring the data source theserver is ready for deploying applications.4.3.2 Servlets

    Java Servlet Technology

    As soon as the Web began to be used for delivering services,service providers recognized the need for dynamic content. Applets, oneof the earliest attempts toward this goal, focused on using the client

    platform to deliver dynamic user experiences. At the same time,developers also investigated using the server platform for this purpose.Initially, Common Gateway Interface (CGI) scripts were the maintechnology used to generate dynamic content. Although widely used,CGI scripting technology has a number of shortcomings, including

    platform dependence and lack of scalability.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    41/117

    To address these limitations, Java servlet technology was createdas a portable way to provide dynamic, user-oriented content.

    A servlet is a Java programming language class that is used toextend the capabilities of servers that host applications access via arequest-response programming model. Although servlets can respond toany type of request, they are commonly used to extend the applicationshosted by Web servers. For such applications, Java Servlet technologydefines HTTP-specific servlet classes.

    The javax.servlet and javax.servlet.http packages provideinterfaces and classes for writing servlets. All servlets must implementthe Servlet interface, which defines life-cycle methods. When

    implementing a generic service, you can use or extend theGenericServlet class provided with the Java Servlet API. TheHttpServlet class provides methods, such as doGet and doPost, forhandling HTTP-specific services.

    The Servlet Life Cycle

    The life cycle of a servlet is controlled by the container in whichthe servlet has been deployed. When a request is mapped to a servlet, thecontainer performs the following steps :

    1) If an instance of the servlet does not exist, the Webcontainer

    a. Loads the servlet class.b. Creates an instance of the servlet class.c. Initializes the servlet instance by calling the init

    method.

    2) Invokes the service method, passing request and responseobjects.

    If the container needs to remove the servlet, it finalizes the servletby calling the servlet's destroy method. Hence servlets have a well-defined life cycle.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    42/117

    A servlet goes through a three stage life cycle:

    Initialization

    Service

    Destruction

    Figure: The servlet life cycle

    Initialisation

    The servlet container loads servlets either at server startup orwhen they are accessed (dynamically). Many of the application serverscontain a way of specifying which servlets are loaded at startup. After aservlet class is instantiated, the container creates the servletconfiguration ServletConfig object that can be optionally passed as a

    parameter to the init() method.You can override the no-argument init()method if you need to perform startup tasks such as opening database

    connections, creating session objects, finding naming services and so on.

    Create

    Initializ

    e

    Available

    (Servicing

    Requests)

    Destro

    y

    Unavailable

    Unload

    FailureSuccess

    Success

    Destroy request

    Failure

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    43/117

    If the initialization is successful, the servlet is available forservice; otherwise, the process will throw ServletException orUnavailableException.

    Service

    After initialization, the container invokes the service() method,passing a request and response object. The main purpose of the service()method is to get information from the HTTP request, perform the tasksneeded to answer this request, collate the needed information, and finally

    post the response based on that information.

    Destruction

    The Servlet Container stops a servlet by invoking the destroy()method of the servlet interface. The destroy() method is invoked whenthe container determines that the servlet should be removed from theservice; for example, if the container is being shut down or morememory is required.

    Typically, you override the destroy() method to release any

    resources previously allocated in the init().

    ServletContext

    The ServletContext object permits multiple servlets within a Webapplication to have access to shared information and resources.There isone instance per Web application per Java Virtual Machine(JVM).

    Using the ServletContext object, a servlet can log events, set andget attributes, and obtain URLs.

    The ServletContext object, a servlet can log events, set and getattributes, and obtain URLs.

    The ServletContext object is rooted at a specified path. The pathcan be obtained during runtime using the getContextPath() method of theHttpServletRequest object.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    44/117

    Handling Errors

    Any number of exceptions can occur when a servlet is executed.When an exception occurs, the Web container will generate a default

    page containing the message

    A Servlet Exception Has Occurred

    But you can also specify that the container should return a specificerror page for a given exception.

    Initializing a Servlet

    After the Web container loads and instantiates the servlet classand before it delivers requests from clients, the Web container initializesthe servlet. To customize this process to allow the servlet to read

    persistent configuration data, initialize resources, and perform any otherone-time activities, you override the init method of the Servlet interface.A servlet that cannot complete its initialization process should throwUnavailableException.

    Writing Service Methods

    The service provided by a servlet is implemented in the servicemethod of a GenericServlet, in the doMethod methods (where Methodcan take the value Get, Delete, Options, Post, Put, or Trace) of anHttpServlet object, or in any other protocol-specific methods defined bya class that implements the Servlet interface.

    The general pattern for a service method is to extract informationfrom the request, access external resources, and then populate theresponse based on that information.

    For HTTP servlets, the correct procedure for populating theresponse is to first retrieve an output stream from the response, then fillin the response headers, and finally write any body content to the outputstream. Response headers must always be set before the response has

    been committed. Any attempt to set or add headers after the response hasbeen committed will be ignored by the Web container. The next twosections describe how to get information from requests and generateresponses.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    45/117

    Getting Information from Requests

    A request contains data passed between a client and the servlet.

    All requests implement the ServletRequest interface. This interfacedefines methods for accessing the following information:

    Parameters, which are typically used to convey informationbetween clients and servlets

    Object-valued attributes, which are typically used to passinformation between the servlet container and a servlet or betweencollaborating servlets

    Information about the protocol used to communicate the requestand about the client and server involved in the request

    Information relevant to localizationHTTP servlets are passed an HTTP request object,HttpServletRequest, which contains the request URL, HTTPheaders, query string, and so on.

    An HTTP request URL contains the following parts:

    http://[host]:[port][request path]?[query string]

    The request path is further composed of the following elements:

    Context path: A concatenation of a forward slash (/) with thecontext root of the servlet's Web application.

    Servlet path: The path section that corresponds to the componentalias that activated this request. This path starts with a forwardslash (/).

    Path info: The part of the request path that is not part of thecontext path or the servlet path.

    Constructing Responses

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    46/117

    A response contains data passed between a server and the client. Allresponses implement the ServletResponse interface. This interfacedefines methods that allow you to:

    Retrieve an output stream to use to send data to the client. To sendcharacter data, use the PrintWriter returned by the response'sgetWriter method.

    Indicate the content type (for example, text/html) being returnedby the response with the setContentType(String) method. Thismethod must be called before the response is committed.

    Indicate whether to buffer output with the setBufferSize(int)

    method. By default, any content written to the output stream isimmediately sent to the client. Buffering allows content to bewritten before anything is actually sent back to the client, thus

    providing the servlet with more time to set appropriate statuscodes and headers or forward to another Web resource. Themethod must be called before any content is written or before theresponse is committed.

    Set localization information such as locale and character

    encoding.

    HTTP response objects, HttpServletResponse, have fieldsrepresenting HTTP headers such as the following:

    Status codes, which are used to indicate the reason a request is notsatisfied or that a request has been redirected.

    Cookies, which are used to store application-specific information

    at the client. Sometimes cookies are used to maintain an identifierfor tracking a user's.

    Invoking Other Web Resources

    Web components can invoke other Web resources in two ways:indirectly and directly. A Web component indirectly invokes anotherWeb resource when it embeds a URL that points to another Webcomponent in content returned to a client.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    47/117

    A Web component can also directly invoke another resource whileit is executing. There are two possibilities: The Web component caninclude the content of another resource, or it can forward a request to

    another resource.

    To invoke a resource available on the server that is running a Webcomponent, you must first obtain a RequestDispatcher object using thegetRequestDispatcher("URL") method.

    Maintaining Client State

    Many applications require that a series of requests from a client be

    associated with one another. Web-based applications are responsible formaintaining such state, called asession, because HTTP is stateless. Tosupport applications that need to maintain state, Java servlet technology

    provides an API for managing sessions and allows several mechanismsfor implementing sessions.

    Accessing a Session

    Sessions are represented by an HttpSession object. You access a

    session by calling the getSession method of a request object. Thismethod returns the current session associated with this request, or, if therequest does not have a session, it creates one.

    Associating Objects with a Session

    You can associate object-valued attributes with a session by name.Such attributes are accessible by any Web component that belongs to thesame Web context andis handling a request that is part of the samesession.

    Session Tracking

    A Web container can use several methods to associate a sessionwith a user, all of which involve passing an identifier between the clientand the server. The identifier can be maintained on the client as a cookie,

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    48/117

    or the Web component can include the identifier in every URL that isreturned to the client.

    If your application uses session objects, you must ensure that

    session tracking is enabled by having the application rewrite URLswhenever the client turns off cookies. You do this by calling theresponse's encodeURL(URL) method on all URLs returned by a servlet.This method includes the session ID in the URL only if cookies aredisabled; otherwise, it returns the URL unchanged.

    Finalizing a Servlet

    All of a servlet's service methods should be complete when

    a servlet is removed. The server tries to ensure this by calling the destroymethod only after all service requests have returned or after a server-specific grace period, whichever comes first. If your servlet hasoperations that take a long time to run (that is, operations that may runlonger than the server's grace period), the operations could still berunning when destroy is called.

    This requires the servlet to perform the following tasks:

    Keep track of how many threads are currently running theservice method

    Provide a clean shutdown by having the destroy methodnotify long-running threads of the shutdown and wait forthem to complete

    Have the long-running methods poll periodically to checkfor shutdown and, if necessary, stop working, clean up, andreturn

    To ensure a clean shutdown, your destroy method shouldnot release any shared resources until all the service requests havecompleted.

    4.3.3 JavaServer Pages Technology

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    49/117

    A java server page is a template for the web page that uses Javacode to generate an HTML document dynamically. JSPs are run in aserver side component called JSP Container, which translates them intoequivalent Java Servlets.

    JavaServer Pages (JSP) technology allows you to easily createWeb content that has both static and dynamic components. JSPtechnology makes available all the dynamic capabilities of Java servlettechnology but provides a more natural approach to creating staticcontent.

    JSPs have all the advantages of the servlets:

    They have better performance and scalability than CGIscripts because they are persistent in memory and muti-threaded.

    No special client setup is required.

    They have built in support for HTTP

    sessions,which makes application programming possible.

    They have full access to Java technology networkawareness,threads,and database connectivity-withoutlimitation of client-side applets.

    They are automatically recompiled whenever necessary.

    Because they exist in the ordinary Web Server documentspace ,addressing JSP pages is simpler than addressing

    servlets.

    Because JSP pages are HTML like,they have greatercompatibility with Web development tools.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    50/117

    JSP

    AJSP page is a text document that contains two types of text:static data, which can be expressed in any text-based format (such as

    HTML, SVG, WML, and XML), and JSP elements, which constructdynamic content.

    The recommended file extension for the source file of a JSP pageis .jsp. The page can be composed of a top file that includes other filesthat contain either a complete JSP page or a fragment of a JSP page. Therecommended extension for the source file of a fragment of a JSP page is.jspf.

    The JSP elements in a JSP page can be expressed in two syntaxes-standard and XML-though any given file can use only one syntax. A JSP

    page in XML syntax is an XML document and can be manipulated bytools and APIs for XML documents.

    A JSP page is executed by JSP engine ,which is installed in Webserver or JSP-enabled application server such as Weblogic orSilverStream.A JSP engine receives requests made by client to JSP

    page,then generates responses from JSP page back to the client.

    Normally JSP pages are compiled into Java Seervlets ,a standard JavaExtension.

    Features of JSP Pages

    JSP pages are feature rich and make efficient use of the server-side components.

    Efficient use of server-side Java: Many features of java make itdesirable platform for writing server applications.Server applications

    benefit from Javas development features such as type safety ,virtualabsence of memory leaks and multithreading support.

    JSP File .java fileservlet

    .class fileservlet

    Pre-processed compiled

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    51/117

    Web Development, Deployment, and Maintenance: JSP pagesfacilitate the development process for programmers and page authorsalike. By supporting component-based development and customized taglibraries,JSP pages not only simplify page authoring but also provide a

    strong foundation for a wide range of page authoring tools.

    Components That Are Reusable: Developers are able to share andexchange components that perform common operations ,includingmaking them available to larger user or customer communities.Thecomponent based approach speeds overall development while allowingorganization to leverage their existing expertise and development effortsfor optimal results.It promotes reuse,which in turn promotes consistency.

    Separating Business Logic and Presentation: Using JSPtechnology, Web page developers construct HTML and/or XML tags todesign and format the Web page.The logic that generates the content is

    brought together in tags and Javabeans components and bound togetherin scriplets ,which are ultimately executed on the server side.If core logicis encapsulated in tags and beans ,other individuals can edit and workwith JSP page without affecting the generation of content.This helpsauthors protect their own propreitary code while ensuring complete

    portability for any HTML-based Web browser.

    Large Development Community and Widespread Support: TheJSP specification is developed under the Java CommunityProcess,ensuring that the specification has a broad spectrum of industryinput and support.The reference implementation is developed openlyunder the Apache process.

    Platform Independence: Java Server Pages provides a component-based,platform independent process for building Web-basedapplications.This widespread ,multi-platform support allows Webdevelopers to write their JavaServer Pages code once and run itanywhere.

    Next Generation Page Development with Tags: The Java ServerPages technology encapsulates much of the functionality required fordynamic content generation in easy-to-use,JSP-specific XML-like tags,allowing Web page developers to work with familiar tools andconstructs to perform sophisticated functions.Standard JSP tags can

    perform functions that are difficult and time-consuming to code such as

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    52/117

    accessing and instantiating JavaBeans components ,setting or retreivingbean attributes ,and downloading applets.JSP technology is extensiblethrough development of custom tag libraries.

    The Components of a JSP Page

    JSP Directives

    JSP directives are used to pass instructions to JSP engine.These directives include the following:

    Page directivesThese directives communicate page-specificinformation,such as buffer and thread information or error handling

    Language directivesThese specify the scripting language,alongwith any extentions.

    The include directiveThis directive can be used to include anexternal document in the page.If an element is to be used many timesthroughout a site ,it is easier to maintain common files in one central

    location and include them in several pages than o update them in eachJSP page.

    A taglib directive This indicates a library of custom tags that thepage can invoke.This is powerful and relatively unobtrusive.It avoidsadding scriplet or embedded code,which is hard to maintain.

    JSP Tags

    A number of standard tags have been specified:

    Jsp:usebean This tag declares the usage of an instance of aJavaBeans component.The JavaBeans component instantiates andregisters the tag if the bean doesnot already exist.

    Jsp:setpropertyThis sets the value of the property in a bean .

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    53/117

    Jsp:getpropertyThis tag gets the value of a bean instancepropety,converts it to a string,and puts it in the implicit object out

    Jsp:includeThe tag will cause the specific file to be included in

    the current JSP page.

    Jsp:forwardThis tag will forward or redirect control to anotherJsp page.

    Scripting Elements

    Jsp page can include small scripts called scriplets.A scriplet is a

    code fragment that is executed at request time process.scriplets may becombined with static elements on the page , thus creating a dynamicallygenerated page. Scripts are delineated with markers.Ifmultiple scriplets exist ,they are each appended to the _jspservice()method in the order in which they are coded.

    To give it linkage to JSP container ,JSP container , a JSP page hasaccess to a number of the implicit objects .These are automaticallyinitialized objects that have predefined variable names. These variables

    are

    Request

    Response

    Pagecontext

    Session

    Application

    Out

    Config

    Page

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    54/117

    Exception

    Declarations

    A declaration is used to incorporate Java statements into JSP page.Declarations have three primary uses:

    Variable declarations: Both class and instance variables can bedefined, although care must be taken to ensure that write access to thevariables is synchronized because servlets, by default are multithreaded.

    Method definitions: Additional mehods can be added to thegenerated servlet by means of JSP declarations.Because the generatedcode is not inside the _jspService() method,however it does not haveaccess to implicit variables(request,response,etc.)

    Inner classes: Declarations provide a convenient means forwriting inner classes.

    An HTTP request can be advantageous. JSP provides two generalcapabilities to support this :

    Including othervresources,either with or.

    Forwarding a request using .

    The Page Directive

    The page directive enables a page author to supply instructions tothe JSP container.The operation of each attribute can be specified:

    Language: the scripting language(java,by default)

    Extends: a specialized superclass for the page

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    55/117

    Import: the package and classes that should be visible to thegenerated servlet

    Session: whether to create an HTTP session object

    Buffer: the output buffering model

    Autoflush: whether to flush the buffer when full or throw anexception

    IsThreadSafe: whether to implement SingleThreadModel

    Info: a description of the page to be displayed in a development

    tool

    ContentType: the character encoding used by the JSP response

    IsErrorPage: whether to supply access to the implicit exceptionvariable

    ErrorPage: the URL of a page that handles uncaught exceptions

    Deploying And Developing JSP Pages

    Write your JSP pages ,Java servlets ,JavaBeanscomponents,and other supporting Java classes.

    Package the JSP pages and supporting classes in theappropriate archive format.

    Deploy the archive to J2EE-compliant server.

    Writing JSP Pages

    To create a Web application that contains one or more Jsp pages

    1) Create a directory structure for application that conforms to theformat requiredfor the Web application.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    56/117

    WAR(Web Archive)Container for the Web-basedapplication.A zip file contains the contents of the rootdirectory and all subdirectories.

    Root directory Can contain JSP pages ,HTMLdocuments,and any other contents for the application.Theseobjects can also be subdirectories of the root

    WEB-INFA required subdirectory for descriptivedeployment files that contain all the components ofapplication that should not be available directly to theclients. The WEB-INF directory must contain a file calledweb.xml that is the deployment descriptor for the Web

    application.

    2) Write the JSP pages and save them in root directoryof Webapplication.

    3) Create any Java Servlets,JavaBeans components,or othersupporting Java classesrequired by the application and compilethese classes.

    JSP Architectures

    JSP technology provides a standard for a declarative ,presentationcentric method of developing servlets.

    JSP pages are subject to translation phase and request-processingphase.The translation phase is carried out only once ,unless JSP page

    changes ,in which case it can be repeated.Jsp page can be precompiledinto class files.Precompilation may be especially useful in removing thestartup delay that occurs when a JSP page delivered in source formreceives the first request from a client.

    The JSP page implementation class file extendsHttpJspBase,which implements the Servlet interface.The service methodof this class, _jspService(),esentially sends the contents of the JSP pageto the method.The _jspService() method can describe initialization and

    destroy events by providing implementations for jspInit() and

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    57/117

    jspDestroy() methods within their JSP pages. The _jspService() methodreplies to a clients request.

    There are atleast two approaches to building and applying JSP

    technology.These approaches differ essentially in terms of where therequest processing is performed .

    One approach allows for business logic and presentation code tobe intermixed with presentation itself(HTML).Maintaining hundreds ofJSP pages could be expensive ,especially if the corporate look and feelchanges often.The more mature approach prescribes that all the code,

    business logic, and such be excluded from presentation to the extent thatthis is possible.

    4.3.4 Enterprise Java Beans

    Enterprise Java Beans (EJB) is a server side componentarchitecture that enables and simplifies the process of buildingenterprise-class distributed object applications in java. By using EJB youcan write scalable, reliable and secure applications without writing yourown complex distributed object framework. EJB is about rapid

    application development for the server side: you can quickly and easilyconstruct server side components in Java by leveraging a pre-writtendistributed infrastructure provided by the industry. EJB is designed tosupport application portability and reusability across any vendorsenterprise middleware services.

    Component Architectures In Java

    Java Beans are development components and are not deployablecomponents. The Enterprise Java Beans (EJB) standard definescomponent architecture for deployable components called EnterpriseBeans. Enterprise Beans are larger, coarser-grained applicationcomponents that are ready to be deployed. Deployable components must

    be deployed in a container that provides run time services to thecomponents, such as services to instantiate components as needed.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    58/117

    Enterprise Beans are very similar to two other types of Javacomponents: applets and servlets. Applets can be deployed in a web

    page, where the browsers applet viewer provides a run time containerfor the applet. Servlets can be deployed in a web-server, where the web-

    servers servlet engine provides a run time container for the servlets.Enterprise Beans are deployed in an application server where theapplication server provides a run time container for the Enterprise JavaBeans (EJB).

    Enterprise Java Beans (EJB) are not intended for the client side,but are server side components. They are meant to perform sever sideoperations such as executing complex algos. The server side hasdifferent kind of need for a rich GUI environment. An application server

    provides this high-end server side environment for the Enterprise JavaBeans and it provides the run time containment necessary to manage theenterprise beans.

    N-Tier Architecture

    An n-tier architecture adds one or more tiers to the 2-tier model(classical server-client model). In n-tier deployment, your presentation

    layer, business logic layer and data layer are separated into respectivephysical tiers.

    Concrete example of an n-tier architecture is a three-tier webbased deployment. The description is as follows:

    Presentation tier runs within the address space of one ormore web servers. It consists of Java servlets or Java ServerPages (JSP) and workflow logic.

    Business Logic tier runs within the address space of one ormore application servers. Application servers are necessaryto provide a suitable containment environment for the

    business logic components to run in.

    Data tier consists of one or more databases and may containdata related logic in the form of stored procedures.

    An n-tier architecture have the following characteristics:

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    59/117

    Deployment costs are low.

    Database switching costs are low.

    Business logic migration costs are low.

    You can secure parts of your deployment with firewalls.

    Resources can be efficiently pooled and re-used.

    Each tier can vary independently.

    Performance slowdown and errors are localized.

    Maintenance costs are high.

    Types Of Enterprise Java Beans:

    Session Beans

    A session bean represents a single client inside the ApplicationServer. To access an application that is deployed on the server, the clientinvokes the session bean's methods. The session bean performs work forits client, shielding the client from complexity by executing businesstasks inside the server.

    As its name suggests, a session bean is similar to an interactivesession. A session bean is not shared; it can have only one client, in thesame way that an interactive session can have only one user. Like aninteractive session, a session bean is not persistent. (That is, its data isnot saved to a database.) When the client terminates, its session beanappears to terminate and is no longer associated with the client.

    There are two types of session beans: stateless and stateful.

    Stateless Session Beans

    A stateless session bean does not maintain a conversational statefor the client. When a client invokes the method of a stateless bean, the

    bean's instance variables may contain a state, but only for the duration ofthe invocation. When the method is finished, the state is no longerretained. Except during method invocation, all instances of a stateless

    bean are equivalent, allowing the EJB container to assign an instance toany client.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    60/117

    Because stateless session beans can support multiple clients, theycan offer better scalability for applications that require large numbers ofclients. Typically, an application requires fewer stateless session beans

    than stateful session beans to support the same number of clients.

    At times, the EJB container may write a stateful session bean tosecondary storage. However, stateless session beans are never written tosecondary storage. Therefore, stateless beans may offer better

    performance than stateful beans.

    A stateless session bean can implement a Web service, but othertypes of enterprise beans cannot.

    The state of an object consists of the values of its instancevariables. In a stateful session bean, the instance variables represent thestate of a unique client-bean session. Because the client interacts("talks") with its bean, this state is often called the conversational state.

    The state is retained for the duration of the client-bean session. Ifthe client removes the bean or terminates, the session ends and the statedisappears. This transient nature of the state is not a problem, however,

    because when the conversation between the client and the bean ends

    there is no need to retain the state.

    When to Use Session Beans

    In general, you should use a session bean if the followingcircumstances hold:

    At any given time, only one client has access to the bean

    instance. The state of the bean is not persistent, existing only for a

    short period (perhaps a few hours).

    The bean implements a Web service.

    Stateful session beans are appropriate if any of the followingconditions are true:

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    61/117

    The bean's state represents the interaction between the beanand a specific client.

    The bean needs to hold information about the client acrossmethod invocations.

    The bean mediates between the client and the othercomponents of the application, presenting a simplified viewto the client.

    Behind the scenes, the bean manages the work flow of severalenterprise beans. To improve performance, you might choose a statelesssession bean if it has any of these traits:

    The bean's state has no data for a specific client.

    In a single method invocation, the bean performs a generictask for all clients. For example, you might use a statelesssession bean to send an email that confirms an online order.

    The bean fetches from a database a set of read-only data that isoften used by clients. Such a bean, for example, could retrieve the table

    rows that represent the products that are on sale this month.

    Entity Bean

    An entity bean represents a business object in a persistent storagemechanism. Some examples of business objects are customers, orders,and products. In the Application Server, the persistent storagemechanism is a relational database. Typically, each entity bean has an

    underlying table in a relational database, and each instance of the beancorresponds to a row in that table .

    Difference between Entity Beans and Session Beans

    Entity beans differ from session beans in several ways. Entitybeans are persistent, allow shared access, have primary keys, and canparticipate in relationships with other entity beans.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    62/117

    Persistence

    Because the state of an entity bean is saved in a storagemechanism, it is persistent. Persistence means that the entity bean's state

    exists beyond the lifetime of the application or the Application Serverprocess. If you've worked with databases, you're familiar with persistentdata. The data in a database is persistent because it still exists even afteryou shut down the database server or the applications it services.

    There are two types of persistence for entity beans: bean-managed

    and container-managed. With bean-managed persistence, the entity beancode that you write contains the calls that access the database. If your

    bean has container-managed persistence, the EJB container

    automatically generates the necessary database access calls. The codethat you write for the entity bean does not include these calls.

    Shared Access

    Entity beans can be shared by multiple clients. Because the clientsmight want to change the same data, it's important that entity beans workwithin transactions. Typically, the EJB container provides transaction

    management. In this case, you specify the transaction attributes in thebean's deployment descriptor. You do not have to code the transactionboundaries in the bean; the container marks the boundaries for you.

    Primary Key

    Each entity bean has a unique object identifier. A customer entitybean, for example, might be identified by a customer number. Theunique identifier, or primary key, enables the client to locate a particular

    entity bean.

    Relationships

    Like a table in a relational database, an entity bean may be relatedto other entity beans. For example, in a college enrollment application,StudentBean and CourseBean would be related because students enrollin classes.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    63/117

    You implement relationships differently for entity beans withbean-managed persistence than those with container-managedpersistence. With bean-managed persistence, the code that you writeimplements the relationships. But with container-managed persistence,

    the EJB container takes care of the relationships for you. For this reason,relationships in entity beans with container-managed persistence areoften referred to as container-managed relationships.

    The Enterprise Bean Class

    For session beans, an enterprise bean class typically containsbusiness process related logic.

    For entity beans an enterprise bean class typically contains datarelated logic.

    The most basic interface that all bean class must implemet is thejavax.ejb.EnterpriseBean interface.

    The EJB Object

    When a client wants to use an instance of an enterprise bean class,the client never invokes the method directly on an actual bean instance.Rather the invocation is intercepted by the EJB Container and thendelegated to the bean instance. Thus , the EJB container is acting as alayer of indirection between the client code and the bean. This layer ofindirection manifests itself as a single network-aware object called theEJB OBJECT.

    The Remote Interface

    Bean clients invoke methods on EJB Objects rather than the beanthemselves. To perform this, EJB object must clone every businessmethod that the bean class expose. A special interface is created thatduplicates all the business logic methods that the corresponding classexposes. This interface is called the remore interface.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    64/117

    The Home Object

    The client cannot instantiate an EJB Object directly as it might beon a different machine.To acquire a reference to an EJB Object, the

    client code asks for an EJB Object from an EJB Object factory. Thisfactory is responsible for instantiating EJB Objects. The EJBspecification calls such a factory a home object.

    The Home Interface

    Home interfaces simply define methods for creating, destroyingand finding EJB Objects. The required methods are defined in the

    javax.ejb.EJBHome interfaceThe Deployment Descriptor

    Specifies the middleware requirements of the bean. One uses thedeployment descriptor to inform the container about how to manage the

    bean, the beans life-cycle needs, the transactional neeeds etc.

    The Ejb-jar file

    This is the last step before deploying the bean.This is a compressed file that contains everything we have writtenabove:

    Enterprise Beans

    Remote Interface

    Home Interface

    Deployment Descriptor

    The Life Cycle of Enterprise Bean

    An enterprise bean goes through various stages during its lifetime,or life cycle. Each type of enterprise beansession or entity, has a

    different life cycle.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    65/117

    The Life Cycle of a Stateful Session Bean

    Figure 1 illustrates the stages that a session bean passes through

    during its lifetime. The client initiates the life cycle by invoking thecreate method. The EJB container instantiates the bean and then invokesthe setSessionContext and ejbCreate methods in the session bean. The

    bean is now ready to have its business methods invoked.

    Figure 1 Life Cycle of a Stateful Session Bean

    While in the ready stage, the EJB container may decide todeactivate, or passivate, the bean by moving it from memory tosecondary storage. (Typically, the EJB container uses a least-recently-used algorithm to select a bean for passivation.) The EJB containerinvokes the bean's ejbPassivate method immediately before passivatingit. If a client invokes a business method on the bean while it is in the

    passive stage, the EJB container activates the bean, calls the bean'sejbActivate method, and then moves it to the ready stage.

    At the end of the life cycle, the client invokes the remove method,and the EJB container calls the bean's ejbRemove method. The bean'sinstance is ready for garbage collection.

    The Life Cycle of a Stateless Session Bean

    Because a stateless session bean is never passivated, its life cyclehas only two stages: nonexistent and ready for the invocation of business

    methods.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    66/117

    Figure 2 Life Cycle of a Stateless Session Bean

    The Life Cycle of an Entity Bean

    Figure 3 shows the stages that an entity bean passes throughduring its lifetime. After the EJB container creates the instance, it callsthe setEntityContext method of the entity bean class. The

    setEntityContext method passes the entity context to the bean.

    After instantiation, the entity bean moves to a pool of availableinstances. While in the pooled stage, the instance is not associated withany particular EJB object identity. All instances in the pool are identical.The EJB container assigns an identity to an instance when moving it tothe ready stage.

    There are two paths from the pooled stage to the ready stage. On

    the first path, the client invokes the create method, causing the EJBcontainer to call the ejbCreate and ejbPostCreate methods. On thesecond path, the EJB container invokes the ejbActivate method. Whilean entity bean is in the ready stage, an it's business methods can beinvoked.

    There are also two paths from the ready stage to the pooled stage.First, a client can invoke the remove method, which causes the EJBcontainer to call the ejbRemove method. Second, the EJB container can

    invoke the ejbPassivate method.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    67/117

    Figure 3 Life Cycle of an Entity Bean

    At the end of the life cycle, the EJB container removes theinstance from the pool and invokes the unsetEntityContext method.

    In the pooled state, an instance is not associated with anyparticular EJB object identity. With bean-managed persistence, when the

    EJB container moves an instance from the pooled state to the ready state,it does not automatically set the primary key. Therefore, the ejbCreateand ejbActivate methods must assign a value to the primary key. If the

    primary key is incorrect, the ejbLoad and ejbStore methods cannotsynchronize the instance variables with the database.

    In the pooled state, the values of the instance variables arenot needed. You can make these instance variables eligible for garbagecollection by setting them to null in the ejbPassivate method.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    68/117

    Description of Files Included with Entity Beans

    The entity bean class

    It is the java class that models persistent data. It maps to anentity definition in a database schema. For example, an entity bean classcould map to a relational table definition. In this case, an entity beaninstance of that class would map to a row in that table. EJB requires thatan entity bean class must fulfil some standard callback methods.

    The entity beanss remote interface

    It is the interface to your bean on which clients invoke. In it

    you place each of your entity beans business method signatures.

    The entity beans home interface

    It is the interface clients use to create, find, and destroyentity bean EJB objects. This home object is the factory for your EJBobjects. To find the home object, client must perform a JNDI lookup.

    The entity beans primary key class

    It is a unique identifier for youe entity bean. A primary keyis an object that may contain any number of attributes. This could bewhat ever data necessary to uniquely identify entity bean data instance.The one rule is that your primary key class must be serializable andfollow the rules for Java object serialization.

    The entity beans deployment descriptor

    It contains a list of properties that should be used by thecontainer on deployment. Deployment descriptors inform containerabout your bean.

    The entity beans environment properties

    It allows end user to customize your entity bean ondeployment. Environment properties are optional.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    69/117

    Developing and Using Entity Beans

    To write an entity bean class, your class must implementthe javax.ejb.EntityBean interface. This interface defines a number of

    required methods that your entity bean class must implement. Most ofthese methods are management methods that are called by your EJBcontainer.

    ejbCreate() : Session beans require ejbCreate() methods, but theyare optional for entities. You do define ejbCreate() method if you wantto provide a way to create some underlying data through EJB. EJB doesallow for you to create data indirectly, via direct database inserts orlegacy systems. Thus ejbCreate() is optional.

    The parameters to ejbCreate() can vary. This allows for multipleways to initialize an entity bean instance and thus allows different waysto create entity bean data in a database.

    You must duplicate your ejbCreate() methods in your homeinterface. In EJB, clients do not directly invoke on beans, they invoke anEJB object proxy. The EJB object is generated through home object.

    ejbFind() : It is used to find an existing entity bean in storage.Finder methods do not create any new database data, they simply loadsome old entity bean data.

    The parameters to ejbCreate() can vary. This allows for multiple

    ways to find database data. All finder methods must begin with ejbFind.You must have at least one finder method, called ejbFindByPrimaryKey.A finder method must return either the primary key for the entity bean itfinds or an enumeration of primary keys if it finds more than one.

    You must duplicate your ejbCreate() methods in your homeinterface. In EJB, clients do not directly invoke on beans, they invoke anEJB object proxy. The EJB object is generated through home object.

    ejbPassivate() : If too many beans are instantiated, the EJBcontainer can passivate some of them, which mean writing the beans totemporay storage such as a database or file system. The container canthen release the resources the beans had claimed.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    70/117

    ejbActivate(): When a client needs to see a bean that has beanpassivated, the reverse process automatically occurs. The container kicksthe bean back into memory, or activates the bean. Any releasedresources during ejbPassivate() are allocated again to bean.

    ejbRemove(): Whenever container is about to remove your beaninstance, it calls your beans ejbRemove() callback method. It is a clean-up method alerting your bean that it is about to be destroyed andallowing it to end its life gracefully. It is required method of all beans,and it takes no parameters. Therefore there is only one ejbRemove()method per bean.

    Business methods: In addition to required callback methods, youmay require one or more business methods in your bean. These methodsactually solve business specific problems. For clients to call your

    business methods, you must list your business methods in your beansremote interface.

    Primary Keys

    Entity Beans define an object called the primary key. Itssole purpose is to identify uniquely each entity bean within the system.The primary is a serializable java object, and maybe any of the primitivewrapper objects such as java.lang.Integer, java.lang.String. Using andexisting java class is an effective way to minimize efforts on the primarykey.

    EJB developers may create their own class to identify anentity bean. This can be especially useful in compound primary keys,where more than one persistent field is used to identify the entity bean.

  • 7/28/2019 Credit Management System (LEADING INDIAN BANK) (Java-Oracle9i)

    71/117

    4.3.5 Oracle 9i

    Database is a coherent collection of data with some inherentmeaning, designed, built and populated with data for a specific purpose.A database stores data that is useful to us. This data is only part of entiredata available in the world around us.

    To be able to successfully design and maintain databaseswe have to do following:

    1) Identify which specific objects in the world are of interest to us:

    These objects are called Entities in the Entity-Relationship Model(ER Model).

    2) Identify which type of data is required to describe those objects:These properties of objects are called Attributes of the Entity.

    3) Identify relationship between the objects: This relationship definesthe linkage between Entities, thus forming complete ER Model.

    Hence database is storage designed, built and populatedwith data for objects, their attributes and the relationship between themthat are of interest to us.

    Oracle As RDBMS

    Oracle product is based on Client-Server technology and is thusprimarily divided into:

    Oracle Server Tools

    Oracle Client Tools

    Oracle Server:

    Oracle is a company that produces the most widely used,Server based, Multi user Relational Database Management System(RDBMS). The Oracle Server is a pro