View source | View content page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Show collection (0 pages)
Collections help

Search

Projects:JNDI Service/Functional Specifications

Contents

JNDI Service - Functional Specifications

Overview

Purpose

Be able to configure the connection to the database using JNDI. JNDI works in concert with other technologies in the Java Platform, Enterprise Edition (Java EE) to organize and locate components in a distributed computing environment. The definition of the database connection is stored in the application server's configuration file. This allows us to deploy our application in the client server in an easy way, just because we have to change only the configuration xml file of the server. This means that the war file will not need to be updated.

Problems

The code must connect in different way if is in compilation time or if needs to connect in run time. In Run time should get the connection using the JNDI service.

Solution

Implement a JNDI service in the Tomcat server and implement a new class in the core named JNDIConnectionProvider. The main class HTTPBaseServlet (needs connection only in run time) should instantiate this class to get the connection and the class CPStandAlone that works in compilation time should use the class ConnectionProviderImpl that get the connection information for the ERP/2.40/Openbravo.properties file.

Scope

This project will only add a Java class and will modify the classes that provides Openbravo ERP a database connection, also its needed to add some information to the Openbravo.properties. Information about the JNDI resource name in the server. No existing functionality of Openbravo ERP will be modified.

Design considerations

The Openbravo ERP core project gets the information to configure the database connection through the file named openbravo.properties, this file is a simple properties type file and the user must write there the data where the database is placed. Using a JNDI service to get the connection we will not need to use this properties file and we only need to change the config file of the application server. The build process of the application uses ant and this process need to connect with the database and to do it uses the openbravo properties file. The JNDI service is a Java API and we are able to get the service through a Java class but not using an ant script. So this may be a

Glossary

Functional Requirements

Business process definition

To get a connection:

  1. Ask for the database connection data in the client System.
  2. Add this data in the server configuration file.
  3. Openbravo ERP should connect to the database in the correct way.

User stories

John is a member of the GPS staff in Openbravo and is going to deploy an Openbravo ERP instance in a company. In the X company the IT system has created a Oracle database in a server. John does not have to modify the war file with the connection data, he only needs to add this data in the server.xml file in the tomcat application server in the X company.

Functional requirements based on business processes

Requirement Importance Status Estimated time Comments
Configure the application server. Should be added a JNDI resource. Configure also our web.xml file Must have Complete 2d
Add the new Java class JNDIConnectionProvider. Must get information from the server's JNDI resource Must have Complete 1d
Change the HTTPBaseServlet class, noe needs to get the connection information through the new javaclass Must have Complete 1d
Using the Openbravo properties file the user could decide to use the JNDI service to connect or not Must have Not completed 1d

Open Discussion Items

Retrieved from "http://wiki.openbravo.com/wiki/Projects:JNDI_Service/Functional_Specifications"

This page has been accessed 2,665 times. This page was last modified on 8 June 2012, at 05:28. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.