3

I am using Spring 3.2.1 and EclipseLink 2.4 and JPA 2.0

I get an error when I use other than the default isolation level.

Exception in thread "main" org.springframework.transaction.InvalidIsolationLevelException: Standard JPA does not support custom isolation levels - use a special JpaDialect for your JPA implementation

Is EclipseLinkJpaDialect need to extend the class?

How?

Rhododendron
  • 559
  • 2
  • 7
  • 15
  • possible duplicate of [How to set isolation level in @Transactional "READ\_UNCOMMITTED". I am using EclipseLink 2.5.1-RC1](http://stackoverflow.com/questions/28337106/how-to-set-isolation-level-in-transactional-read-uncommitted-i-am-using-ecli) – Bob Sep 14 '15 at 16:38

1 Answers1

0

What isolation level are you trying to use? Normally you would set your desired isolation level as your database default (to avoid having to set it on every connection).

You can make EclipseLink set the database transaction isolation level through using a SessionCustomizer and the DatabaseLogin API, setTransactionIsolation().

James
  • 17,965
  • 11
  • 91
  • 146