Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 529581 - Use reflection for OraclePlatform extension classes
Summary: Use reflection for OraclePlatform extension classes
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-09 09:58 EST by Will Dazey CLA
Modified: 2022-06-09 10:24 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Will Dazey CLA 2018-01-09 09:58:27 EST
I would like to move the OraclePlatform classes from the Oracle Extensions bundle to Core. Since the platform classes have a dependency on the Oracle driver, this would mean changing their implementation to add reflection.

The reason I would like to do this is because of the hard dependency on the OraclePlatform classes in the Extension bundle. On WAS Liberty (an OSGI environment) these hard dependencies cannot be satisfied during bundle loading as we do not ship JDBC drivers. If the dependencies were removed through reflection, then the platform classes could move to Core and we could have Liberty users simply add their Oracle drivers as shared libraries.

There is a slight performance hit from using reflection and I believe EclipseLink has had a history of removing reflection from the code rather than add it.
Comment 1 Lukas Jungmann CLA 2018-01-10 07:06:59 EST
One drawback I see here apart from possible performance penalty is that refactoring/code search and similar stuff will be hard to use and error prone if/when done.

Proper way to fix this would be to document how to repackage Oracle JDBC driver, possibly with additional dependencies, as an OSGi bundle and how to properly install such bundle into Liberte. Note that all dependencies from org.eclipse.persistence.oracle to packages available in Oracle JDBC driver are declared as optional.
Comment 2 Will Dazey CLA 2018-03-02 15:35:07 EST
Unfortunately, I do not think that repackaging the Oracle jdbc driver would be a fix in Liberty. We currently don't ship the Oracle jdbc driver with Liberty and it doesn't look like we want to. It may be possible for a customer to write a Liberty user feature and provide their own Oracle driver bundle in order to satisfy the CNF, but this would introduce a regression for existing users who would need to create that configuration.

A much simpler solution would be to move the platform classes to "org.eclipse.persistence.platform.database" and have them use reflection.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:24:41 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink