grails « Session « Spring Q&A





1. Spring Webflow in Grails keeping plenty of hibernate sessions open    stackoverflow.com

I have an Internet app running on Grails 1.1.2 and it integrates Spring WebFlow mechanism. The problem is that there are some bots ignoring robots.txt and are entering the flow quite ...

2. Get ahold of session in command object in Grails    stackoverflow.com

How can I get the session from within a command object? I have tried:

import org.springframework.security.context.SecurityContextHolder as SCH

class MyCommand {
   def session = RCH.currentRequestAttributes().getSession()
}
This throws java.lang.IllegalStateException: No thread-bound request found: Are ...

3. Should I care about Open Session in View when using Grails?    stackoverflow.com

From my experience of using spring MVC in conjunction with hibernate I know about lazy exception problem occured when addressing to lazy-fetched collection when rendering view. It pure spring+hibernate world it fixes ...

4. In grails, what is the quickest way to obtain a reference to the current hibernate session?    stackoverflow.com

I got a singleton service and inside its only method I need to obtain a reference to the hibernate session bound to the current request. What is the quickest way of ...

5. How to intercept all Hibernate sessions when they're created (Spring / Grails environment)    stackoverflow.com

Is there a way of intercepting all new Hibernate sessions when they're created? I need to access each Session instance to enable a Hibernate filter with a parameter. The only solution ...

6. Service configured in spring/resources.groovy does not have a Hibernate session    stackoverflow.com

We have an application with a plugin which contains a service:

public class TaskService {

    public void doSomething( Task task ) {
        ...

7. OpenSessionInView filter causes grails run-app to bomb?    stackoverflow.com

I'm using OpenSessionInView with DWR to get a hibernate session for my ajax requests. This works fine when I start through a deployed war, but when I try to run with ...