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()).
I like an idea of Spring detector. Implementing it will bring server platform auto detection advantages without breaking backwards compatibility. But I see a problem implementing it. Class loader approach won’t work here.
It is possible to try instantiating org.springframework.core.SpringVersion class by reflection. SpringVersion.getVersion() can be used to get a version of Spring codebase.
But it just a proof of existence Spring in class path. Any ideas?
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;
1.3 Backwards compatibility
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).
It is possible to do now specifying both target-server and transaction-type=RESOURCE_LOCAL. So I see no advantage here.
Thanks,
Dmitry
On 2/6/2015 12:30 PM, Dmitry Kornilov
wrote:
>
That
time I didn't dig deep enough. This case is complicated.
Can you
explain the scenario better so I can try to understand
what the problem is?
I have explained it more than once. Please scroll down the
history. It's there.
> Spring is widely
used. I don't know the exact statistic data but it could
be the most used case. I am still not sure that it's a
good idea to break it.
Sure, I get
that Spring is popular. Is this perhaps a bug in Spring's
usage of the EclipseLink / JPA APIs?
There is a bug? The defaults were used.
Rick, I don't think that we can convince each other. This
conversation gets useless and there is no point to continue it. I
would like to hear some fresh opinion from other committers.
Thanks,
Dmitry
_______________________________________________
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
_______________________________________________
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
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev