Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Susanta Chatterjee
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 102
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 102
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Found an answer in StackOverflow. Click on the link above to see the answer.
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for letting the readers know about the Cross posting and also the solution for your issue. Much appreciable.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic