extend SakaiBasicDataSource to support setting arbitrary properties
Description
Environment
Test Plan
Attachments
Activity

Ian Boston August 28, 2008 at 11:08 AM
Patch applied to kernel thank you.

John Bush August 28, 2008 at 10:54 AM
oops here one against kernel

Ian Boston August 28, 2008 at 10:35 AM
Patch cant be applied patch is giving the following output
x43543:~/Caret/sakai22/sakaidev/kernel ieb$ patch -p0 < SAK-14325.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: db-impl/ext/src/java/org/apache/commons/dbcp/SakaiBasicDataSource.java
=================================================================== |
--- db-impl/ext/src/java/org/apache/commons/dbcp/SakaiBasicDataSource.java (revision 10536) |
+++ db-impl/ext/src/java/org/apache/commons/dbcp/SakaiBasicDataSource.java (revision 10537) |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

John Bush August 27, 2008 at 9:21 AM
Here's a patch...
some drivers, like Oracle, do not allow you to set properties on the jdbc url. With the current SakaiBasicDataSource you have to make a code change to wire up special properties. commons-dbcp version 1.3 (which I think isn't quite stable yet) adds the following method to handle this issue:
/**
Sets the connection properties passed to driver.connect(...).
*
Format of the string must be [propertyName=property;]*
*
NOTE - The "user" and "password" properties will be added
explicitly, so they do not need to be included here.
*
@param connectionProperties the connection properties used to
create new connections
*/
public void setConnectionProperties(String connectionProperties) {
If we move this into our SakaiBasicDataSource people can then set arbitrary properties via the normal sakai.properties route. Like this:
connectionProperties@javax.sql.BaseDataSource=oracle.jdbc.RetainV9LongBindBehavior=true