Information Systems:Using JDBC

From uniWIKI
Revision as of 13:36, 27 May 2021 by Norwinu (talk | contribs) (Created page with "JDBC is what allows Java to access databases. It is a part of the standard JDK (java.sql). Resources for learning JDBC are abundant. This page discusses usage of JDBC at uniPH...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

JDBC is what allows Java to access databases. It is a part of the standard JDK (java.sql). Resources for learning JDBC are abundant. This page discusses usage of JDBC at uniPHARM.

UWDDBConnection

Found in com.unipharm.uwd.utils ((UWD Java Integrations).

This class was created to be a connection manager of sorts i.e. to provide convenience methods. The current state is that it requires massive improvement. For one, it should be converted to use connection pooling.

Connection Pooling

Using a connection pool is important to prevent the opening and closing of DB connections (worst case scenario is one connection open/close per DB operation), which is an "expensive" process. The JDBC API provides the facilities to implement a connection pooling mechanism from scratch, but there are established libraries that already do this for you. The one in use for the UWD Integrations project is HikariCP.

Integrator itself

JTOpen

The database facilities in JTOpen extend JDBC classes. For example, the AS400JDBCConnection class extends java.sql.Connection