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.

On 12/18/2014 5:31 PM, Rick Curtis wrote:
Can I get someone to take a look at my proposed change?


---------- 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
Product/Component: EclipseLink / JPA

Rick Curtis <curtisr7@xxxxxxxxx> changed:

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

--- Comment #1 from Rick Curtis <curtisr7@xxxxxxxxx> ---
Created attachment 249540
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
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top