Vous êtes sur la page 1sur 84

Digital Library System

Abstract :
This project is aimed at developing an Digital Library System (DLS) forThe college library. This project is developing a Digital Library System (DLS) for the college library. This is an Intranet based application that can be accessed throughout the campus. This system can be used to search for books/magazines, reserve books, find out who is having a particular book etc. This is one integrated system that contains both the user component and the librarian component. There are features like notifications, report generators etc in this system

1. INTRODUCTION

This system can be used to search for books/magazines, reserve books, find out who is having a particular book etc. In the existing system the person must go to library and he has to search everything and find the book from that he can register the book .So it is a time waste prosess.If we want no of books we have to go every time to the library.

There are registered people in the system. The people can see the status of the books and the respective due dates and other relevant details, reserve a particular book ,cancel the reservation made earlier for a particular book As soon as a reservation is made for a particular book, an automatic mail should be sent to the person who made the reservation about the details.

2.SYSTEM ANALYSIS

2.1

EXISTING SYSTEM:

In the existing system the person must go to library and he has to search everything and find the book from that he can register the book .So it is a time waste prosess.If we want no of books we have to go every time to the library.

2.2

PROPOSED SYSTEM:

There are registered people in the system. The people can see the status of the books and the respective due dates and other relevant details, reserve a particular book ,cancel the reservation made earlier for a particular book As soon as a reservation is made for a particular book.

3. PROBLEM FORMULATION

3.1 HARDWARE SPECIFICATION

Processor MHz. Ram Hard Disk Input device Mouse. Output device Monitor.

: Any Processor above 500

: 128MB. : 10 GB. : Standard Keyboard and

: VGA and High Resolution

3.2 SOFTWARE SPECIFICATION

Operating System Server Side Client Side Services Database

: Windows NT/2000 : JSP with Tomcat Server : HTML ,JavaScript : JDBC : oracle10g

4.3 Environment of Software WHAT IS JAVA?

Java ha two things: a programming language and a platform. Java is a high-level programming language that is all of the following

Simple Object-oriented Distributed Interpreted Robust Secure

Architecture-neutral Portable High-performance multithreaded Dynamic

Java is also unusual in that each Java program is both compiled and interpreted. With a compile you translate a Java program into an intermediate language called Java byte codes the platformindependent code instruction is passed and run on the computer.

Compilation happens just once; interpretation occurs each time the program is executed. The figure illustrates how this works.

Java Program

Interpreter

Compilers

My Program

You can think of Java byte codes as the machine code instructions for the Java Virtual Machine (Java VM). Every Java interpreter, whether its a Java development tool or a Web browser that can run Java applets, is an implementation of the Java VM. The Java VM can also be implemented in hardware.

Java byte codes help make write once, run anywhere possible. You can compile your Java program into byte codes on my platform that has a Java compiler. The byte codes can then be run any implementation of the Java VM. For example, the same Java program can run Windows NT, Solaris, and Macintosh.

JAVA PLATFORM

A platform is the hardware of software environment in which a program runs. The Java platform differs from most other platforms in that its a software only platform that runs on the top of other, hardware-based platform. Most other platforms are described as a combination of hardware and operating system.

The Java platform has two components:

The Java Virtual Machine (Java VM)

The Java Application Programming Interface (Java API)

Youve already been introduced to the Java VM. Its the base for the Java platform and is ported onto various hardwarebased platforms. The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets. The Java API is grouped into libraries (package) of related components. The next sections, what can Java do?

Highlights each area of functionally provided by the package in the Java API. The following figure depicts a Java program, such as an application or applet, thats running on the Java platform. A special kind of application known as a server serves and supports clients on a network. Examples of the servers include Web Servers, proxy servers, mail servers, print servers, and boot servers. Another specialized program is a Servlet. Servlets are similar to applets in that they are runtime extensions of the application. Instead of working in browsers, though, servlets run with in Java Web Servers, configuring of tailoring the server. How does the Java API support all of these kinds of programs? With packages of software components that provide a wide range of functionality. The API is the API included in every full implementation of the platform. The Essentials: Objects, Strings, threads, numbers, input and output, data structures, system properties, date and time, and so on.Applets: The set of conventions used by Java applets.Networking: URLs TCP and UDP sockets and IP addresses.

Internationalization: Help for writing programs that can be localized for users.Worldwide programs can automatically adapt to specific locates and be displayed in the appropriate language.

JAVA PROGRAM
Java API Java Virtual Machine Java Program Hard Ware API and Virtual Machine insulates the Java program from hardware dependencies. As a platform-independent environment, Java can be a bit slower than native code. However, smart compilers, well-tuned interpreters, and Just-in-time-byte-code compilers can bring Javas performance close to the native code without threatening portability.

WHAT CAN JAVA DO?


However, Java is not just for writing cut, entertaining applets for the World Wide Web (WWW). Java is a general purpose, high-level programming language and a powerful software platform. Using the fineries Java API, you can write many types of programs.

The most common types of program are probably applets and application, where a Java application is a standalone program that runs directly on the Java platform.

The J2EE Platform


The J2EE platform is first of all a specification of an n-tier distributed application environment. The J2EE specification contains all the APIs and full descriptions of all the runtime components and services a J2EE application can use. Perhaps the most important feature of the specification is the clear distiction between the APIs that together form an application programming model for J2EE applications and the server side runtime environment formed by the components and services.

The J2EE APIs


The following APIs are defined for the J2EE platform. For the exact version of the API in question please look at the specification itself. The APIs can be divided into four types of technologies, according to use. For completeness we also included some technologies that are actually J2SE

technologies, but as the J2EE platform heavily depends on or even extends these technologies they are mentioned here.

Component technologies

The component technologies are the technologies that application developer will actual extend and implement. It is the component technlogies that implement the presentation, application and business logic layers.

Java Servlets

The Java Servlets provides object oriented abstractions for building dynamic web applications. Servlets are server side components that are a platform independent high performance replacement for CGI. Like CGI, Servlets dynamically generate HTML as a result of a HTTP request.

Java Server Pages (JSP)


The Java Server Pages are an extension of the Servlet API that simplifies the generation of dynamic web pages by providing template driven web application development. It uses XML/HTML-like tags and Java

script to encapsulate the logic required to generate pages in a platform independent way. Enterprise

JavaBeans (EJB)

Enterprise JavaBeans are a distributed component based framework. It provides a standard means of defining server-side components, and specifies a run-time environment for hosting the components on the server side. There are 3 main types of EJBs: session beans, entity beans and message driven beans.

Service technologies

The services technologies provide a technical infrastructure the application components can use. As such, they are supportive technologies and most of the application developers will only use these technologies and not extend or implement them.

JDBC

JDBC provides platform and vendor independent access to SQL compliant databases. Basic JDBC (version 2.0) is J2SE.

The J2EE platform requires, besides the basic APIs, also the JDBC 2.0 Optional Package. JDBC allows transactional querying, retrieval and manipulation of data in a JDBC compliant database. JDBC compliant databases provide either native JDBC drivers or you can use a ODBC-to-JDBC bridge. This means that almost every relational database available can be used on the J2EE platform.

Java Message Service (JMS)

JMS provides a Java API for message queuing, and publish and subscribe types of message oriented middleware (MOM). This API is to used if applications in a distributed environment are not able to be connected all the time and the handling of the communication shpould be asynchronous.

Java Transaction API (JTA)

This API is for distributed transaction management. It contains three parts: 1. A high level application interface that allows transactional applications to begin, commit and commit transactions.

2. A Java mapping of the X\Open XA protocol which is an industry standard that allows a transactional resource manager to participate in a global transaction controlled by an external transaction manager. 3. A high level transaction manager interface that allows an application server to control transaction boundary demarcation for an applciation being managed by the application server.

Java Mail

This API provides a platform independent and protocol independent framework to build Java based email applications. Although platform independent, JavaMail depends on an underlying email server like Send mail or MS Exchange Server for the actual sending of an email. It uses IMAP4, POP3 and SMTP as it's underlying transport mechanisms.

JavaBeans Activation Framework (JAF)

The JavaBeans Activation Framework is required for JavaMail. JavaMail uses JAF to determine the contents of a MIME message and what appropriate actions can be done accordingly.

Java Authentication an Authorization Service (JAAS)

JAAS provides authentication and authorization mechanisms to J2EE applications using concepts like users, realms and groups. JAAS relies on underlying implementations of other authenticating and authorization services like Kerberos through the PAM framework. It can be used to grant permission to execute code based on which user is trying to run the code.

Java Naming and Directory Interface API (JNDI)

JNDI standardizes access to different types of naming services. The API is designed to be independent of any specific naming or directory service implemntation. J2SE also specifies a JNDI service provider interface (SPI) for naming and directory service providers to implement. JNDI is not a J2EE API but a J2SE API. The use of JNDI is twofold. Firstly, it provides an interface to provide access to directory service resources like LDAP or NDS. Secondly, it

is used by a J2EE application to lookup interfaces used to create e.g. EJBs and JDBC connections.

Integration technologies

The integration technologies help the application developer to integrate the J2EE platform with other platform that may exist in the enterprise.

Java API for XML (JAXP)

This API provides abstractions for XML parsers and transformation APIs. JAXP helps to isolate specific XML parsers, or XML Document Object Model (DOM) implementations, or XSTLT transformation APIs from J2EE application code.

Java Connector Architecture (JCA)

JCA provides a means to integrate J2EE application components to legacy information systems. The JCA specifies a simple architecture that results in components that an application developer can use to access a legacy appplication, typically ERP systems as SAP or Baan,

without needing to know much specific about how to work with it.

Java Interface Definition Language API (IDL)

IDL allows J2EE application components to communicate with CORBA objects through IIOP (see below). These CORBA objects do not need to written in Java but than be written in every language for which there is a CORBA language binding (e.g. C, C++, COBOL).

Communication technologies
These technologies are mostly transparent for the applciation developer but they are invaluable for any distributed application

RMI-IIOP API

This API provides an implementation of RMI over IIOP. This bridges the gap between RMI and CORBA applications. This is the standard communication protocol to be used between J2EE containers. RMI over IIOP allows the

application developer to define a remote interface to any remote object that can be implemented in every language for which there is a CORBA language binding (e.g. C, C++, COBOL).

The J2EE architecture Containers


The J2EE architecture is a multi-tiered architecture. Depending on the type of client it is 3-tier or 4-tier architecture. Besides the division of the logical layer into 3 or 4 physical layers, it also specifies the technical infrastructure which must be present in a specific layer. The tier together with the corresponding technical infrastructure is called a "container". A J2EE container is a runtime to manage application components developed according to the API specifications, and to provide access to the J2EE APIs. It provides life cycle management, security, deployment and runtime services to its contained (hence container) application components.

The concept of containers is the most important feature of the J2EE platform. It separates the technical infrastructure (the containers) from the J2EE application. This separation,

which is achieved through the specification of the J2EE platform, has some interesting consequences.

First, you only have to develop or buy the infrastructure software once and reuse it for all J2EE applications you develop. In fact, because the infrastructure is defined in the J2EE platform, all implementations of the infrastructure behave the same and therefore they are interchangeable. This means that there is no vendor lock-in, which, in practice, is very handy, because still, some implementations are created more equal than others (sorry George).

Second, because the containers provide all the infrastructural plumbing, the application developer can concentrate on the important part of his work, the actual J2EE application. When the application component is ready it will be deployed in the container. In the figure below the containers and the division of the logical client/server layers over the physical client/server layers are depicted. The architecture shows 4 containers:

An application client container for hosting standard Java client applications.

An applet container for hosting Java applets. A web container for hosting Servlets and JSP pages. An EJB container for hosting Enterprise JavaBeans.

5. SYSTEM DESIGN

5.1 DATA FLOW DIAGRAM

The data flow diagrams are very helpful in determining the flow of data in an application.

5.2 SYSTEM DESIGN OVERVIEW:

Design involves identification of classes, their relationships as well as their collaboration. In objectory, classes are divided into entity classes, interface classes and control classes. The Computer Aided Software Engineering (CASE) tools that are available commercially do not provide any assistance in this transition. CASE tools take advantage of meta modeling that are helpful only after the construction of the class diagram. In the Fusion method, some objectoriented approaches like Object Modeling Technique(OMT), Classes, Responsibilities, Collaborators(CRC),etc, are used. Objectory used the term agents to represent some of the hardware and software systems .In Fusion method, there is no requirement phase, where a user will supply the initial requirement document. Any software project is worked out by both the analyst and the designer. The analyst creates the use case diagram. The designer creates the class diagram. But the designer can do this only after the analyst creates the use case diagram. Once the design is over, it is

essential to decide which software is suitable for the application.

System Architecture:

In general, architecture is a set of rules that defines a unified and coherent structure consisting of constituent parts and connections that establish how those parts fit and work together. Architecture may be conceptualized from a specific perspective focusing on an aspect or view of its subject. These architectural perspectives themselves can become components in a higherlevel architecture serving to integrate and unify them into a higherlevel structure. The architecture must define the rules, guidelines, or constraints for creating conformant implementations of the system. While this architecture does not specify the details on any implementation, it does establish guidelines that must be observed in making implementation choices. These conditions are particularly important for component architectures that embody extensibility features to allow additional capabilities to be added to previously specified parts. [2] This is the case where Data Management is the initial deployment activity followed by more complex system components.

By adopting a system architecture motivation as the basis for the IT Strategy, several benefits result: Business processes are streamlined a fundamental benefit to building enterprise information architecture is the discovery and elimination of redundancy in the business processes themselves. In effect, it can drive the reengineering the business

processes it is designed to support. This occurs during the construction of the information architecture. By revealing the different organizational views of the same processes and data, any redundancies can be documented and dealt with. The fundamental approach to building the information architecture is to focus on data, process and their interaction. Systems information complexity is reduced the architectural framework reduces information system complexity by identifying and eliminating redundancy in data and software. The resulting enterprise information architecture will have significantly fewer applications and databases as well as a resulting reduction in intersystem links. This simplification also leads to significantly reduced costs. Some of those recovered costs can and should be reinvested into further information system improvements.

5.3 USECASE DIAGRAM:-

Use Case diagrams are formally included in two modeling languages defined by the OMG. Both the UML and SysML standards define a graphical notation for modeling use cases with diagrams. One complaint about the standards has been that they do not define a format for describing these use cases. Generally, both graphical notation and descriptions are important as they document the use case, showing the purpose for which an actor uses a system.

The use case diagram show the position or context of the use case among other use cases. As an organizing mechanism, a set of consistent, coherent use cases promotes a useful picture of system behavior, a common understanding between the customer/owner/user and the development team. This diagram describes the functionality of a simple Restaurant System. Use cases are represented by ovals and the actors are represented by stick figures. The Patron actor can Eat Food, Pay for Food, or Drink Wine. Only the Chef actor can Prepare Food. Note that both the Patron and the Cashier are involved in the Pay for Food use case. The box defines the boundaries of the Restaurant System, i.e., the use cases shown are part of the system being modeled, the actors are not.

SYSTEM USECASE DIAGAM:

ORGONIZATION USECASE DIAGRAM:-

CUSTOMER USECASE DIAGRAM:-

5.4 CLASS DIAGRAM:-

A class diagram is similar to a family tree. A class diagram consists of a group of classes and interfaces reflecting important entities of the business domain of the system being modeled, and the relationships between these classes and interfaces. The classes and interfaces in the diagram represent the members of a family tree and the relationships between the classes are analogous to relationships between members in a family tree. Interestingly, classes in a class diagram are interconnected in a hierarchical fashion, like a set of parent classes (the grand patriarch or matriarch of the

family, as the case may be) and related child classes under the parent classes. Similarly, a software application is comprised of classes and a diagram depicting the relationship between each of these classes would be the class diagram.

By definition, a class diagram is a diagram showing a collection of classes and interfaces, along with the collaborations and relationships among classes and interfaces.

5.4 SEQUENCE DIAGRAM:-

The sequence diagram is used primarily to show the interactions between objects in the sequential order that those interactions occur. Much like the class diagram, developers typically think sequence diagrams were meant exclusively for them.

However, an organization's business staff can find sequence diagrams useful to communicate how the business currently works by showing how various business objects interact. Besides documenting an organization's current affairs, a business-level sequence diagram can be used as a requirements document to communicate requirements for a future system implementation. During the requirements phase of a project, analysts can take use cases to the next level by providing a more formal level of refinement. When that occurs, use cases are often refined into one or more sequence diagrams.

6. SYSTEM TESTING

The purpose of testing is to discover errors. Testing is the process of trying to discover every conceivable fault or weakness in a work product. It provides a way to check the functionality of components, sub assemblies, assemblies and/or a finished product It is the process of exercising software with the intent of ensuring that the Software system meets its requirements and user expectations and does not fail in an unacceptable manner. There are various types of test. Each test type addresses a specific testing requirement.

TYPES OF TESTS Unit testing


Unit testing involves the design of test cases that validate that the internal program logic is functioning properly, and that program input produce valid outputs. All decision branches and internal code flow should be validated. It is the testing of individual software units of the application .it is done after the completion of an individual unit before integration.

This is a structural testing, that relies on knowledge of its construction and is invasive. Unit tests perform basic tests at component level and test a specific business process, application, and/or system configuration. Unit tests ensure that each unique path of a business process performs accurately to the documented specifications and contains clearly defined inputs and expected results.

Integration testing

Integration tests are designed to test integrated software components to determine if they actually run as one program. Testing is event driven and is more concerned with the basic outcome of screens or fields. Integration tests demonstrate that although the components were individually satisfaction, as shown by successfully unit testing, the combination of components is correct and consistent. Integration testing is specifically aimed at exposing the problems that arise from the combination of components.

Functional test
Functional tests provide a systematic demonstrations that functions tested are available as specified by the business and technical requirements, system documentation , and user manuals. Functional testing is centered on the following items: Valid Input be accepted. Invalid Input be rejected. Functions Output must be exercised. Systems/Procedures : interfacing systems or procedures must be invoked. : identified functions must be exercised. : identified classes of application outputs : identified classes of invalid input must : identified classes of valid input must

Organization and preparation of functional tests is focused on requirements, key functions, or special test cases. In addition, systematic coverage pertaining to identify Business process flows; data fields, predefined processes, and successive processes must be considered for testing.

Before functional testing is complete, additional tests are identified and the effective value of current tests is determined.

System Test
System testing ensures that the entire integrated software system meets requirements. It tests a configuration to ensure known and predictable results. An example of system testing is the configuration oriented system integration test. System testing is based on process descriptions and flows, emphasizing pre-driven process links and integration points.

White Box Testing


White Box Testing is a testing in which in which the software tester has knowledge of the inner workings, structure and language of the software, or at least its purpose. It is purpose. It is used to test areas that cannot be reached from a black box level .

Black Box Testing

Black Box Testing is testing the software without any knowledge of the inner workings, structure or language of the module being tested . Black box tests, as most other kinds of tests, must be written from a definitive source document, such as specification or requirements document, such as specification or requirements document. It is a testing in which the software under test is treated, as a black box .you cannot see into it. The test provides inputs and responds to outputs without considering how the software works.

6.1 Unit Testing:

Unit testing is usually conducted as part of a combined code and unit test phase of the software lifecycle, although it is not uncommon for coding and unit testing to be conducted as two distinct phases.

Test strategy and approach


Field testing will be performed manually and functional tests will be written in detail.

Test objectives
All field entries must work properly.

Pages must be activated from the identified link. The entry screen, messages and responses must not be delayed.

Features to be tested

Verify that the entries are of the correct format No duplicate entries should be allowed
All links should take the user to the correct page.

6.2 Integration Testing


Software integration testing is the incremental integration testing of two or more integrated software components on a single platform to produce failures caused by interface defects. The task of the integration test is to check that components or software applications, e.g. components in a software system or one step up software applications at the company level interact without error.

Integration testing for Database Synchronization:

Testing the links that call the Change Username & password, Migration and Synchronization screens etc. The username should be retained throughout the application in the form of hidden variables or by using cookies. If the login user does not have enough privileges to invoke a screen, the link should be disabled. Any modification in the Master server should be reflected in the Slave server. The XML file should retrieve only the records, which have been modified.

Test Results: All the test cases mentioned above passed successfully. No defects encountered.

6.3 Acceptance Testing


User Acceptance Testing is a critical phase of any project and requires significant participation by the end user.

It also ensures that the system meets the functional requirements.

Acceptance testing for Data Synchronization:

Users have separate roles to modify the database tables. The timestamp for all insertions and updating should be maintained. Users should have the ability to modify the privilege for a screen. Once the Synchronization starts, the Master server or Slave Server should not be stopped without notifying the other. The XML file should be generated in short time, i.e., before the next modification occurs. Test Results: All the test cases mentioned above passed successfully. No defects encountered.

IMPLEMENTATION AND DISCUSSION

There are registered people in the system. The people can see the status of the books and the respective due dates and other relevant details, reserve a particular book ,cancel the reservation made earlier for a particular book As soon as a reservation is made for a particular book, an automatic mail should be sent to the person who made the reservation about the details. Here First Students are registered and in that they r login.Here We assign Id to Each Student.In that we add the student details,Here admin maintain the all previlizes.He can add,edit,delete perform all those things. All Books are available in the library system.We have Choose particular books n write in the particular library book.

MODULES:

In this we have 3 modules

Authentication Module Admin Module User Module

Authentication: Authentications provided to two types of users that approach the system .They are the Admin user.

Administrator:

He will perform such activities relating to Books .He can adds the books details and he can update books information .He can send mail to the user when user registered the books. User: The people can see the status of the books and the respective due dates and other relevant details, reserve a particular book, and cancel the reservation made earlier for a particular book..

IMPLEMENTATION

User Training
After the system is implemented successfully, training of the user is one of the most important subtasks of the developer. For this purpose user manuals are prepared and handled over to the user to operate the developed system.

Thus the users are trained to operate the developed systems successfully in future .In order to put new application system into use, the following activities were taken care of:

Preparation of user and system documentation Conducting user training with demo and hands on Test run for some period to ensure smooth switching over the system.

The users are trained to use the newly developed functions. User manuals describing the procedures for using the functions listed on menu and circulated to all the users .it is confirmed that the system is implemented up to user need and expectations.

Performance:

Database connection is through a connection pool mechanism. Database Connections are being created as and when required, instead they are retrieved from a pool of connections. This way the transactions are faster in execution.

Java standard API objects are used wherever possible to hold data.

The second database acts as a backup server to improve performance and survive database crashes.

Security:
Application level security using user id and password. Secured Socket Layer. All passwords are kept encrypted as objects in a file. Failure of one database does not affect the data in the other database.

8. CONCLUSION:

This project is developing an Digital Library System (DMS) for the college library.In that All books are presenet in the LibraarySystem.we choose. This system can be used to search for books/magazines, reserve books, find out who is having a particular book etc.

Output Screens:-

Login Details Of Admin

RegisteredBooks:

Addition Of New Books:

List Of All Books Based On The Condition:

List Of Books Available Based On The Author:

List Of Books Available Based On The Author:

List Of Books Available Based On The Author:

List Of Books Available Based On The Title:

List Of Books Available Based On The Title:

Deletion Of Books:

Issues Books Of Library System:

Digital Library Management System:

List Of All Books:

List Of All Books In Library:

List Of All Students In the Library:

List Of Issues Books:

List Of Reserved Books:

List Of ReNewAld Books:

Book Issue N Reserve Details:

Registration details of Books:

Registration Details Of Digital Library:

Book Renewal Screen Of Library Management:

Book Reservation Details Of Library Management:

Return Book Screen Of Library Management:

Signin Form Of Library Management System:

Student Menu Details Of Library Management:

Update Screen Of Books:

View Inventory Details Of Library Management:

Partial Code:package com.Touri;

import java.io.*;

import java.util.Calendar; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession;

public class AddProduct extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String sub_button = request.getParameter("Submit");

if(sub_button.equalsIgnoreCase("Submit") ) { String image_url = request.getParameter("inputImage");

String Product_type = request.getParameter("product_type"); String product_dis = request.getParameter("product_dis");

String ss = request.getRealPath(request.getServletP ath()); String surl = ss.substring(0,ss.length()-11);

String out = new AdminControler().setProduct(image_url,Pr oduct_type,product_dis,surl);

if(out.equalsIgnoreCase("success")) { RequestDispatcher rd = getServletContext().getRequestDispatche r("/Upgetdet.jsp");

rd.forward(request,response); } else { RequestDispatcher rd = getServletContext().getRequestDispatche r("/Uploadimages.jsp"); rd.forward(request,response); }

/** * */ package com.Touri; import java.sql.Connection;

import java.sql.SQLException;

public class ConnectionPool {

public ConnectionPool() { super(); } private static Connection con=null; public static Connection getConnection() { try {

Class.forName("oracle.jdbc.driver.OracleD river"); con = java.sql.DriverManager.getConnection("jd bc:oracle:thin:@localhost:1521:XE","Touri sam","Tourisam"); if (con != null) {

System.out.println("Connection Pool Database Connection Success"); } } catch(final ClassNotFoundException cfe) {

}catch(final SQLException se) { System.out.println(se.getMessage()); } return con; } }

9. BIBLIOGRAPHY

Good Teachers are worth more than thousand books, we have them in Our Department

References Made From : Herbert Schildt, Java 2 - The Complete Reference, IV th Edition

JavaAPI http://java.sun.com

Sites Referred: http://java.sun.com www.beta.ece.ucsb.edu www.ietf.org

www.ecst.csuchoco.edu

Vous aimerez peut-être aussi