File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Errors with  marking action method as @transactional Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Errors with  marking action method as @transactional" Watch "Errors with  marking action method as @transactional" New topic

Errors with marking action method as @transactional

Moli molina

Joined: Apr 07, 2010
Posts: 19
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 the open session in view pattern...

Many thanks!!!
I agree. Here's the link:
subject: Errors with marking action method as @transactional
It's not a secret anymore!