Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] Fwd: [Bug 455690] Add support to allow ServerPlatforms to do additional initialization

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

---------- Forwarded message ----------
From: <bugzilla-daemon@xxxxxxxxxxx>
Date: Thu, Dec 18, 2014 at 4:30 PM
Subject: [Bug 455690] Add support to allow ServerPlatforms to do additional initialization
To: curtisr7@xxxxxxxxx

https://bugs.eclipse.org/bugs/show_bug.cgi?id=455690
Product/Component: EclipseLink / JPA

Rick Curtis <curtisr7@xxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|eclipselink.orm-inbox@eclip |curtisr7@xxxxxxxxx
                   |se.org                      |

--- Comment #1 from Rick Curtis <curtisr7@xxxxxxxxx> ---
Created attachment 249540
  --> https://bugs.eclipse.org/bugs/attachment.cgi?id=249540&action="">
Attaching proposed change.

--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
You reported the bug.
You are watching the assignee of the bug.


--
Rick Curtis


_______________________________________________
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


Back to the top