*
The moose likes Groovy and the fly likes Grails - OSIV - Stop Open Session In View filter for Static Resources Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Grails - OSIV - Stop Open Session In View filter for Static Resources" Watch "Grails - OSIV - Stop Open Session In View filter for Static Resources" New topic
Author

Grails - OSIV - Stop Open Session In View filter for Static Resources

Susanta Chatterjee
Ranch Hand

Joined: Aug 12, 2002
Posts: 102
I did my due diligence by doing Google search but did not find any answer.

We have a REST service bases Web Application, for which backend is implemented using Groovy and Grails (1.3.7 with Groovy 1.7.x). I understand how Open Session In View works in general for Hibernate, and when configuring Hibernate with Spring, we could specify for which set of URLs, OSIV should work in the filter configuration.

The issue is I cannot find how to exclude a set of URLs from the scope of OSIV filter (like matching *.js, *.gif, etc). I found from the Hibernate log, that even for Javascript file request, Open Session In View kicks in and opens a session and closes it.

Thanks in advance.

- Susanta
Susanta Chatterjee
Ranch Hand

Joined: Aug 12, 2002
Posts: 102
I did not find any answer in this forum, so cross-posted in StackOverflow.

If I find any answer, I will post here. So, if you have any answer to this question, please, reply.
Susanta Chatterjee
Ranch Hand

Joined: Aug 12, 2002
Posts: 102
Found an answer in StackOverflow. Click on the link above to see the answer.
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3064
    
  33

Thanks a lot for letting the readers know about the Cross posting and also the solution for your issue. Much appreciable.


Mohamed Sanaulla | My Blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Grails - OSIV - Stop Open Session In View filter for Static Resources
 
Similar Threads
Exception on Save operation with Spring annotation
Hibernate connection close issue.
Grails 1.1 Web Application Development
Transaction handling in 3-tier layered application using Wicket + Spring + Hibernate
Hotfix Code in tomcat container running groovy application