Dmitry -
Based off the p.xml that you sent, I tested calling
Persistence.createEntityManagerFactory(...) for a
persistence unit that declares only a jta-data-source /
unspecified transaction-type and I'm not seeing the same
problem you encountered. I tested with both
WebSphere_Liberty target server and None target server. I'll
note that my test fails because EclipseLink doesn't have a
datasource to use and it ignores the jta-data-source. I did
find an interesting warning message[1] that seems to explain
why my jta-data-source isn't being used.
If I update my application to use a non-jta-datasource it
works fine with the WAS platform (it failed with None
server, but that is for an unrelated reason). Needless to
say, I'm confused about why I am unable to recreate your
failure. I assume it has something to do with a difference
between the way that WAS and WLS operate. If I were to go
out on a limb, I would guess it has something to do
with EntityManagerFactoryProvider.emSetupImpls and the
contents of that map being shared between the WLS container
created EMFs and Persistence.createEntityManagerFactory(..).
Anyway, I digress.
> The point is that the
defaults are changing.
Fair point. I think it's also fair to consider that the
old default value might not be correct? The spec mentions
that if the transaction-type isn't specified in an EE
container it defaults to JTA. It also mentions that if a
persistence unit is using RESOURCE_LOCAL that a
non-jta-datasource will be provided. That being said, the
spec is vague and most of the time not breaking a customer
trumps following the spec.
> I suggest changing your
code the way that if server platform is NOT defined in
persistence.xml then a detected platform has to use
resource local transactions.
I don't really like that
approach as I'm not completely certain that is the right
answer. I don't know what the right answer is, but I don't
like restricting target-server detection down to
resource_local. Another option is to remove WLS from
target server detection all together. This is a drastic
change, but this would be sure to solve the problems
you're having.
If you guys haven't yet,
please ping Andrei Illitchev to see if he has any
input. He is the one that provided guidance on the change
and specifically implemented the WLS detector.
I assume you guys are trying to get final testing in
before releasing 2.6.x and there is pressure to get this
fixed asap so I'll be sure to stay on top of this one.
Thanks,
Rick
[1] [EL Warning]: transaction: 2015-01-28
18:18:40.974--ServerSession(-79379177)--PersistenceUnitInfo
persistent.coyote has transactionType RESOURCE_LOCAL and
therefore jtaDataSource will be ignored