Bug #96794 Contribution: refactor(connection-url): reduces the use of reflection durin ...
Submitted: 9 Sep 2019 16:28 Modified: 18 Jul 10:35
Reporter: OCA Admin (OCA) Email Updates:
Status: Won't fix Impact on me:
Category:Connector / J Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any

[9 Sep 2019 16:28] OCA Admin
This bug tracks a contribution by Manyanda Chitimbo (Github user: machi1990) as described in http://github.com/mysql/mysql-connector-j/pull/43

How to repeat:
See description

Suggested fix:
See contribution code attached
[9 Sep 2019 16:28] OCA Admin
Contribution submitted via Github - refactor(connection-url): reduces the use of reflection during instantiation of  
(*) Contribution by Manyanda Chitimbo (Github machi1990, mysql-connector-j/pull/43#issuecomment-529488132): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: git_patch_315238578.txt (text/plain), 14.99 KiB.

[9 Sep 2019 17:09] MySQL Verification Team
Thank you for the contribution.
[9 Sep 2019 18:08] Manyanda Chitimbo
You are welcome. 

Hope this lands soon. I am working on making the usage of the mysql driver smooth in Quarkus.
[31 Dec 2019 13:47] Filipe Silva
Hi Manyanda,

Thanks for this contribution but I'm afraid this won't be possible. There are several places where the connector relies on reflection or dynamic proxies to support extensions and implement some of its features.

If I understand correctly, you are trying to remove all traces of reflection from the code. Why is this a problem for you and how it relates to Quarkus?
[31 Dec 2019 14:36] Manyanda Chitimbo
Hi Filipe,

The patch try to remove the usage of reflection wherever it is possible. This is to make the Mysql driver native compatible (using the GraalVM - https://www.graalvm.org/docs/reference-manual/native-image/). 

With this patch, the amount of classes (see https://github.com/machi1990/quarkus/blob/e2697d095a08a81eb75ec00bea5ef13e2af6625e/extensi...) needed to be registered for reflection (which are otherwise considered dead code and hence eliminated) is reduced considerably which in turn benefit application and frameworks developers looking to use the driver and GraalVM native image generation.
[1 Feb 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".