Library Management

This is a web application used by librarians to handle typical operations in a library.

Technologies and Products used

The following are the steps to related to be taken to run the existing part of the application :

  1. Create lm account with password lm in Oracle10g Express Edition. This must be done by after you log in as SYSTEM user.
          create user lm identified by lm;
          grant connect,resource to lm;
        
  2. Create required tables in lm account by using commands in tables.sql file of lm.zip.
  3. Download lm.zip and unzip it into d:\lm directory. You can substitue d:\ with another path if you like.
  4. Download library.zip and unzip it into d:\library directory. You can substitue d:\ with another path if you like.
  5. Start NetBeans 5.0
  6. Add JBOSS Server with NetBeans using Tools->Server Manager
  7. Copy ojdbc14.jar into JBOSS_HOME\server\default\lib directory.
  8. Configure Oracle-ds.xml in default\deploydirectory to add another local-tx-datasource entry as follows:
      <local-tx-datasource>
          <jndi-name>LibraryDS</jndi-name>
          <connection-url>jdbc:oracle:thin:@localhost:1521:XE</connection-url>
          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
          <user-name>lm</user-name>
          <password>lm</password>
          <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
            <metadata>
               <type-mapping>Oracle9i</type-mapping>
            </metadata>
      </local-tx-datasource>
    
  9. Open library project in NetBeans using File->Open Project option.
  10. Build library project.
  11. Copy library.jar of dist directory to server\default\deploy of JBoss.
  12. Start JBOSS 4.x
  13. Open lm project in NetBeans using File->Open Project option.
  14. Add Oracle Library - ojdbc14.jar, Library Bean jar file - library.jar and JOBSS_HOME\client\jbossall-client.jar to this project.
  15. Build and deploy the project to embeded Tomcat of NetBeans.
  16. Run this project - you must see index.jsp page.

Deploying Web Application In Tomcat of JBoss

The following procedure explains how to deploy a web application lm, developed with Tomcat that is embeded with NetBeans to Tomcat embeded in JBOSS application server.
  1. You better change port number at which Tomcat in JBoss is running using JBOSS_HOME\server\default\deploy\jbossweb-tomcat55.sar\server.xml file. Change port number of HTTP Container from 8080 to 9999.
    This is required as Oracle10g also uses 8080.
  2. Copy lm.war from dist directory of lm project into JBOSS_HOME\server\default\deploy directory.
  3. Run the application using the following url:
       http://localhost:9999/lm
     
  4. You should see login page of the application.