Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Spring managed transactions, EclipseLink JPA, custom isolation level
Spring managed transactions, EclipseLink JPA, custom isolation level [message #1386629] Wed, 18 June 2014 20:28
M K is currently offline M KFriend
Messages: 1
Registered: June 2014
Junior Member
I suspect this one is embarrassing an I am doing it wrong in a terrible way, but please bear with me.

I have a Spring application with Spring-managed transactions. It uses EclipseLink JPA. I have a method which does a findByNativeQuery() followed by a merge(). I need this to happen in a real SERIAL transaction isolation level. I tried adding @Transactional(isolation=Isolation.SERIALIZABLE)

This doesn't work because org.springframework.orm.jpa.vendor.EclipseLinkJpaDialect#beginTransaction
does not support any transaction isolation level but the default. So then I tried getting to UnitOfWork internals of ElcipseLink and starting/committing my own transactions, but then I get an error:

"java.lang.IllegalStateException : Not allowed to create transaction on shared EntityManager - use Spring transactions or EJB CMT instead

Which of course makes sense... but what do I do??
Previous Topic:Unmapped attributes of superclass have wrong value
Next Topic:eclipselink stackoverflow exceptions - repeating same query thousand of time
Goto Forum:
  


Current Time: Sun Apr 19 14:09:02 GMT 2015

Powered by FUDForum. Page generated in 0.02534 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software