The three project versions of this chapter use JTA as the transaction manager, just in case the system gets huge scope implementing more than one data source. Previous chapters highlighted that Spring MVC 4.x uses JDBC as the interface to connect to databases and were also successful in implementing the JPA entity manager that uses @PersistenceContext
for in-memory collection of entities, which isolates the application from the inner workings of JDBC and database operations. Any CRUD done in the entities automatically updates the tables in the databases.
However, this chapter implements JTA allowing OCS for management of multiple transactions among multiple databases in the future. It is still JPA which will utilize the JDBC connections and SQL-related operations, but with the option, now, of utilizing JTA for delegating distributed transaction management, once databases are added to accommodate numerous records. OCS will only have one data source despite...