Grails
  1. Grails
  2. GRAILS-8243

Could not open Hibernate Session for transaction when Bootstrap destroy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0-RC1
    • Fix Version/s: 2.2-RC1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Lion,JDK6

      Description

      the original url:

      http://grails.1312388.n4.nabble.com/Could-not-open-Hibernate-Session-for-transaction-when-Bootstrap-destroy-td3963069.html

      I create a temp project to reproduce this problem,and the step is:

      1. grails ->enter into the interactive mode
      2. run-app
      3. exit ->exit the run-app
      4. then the exception will throw.

        Activity

        Hide
        Johannes Link added a comment -

        Still not working in 2.0.1. Is there a workaround to do some work which reads from the database before shutdown?

        Show
        Johannes Link added a comment - Still not working in 2.0.1. Is there a workaround to do some work which reads from the database before shutdown?
        Hide
        Graeme Rocher added a comment -

        The destroy event is only invoked after shutting down the application context which is after the session factory has been destroyed. GORM logic cannot be placed into this destroy event, and changing this now would be a breaking semantic change

        Show
        Graeme Rocher added a comment - The destroy event is only invoked after shutting down the application context which is after the session factory has been destroyed. GORM logic cannot be placed into this destroy event, and changing this now would be a breaking semantic change

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Ford Guo
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Last Reviewed:

              Development