Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Isolation Level

 
Mohammad Jaber
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

is there a way i can change the isolation level programaticaly on EJB/JPA application ,

Thanks and Best Regards,
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any methods on the SessionFactory or EntityManagerFactory?

I am not sure, but I also question if it would be a good idea to be able to do that "on the fly". Changing the Isolation Level on the fly is a bit scary in my mind.

Mark
 
Pedro Erencia
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isolation level is configured on a connection level, mainly in the datasource configuration. There's no way to change it via JPA.
 
Mohammad Jaber
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I managed to set in on the DataSource level , Thanks
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe you can also manipulate this on a deployment descriptor. At least you can with WebSphere, although it may be in the IBM XMI extensions file, as opposed to the web.xml. I've forgotten which one, but it's in one of them.

-Cameron McKenzie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic