Title: Message Title
|
|
I see that "db.schema" is at present used only in retrieveColumnInfo() and main(). If there is a need to misconfigure a datasource and then correct the default schema, then we should use the value of "db.schema", which is present and somewhat documented in the stock dspace.cfg. We should do this at most once per connection. Possibly this could be done by supplying a Collection of one statement to the PoolableConnectionFactory as "connectionInitSql". We should not depend on a side effect of an unnecessary manual connection validation to do it every time a connection is used. We should do this regardless of the DBMS brand. DatabaseManager needs a thorough cleaning. There was yet another place where the validation query was set to a command to use a *different* configuration value to set the schema, solely for Oracle. Or you could set the validation query used by a pool provided out of JDBC to be the "ALTER SESSION SET default_schema" command you desire. We still get rid of the redundant validation and the confusing logic and the obvious error and the use of an undefined, undocumented configuration variable. Most sites won't want this and won't have it waiting there in the code to puzzle them. Anyway, if we need a way to specify the schema then we should code one properly.
|
|
|
|
|
I see this in initialize(): if (isOracle) { if (StringUtils.isEmpty(ConfigurationManager.getProperty("db.postgres.schema"))) { sqlOnBorrow = "SET SEARCH_PATH TO " + ConfigurationManager.getProperty("db.postgres.schema").trim(); } } Two things seem odd: o It's doubtful that this would ever do ...
|
|
|
|
------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends. Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Dspace-devel mailing list
Dspace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-devel