grails « Session « JPA Q&A





1. Storing Grails/GORM domain objects in the session - why not?    stackoverflow.com

I'm learning Grails/GORM and as I've understood it the current best practice is not to store domain objects in the session (see http://jira.codehaus.org/browse/GRAILS-978 for a potential fix). The workaround is ...

2. How to establish a Hibernate session within a grails script    stackoverflow.com

The following grails script:

// Import.groovy

includeTargets << grailsScript("Bootstrap")

target(main: "Import some data...") {
    depends(bootstrap)

    def Channel = grailsApp.classLoader.loadClass("content.Channel")

    def c 

    ...

3. In Grails how do I access the hibernate session inside of a domain class static method?    stackoverflow.com

I've read various articles on the web, but they seem rather scattered on this point. Exactly what do I need to do in my configuration and in my method to ...

4. grails console issue : No Hibernate Session bound to thread,    stackoverflow.com

i'm trying to learn Grails console and had a problem. It looks like this: When I start grails console in my project WITHOUT starting the project, I can persist data to ...

5. Hibernate session in threads    stackoverflow.com

Im having some problem with a service that acts as a listener of some events that are originated from an external library, that library creates a thread for reading comm port ...

6. How to access Hibernate session from src folder?    stackoverflow.com

I would like to know how to access the Service and Domains properly in this sample class placed in src/java folder

public class NewsIngestion implements Runnable {

private String str;
private int num;
private Logger ...

7. grails sessionFactory.currentSession.flushMode not work with thread?    stackoverflow.com

In grails we have the following config: DataSource.groovy:

hibernate {
    flush.mode="commit"
}
which prints "COMMIT" when we log it in a transactional context:
println "session=${sessionFactory.currentSession.flushMode}"
but when we create a new thread this prints "AUTO". New ...

8. Keep Hibernate/Grails domain object in session    stackoverflow.com

I have a application where the user needs to enter data but the form is spread across several screens each requiring the user to POST data to the server as the ...