Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Bug in native SQL produced for Informix platform?

On Fri, Feb 15, 2013 at 7:32 AM, Laird Nelson <ljnelson@xxxxxxxxx> wrote:
One last question: Hibernate has the concept of a dialect resolver, which allows the core platform to discover your own dialect subclasses (so you don't have to specify the dialect manually).  Does EclipseLink have something similar?  Where would I look for the Platform discovery logic in the absence of a hardcoded server platform property?

Update for those following along:

Overriding the InformixPlatform to return false from its isInformixOuterJoin() method produces the proper outer join syntax (in this case).  I am still leery of the sibling isInformix() method; I can see where it's used throughout the codebase to drive various decisions, so I didn't mess with it.  Time will tell if the outer join syntax issue is the only one.

Next up, I went hunting for the proper place to install a dynamic platform selector, and arrived almost immediately at a session event listener.  Unfortunately, my original approach which was to react to a preLogin event, will fail because the very first thing the platform discovery logic in EclipseLink does after returning from that method is to null out the platform that my listener wanted to install.  So note to self and others: the preLogin event can't really be used to customize the platform.

It looks like the only way to install a custom platform programmatically is to use the postLogin event, and to basically uninstall whatever EclipseLink installed first.  Is that true?

I was planning to do a postLogin event, check the platform that EclipseLink installed natively, and if it's an instance of InformixPlatform, I'll call usePlatform(), passing it mine instead, thus jettisoning the original InformixPlatform.  Will that work?  Will there be things that are initialized before I make this call that won't pick up the new platform?  Do I need to close/shutdown the old platform in some way that is not documented?


Best,
Laird

--
http://about.me/lairdnelson

Back to the top