|Re: [eclipselink-dev] Fix for 455683. Add support to automatically detect the target server.|
Seems like Spring requires the setup that is otherwise invalid:
serverPlatform.isJTAEnabled() == false; and
datasorceLogin.shouldUseExternalTrandsactionController() == true.|
There is only one way to achieve that:
persistence unit must be configured to use JTA => datasorceLogin.shouldUseExternalTrandsactionController = true;
serverPlatform.isJTAEnabled() == false (currently by default only for NoServerPlatform);
I understand that Spring calling em.getTransaction in JTA case is against the spec., however the goal of Spring is to be transaction mechanism agnostic (JTA vs no JTA use) so I don't see how else they can do that.
If only we could somehow detect in predeploy that the persistence unit is used with Spring then we could fix autodetection (if Spring then NoServerPlatform or better serverPlatform.disableJTA()).
Otherwise alternatives are:
1. Remove server platform autodetection.
1.1 Pro: Spring users need no changes in their setup;
1.2 Con: Non Sprint users must specify server platform;
2. Keep server platform autodetection.
2.1 Con: Spring users must specify NoServerPlatform (or better a newly defined SpringPlatform);
2.2 Pro: Non Sprint users need not specify server platform.
2.3 Pro: SpringPlatform would allow to use correct server platform (wls, was) but with disabled jta, that would allow to perform serverPlatform-specific actions correctly (like unwrapping data source connection).
On 2/6/2015 12:30 PM, Dmitry Kornilov wrote:
Back to the top