An application-scoped database pool is visible only within the scope of the application. It is available to all of the modules that are present within an enterprise application (for example, war, ear, jar
, and so on). It can also be made visible to other applications if they declare a dependency on the application containing the database pool. You can deploy an application-scoped database pool by adding an ext-module
element to the application's Geronimo specific deployment plan.
To illustrate this, we have provided a sample application. This sample application is present at samples\Chapter-3 Database Connectivity\JDBC Sample ear
. The ext-module
section in the geronimo-application.xml
file of the JDBC sample EAR application is shown below:
<ext-module> <connector>JDBCDataSource</connector> <external-path xmlns:dep="http://geronimo.apache.org/xml/ns/ deployment-1.2"> <dep:groupId>org.tranql</dep:groupId> <dep...