Search code examples
eclipselink

What is the proper way to have a user-authored EclipseLink DatabasePlatform subclass picked up?


The Informix support in EclipseLink 2.3.2 (and probably later) has a fairly serious bug in it where outer joins are not performed properly. I'd like to subclass the EclipseLink InformixPlatform class to work around this.

For various reasons, I don't want to specify the database platform to use in my persistence.xml. I would rather rely on EclipseLink's ability to discover the proper platform to use.

Obviously EclipseLink out of the box does not know about my subclass. How can I tell EclipseLink that my subclass exists, and that it should be preferred to the normally-auto-discovered one?

For comparison purposes, Hibernate features a bit of machinery under the label of "dialect resolvers" that does exactly this: hand it a custom dialect resolver and it lets you deal with the autodiscovery process. What is the equivalent in EclipseLink 2.3.2?


Solution

  • There is no way to programmatically install a DatabasePlatform subclass without running into other bugs. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=401388 for details.