• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Errors with marking action method as @transactional

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using hibernate +JPA + spring +struts2.

I have domain object width JPA annotations, and service interface, and the implementation of the service inteface.
The methods of the service are marked as @trasactional.
In an object I have a collection with fetching = lazy.

When I need to manipulate the collection on the action, I get a lazy exception. My idea is to mark also, as @transactional the action method(execute) to solve these.

When an method of an action is marked with the annotation transactional, the action fails. I read something about , but I do not understand how to solve.

Anything has the same problem? How I can do to move the boundary to the action...like the open session in view pattern...


Many thanks!!!
 
Willie Smits can speak 40 languages. This tiny ad can speak only one:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic