Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #439 from mwoodiupui/DS-1746

[DS-1746] Remove strange, redundant pool validation from DBMS layer
See the Jira ticket for my analysis.  We should consider those concerns, but the code here does not address them properly.
  • Loading branch information...
commit c6d8baba071c6fcdd10b07cac116f51c72a2cc0c 2 parents bdb1b82 + 25383e6
@mwoodiupui mwoodiupui authored
View
31 dspace-api/src/main/java/org/dspace/storage/rdbms/DatabaseManager.java
@@ -75,11 +75,10 @@
/** DataSource (retrieved from jndi */
private static DataSource dataSource = null;
- private static String sqlOnBorrow = null;
/** Name to use for the pool */
private static String poolName = "dspacepool";
-
+
/**
* This regular expression is used to perform sanity checks
* on database names (i.e. tables and columns).
@@ -582,21 +581,6 @@ public static Connection getConnection() throws SQLException
if (dataSource != null) {
Connection conn = dataSource.getConnection();
- if (!StringUtils.isEmpty(sqlOnBorrow))
- {
- PreparedStatement pstmt = conn.prepareStatement(sqlOnBorrow);
- try
- {
- pstmt.execute();
- }
- finally
- {
- if (pstmt != null)
- {
- pstmt.close();
- }
- }
- }
return conn;
}
@@ -1481,11 +1465,6 @@ private static synchronized void initialize() throws SQLException
if (dataSource != null)
{
- if (isOracle)
- {
- sqlOnBorrow = "ALTER SESSION SET current_schema=" + ConfigurationManager.getProperty("db.username").trim().toUpperCase();
- }
-
log.debug("Using JNDI dataSource: " + jndiName);
}
else
@@ -1494,14 +1473,6 @@ private static synchronized void initialize() throws SQLException
}
}
- if (isOracle)
- {
- if (!StringUtils.isEmpty(ConfigurationManager.getProperty("db.postgres.schema")))
- {
- sqlOnBorrow = "SET SEARCH_PATH TO " + ConfigurationManager.getProperty("db.postgres.schema").trim();
- }
- }
-
if (dataSource == null)
{
if (!StringUtils.isEmpty(jndiName))
Please sign in to comment.
Something went wrong with that request. Please try again.