[
https://issues.apache.org/jira/browse/FELIX-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christian Müller updated FELIX-2280:
------------------------------------
Attachment: FELIX-2280.patch
Jamie, I attached my patch. It would be nice, if you could have a look on it.
I use the Apache Git repository and created the patch with Git. With the
'--no-prefix' option I use, it should be the same patch format as Subversion
creates. I working with the guys from Camel and ServiceMix in the same way and
it was not a problem. Hope this works also for you. :o)
I have also changed the behavior in one point, what you may be dislike. Let me
know what you think and I will change this, if you dislike it.
At present, we append the jdbc url option ';create=true' for derby, if the user
doesn't declare it. We could do this also for MySQL
(?createDatabaseIfNotExist=true). But because this is a normal jdbc url option,
I would leave this decision to the user and document this option in the
documentation.
Otherwise I would prefer to have a concrete DerbyJDBCLock which extends the
DefaultJDBCLock and overrides the 'createConnection()' method and add the jdbc
url option, if they is not provided. The same for MySQLJDBCLock...
I have tested successfully the functional tests with the following database and
driver versions:
- Apache Derby Network Server 10.5.3.0 / derbyclient.jar 10.5.3.0_1 (latest
version)
- MySQL Server 5.1.44 / mysql-connector-java.jar 5.1.12 (latest version)
- Oracle Database 10g Express Edition Release 10.2.0.1.0 / ojdbc14.jar
10.2.0.4.0 (latest version for 10.2)
I added the '@Ignore' annotation to the integration tests. This ensure, that
these tests are not executed. But if somebody sometime would execute the tests,
he only have to uncomment the annotation.
Regards,
Christian
P.S.: If you have requests/requirements for additional databases like DB2,
Postgress, HSQLDB or other, please let me know. I would like to test and
implement the Lock also for this databases...
> To much code duplication in DefaultJDBCLock, OracleJDBCLock and MySQLJDBCLock
> -----------------------------------------------------------------------------
>
> Key: FELIX-2280
> URL: https://issues.apache.org/jira/browse/FELIX-2280
> Project: Felix
> Issue Type: Improvement
> Components: Karaf
> Affects Versions: karaf-1.4.0
> Environment: All
> Reporter: Christian Müller
> Attachments: FELIX-2280.patch, FELIX-2280.patch
>
>
> org.apache.felix.karaf.main.DefaultJDBCLock,
> org.apache.felix.karaf.main.MySQLJDBCLock and
> org.apache.felix.karaf.main.OracleJDBCLock has to much code duplications. I
> propose a solution like in ActiveMQ [package
> org.apache.activemq.store.jdbc.adapter|http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/jdbc/adapter/].
> And we should implement some unit tests for it.
> If it's fine for you, I will try to improve this part of karaf and provide a
> patch for it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.