Extend the Jeeves resource provider framework to enable use of JDBC Datasource ¶
Date |
2008/08/27 |
---|---|
Contact(s) |
Stephen Davies |
Last edited |
Wed Aug 27 02:44:40 2008 |
Status |
Draft |
Assigned to release |
to be determined |
Resources |
Available |
Overview ¶
Deployment to multiple enviroments (e.g. development, test and production) currently requires changes to the config.xml file at each deployment stage. J2EE provides the javax.sql.Datasource mechanism as a way to externally define database connection settings. Modify Jeeves so that external connection pool provided by Web container is used.
Proposal Type ¶
- Type: Core Change
- App: Jeeves
- Module: Resources framework
Links ¶
- Documents:
- Email discussions:
- Other wiki discussions:
Voting History ¶
- Not voted
Motivations ¶
Simplify deployment in a multi stage environment. Externally specify database settings using J2EE standard facilities.
Proposal ¶
Simplify configuration by moving database settings to external location. Currently use of config.xml looks like this:
main-db
jeeves.resources.dbms.DbmsPool
@db.userid@
@db.password@
oracle.jdbc.OracleDriver
jdbc:oracle:thin:@@db.instance@
10
Proposal is to extend Jeeves so that the following configuration will also work:
main-db
jeeves.resources.dbms.DataSourceProvider
jdbc/GeonetDS
oracle
The definition of the datasource is server specific. In Tomcat this can be achieved like this:
<Resource name=“jdbc/GeonetDS” auth=“Container” type=“javax.sql.DataSource”
username=“user”
password=“password”
driverClassName=“oracle.jdbc.OracleDriver”
url=“jdbc:oracle:thin:@myhost.agso.gov.au:1521:dev”
removeAbandoned=“true”
removeAbandonedTimeout=“60”
logAbandoned=“true”
/>
Backwards Compatibility Issues ¶
None. Existing configuration using config.xml will continue to work.
Risks ¶
None.
Participants ¶
- Stephen Davies, Geoscience Australia