|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Custom path for driversHi All,
I am using iBATIS tool for running all my DB migrations. As of now, the script mandates that i have all the driver jar files, inside a drivers folder in my root folder i.e ROOT | -- scripts | -- environments | -- drivers | -- ojdbc.jar ..... I have multiple services which use the iBATIS tool and all my services need the same drivers. It will be redundant to have the same files copied in n number of locations. I would like to know if there is a way to custom configure the driver path, so that the tool can load all the drivers from a central location? I did modify the BaseCommand to cater to this need. I have attached the code review with this post. If this feature is already existing, please do let me know how to use the same. Else, i would suggest that my code be reviewed and let me know if i can submit the patch.custom-driver-ibatis-3.patch |
|
|
Re: Custom path for driversThe patch file changes
Index: trunk/ibatis-3-core/src/main/java/org/apache/ibatis/migration/commands/BaseCommand.java =================================================================== --- trunk/ibatis-3-core/src/main/java/org/apache/ibatis/migration/commands/BaseCommand.java (revision 828216) +++ trunk/ibatis-3-core/src/main/java/org/apache/ibatis/migration/commands/BaseCommand.java (working copy) @@ -228,6 +228,10 @@ private void lazyInitializeDrivers() { try { + String customDriverPath = environmentProperties().getProperty("driverPath"); + if(customDriverPath != null && customDriverPath.length()>0){ + driverPath = new File(customDriverPath); + } if (driverClassLoader == null && driverPath.exists()) { List<URL> urlList = new ArrayList<URL>(); for (File file : driverPath.listFiles()) {
|
|
|
Re: Custom path for driversPlease atttache your patch (or just the BaseCommand.java is easier) to a JIRA feature request...
Clinton On Thu, Nov 5, 2009 at 7:47 PM, camelContext <praveen.krishnan@...> wrote:
|
|
|
Re: Custom path for driversAdded a jira request with the patch attached to it.
https://issues.apache.org/jira/browse/IBATIS-685
|
| Free embeddable forum powered by Nabble | Forum Help |