Eng During last 365 days Approved articles: 2065,   Articles in work: 293 Declined articles: 786 

Back to contents

Cybernetics and programming

Database Connection Technologies from JSP Pages and Java Web Application Servlets
Gribanova-Podkina Mariya

PhD in Physics and Mathematics

Associate Professor, Department of Physics and Information Technology, Balashov Institute (branch) of the Chernyshevsky National Research Saratov State University

412300, Russia, Saratovskaya oblast', g. Balashov, ul. Karla Marksa, 29





The purpose of the study is to demonstrate the diversity of solutions on the issue of connecting to a database, including a description of the developed connection controller class, as well as various ways to create connection pools on a web server and application servers. The article discusses the practical issues of using JDBC technology when building a Java web application. In the examples, the presentation and business layer of the application are developed using JSP-pages and servlets, the database operates on the MySQL platform. The described methods for creating and configuring a connection pool are shown on the example of the ApacheTomcat web server and the GlassFish application server. The question of optimizing database connections in Java applications remains open, despite the diversity of solutions. The study examines and proposes methods for constructing classes of connectors, various methods for creating pool connections, and describes the results of solving problems arising from the implementation of the described techniques. A detailed classification of ways to connect to the database is given.

Keywords: GlassFish, MySQL, application server, web server, connection pool, JDBC, database, web application, connection controller, data source



Article was received:


Review date:


Publish date:


This article written in Russian. You can find full text of article in Russian here .

Gribanova-Podkina M.Yu., Annushkin A.V. Model' informatsionnoi sistemy ucheta dvizheniya tovara v komp'yuternom magazine // Tekhnicheskie nauki - ot teorii k praktike: sb. st. po mater. LVII mezhdunar. nauch.-prakt. konf. 4(52). Novosibirsk: SibAK, 2016. S. 44-51.
Gribanova-Podkina M.Yu. UML-model' partionnogo ucheta tovara dlya avtomatizirovannoi informatsionnoi sistemy // Programmnye sistemy i vychislitel'nye metody. 2016. 2. C. 111-123. DOI: 10.7256/2305-6061.2016.2.19271
Prosteishii Connection pool bez DataSource v Java [Elektronnyi resurs]. URL: https://habrahabr.ru/post/229199/ (data obrashcheniya: 30.06.2016)
Apache Tomcat 8 (8.0.36) - The Tomcat JDBC Connection Pool [Elektronnyi resurs]. URL: https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html (data obrashcheniya: 30.06.2016)
Kheffel'finger D. Java EE 7 i server prilozhenii GlassFish 4 / per. s angl. A. N. Kiseleva. Moskva: DMK Press, 2016. 331s.
Sun GlassFish Enterprise Server 2.1 Administration Guide [Elektronnyi resurs]. URL: https://docs.oracle.com/cd/E19879-01/820-4335/ablip/index.html (data obrashcheniya: 30.06.2016)
Sozdanie prostogo veb-prilozheniya s ispol'zovaniem bazy dannykh MySQL [Elektronnyi resurs]. URL: https://netbeans.org/kb/docs/web/mysql-webapp_ru.html (data obrashcheniya: 30.06.2016)
Bug 254192 - New File glassfish-resources.xml is created in WEB-INF and JSF application will not run [Elektronnyi resurs]. URL: https://netbeans.org/bugzilla/show_bug.cgi?id=254192 (data obrashcheniya: 30.06.2016)
Bug 243034 - The file glassfish-resources.xml in project is not executed on Glassfish in order to install a jdbc pool [Elektronnyi resurs]. URL: https://netbeans.org/bugzilla/show_bug.cgi?id=243034 (data obrashcheniya: 30.06.2016)
Connect to Oracle using a connection pool [Elektronnyi resurs]. URL: http://www.rgagnon.com/javadetails/java-0545.html (data obrashcheniya: 30.06.2016)
The DBCP Component [Elektronnyi resurs]. URL: http://commons.apache.org/proper/commons-dbcp/ (data obrashcheniya: 30.06.2016)
HikariCP [Elektronnyi resurs]. URL: https://brettwooldridge.github.io/HikariCP/ (data obrashcheniya: 30.06.2016)
c3p0 - JDBC3 Connection and Statement Pooling [Elektronnyi resurs]. URL: http://www.mchange.com/projects/c3p0/ (data obrashcheniya: 30.06.2016)