Setting jndi look up type in ServerPlatform constructor is bad
because:
- what if we set server platform before connector (which is normally
the case - see EntityManagerSetupImpl);
- what if we switch from one server platform to another (say,
websphere specified in persistence.xml, but weblogic in puProperties
passed to createEMFactory);
Setting lookup type right before session connects would resolve
those problems, but we would need to loop through all the connectors
(write, read, sequence, possibly custom connection pools).
Still not covered the case of creating custom connector after server
session has been created (through entity manager property for an
individual entity manager).
My suggestion is to add getJndiLookupType method to ServerPlatform
(returning STRING_LOOKUP in ServerPlatformBase).
In JNDIConnector constructor initialize lookupType with UNDEFINED
value and in connect method - in case the type is still UNDEFINED -
copy lookupType from session.getServerPlatform.getJndiLookupType.
Thanks,
Andrei
On 12/18/2014 5:31 PM, Rick Curtis
wrote:
Can I get someone to take a look at my proposed
change?
Thanks,
Rick
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
|