From: SourceForge.net <no...@so...> - 2010-01-13 16:51:24
|
Bugs item #2931463, was opened at 2010-01-13 11:51 Message generated for change (Tracker Item Submitted) made by vgapeyev You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2931463&group_id=248804 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: internals Group: None Status: Open Priority: 5 Private: No Submitted By: Vladimir Gapeyev (vgapeyev) Assigned to: Nobody/Anonymous (nobody) Summary: Rationalize DB connection creation: in webapp vs in tests Initial Comment: Background: There are at least three parts of TB Java code that need DB connections: the web application (WAR), the tests, and data importing utilities (in /treebase-core/src/main/java/org/cipres/treebase/util). After Jan 2010 switch to using JNDI DataSource, DB credentials needed by the webapp are specified in /treebase-web/target/treebase-web/META-INF/context.xml as a JNDI resource. DB credentials used by tests and import utilities are still read from /treebase-core/src/main/resources/jdbc.properties. (See treebase-core/src/main/java/org/cipres/treebase/core/CoreServiceLauncher.java) The corresponding Spring dataSource beans are declared in /treebase-core/src/main/resources/{applicationContext-db-webapp.xml,applicationContext-db-standalone.xml} The problems: (1) The standalone datasource still uses com.mchange.v2.c3p0.ComboPooledDataSource rather than Apache commons-dbcp supplied by Tomcat to the web app. (2) The fact that the standalone apps retrieve DB credentials from inside the code tree (jdbc.properties) is still somewhat uncomfortable. Any solution should keep it possible to specify separate DB credentials for each separate application. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=1126676&aid=2931463&group_id=248804 |