AbstractJob should take care of transaction management as suggested by it's documentation

XMLWordPrintable

    • 1
    • Severity 2 - Major
    • 5

      Raised from https://developer.atlassian.com/display/CONFDEV/Preparing+for+Confluence+5.7?focusedCommentId=30612993#comment-30612993

      Since 5.7 we are experiencing Hibernate Session exceptions when accessing CEOs in a Job context (<job /> module in plugin.xml)

      ERROR [scheduler_Worker-3] [sf.hibernate.proxy.LazyInitializer] initializeWrapExceptions Exception initializing proxy net.sf.hibernate.HibernateException: Could not initialize proxy - the owning Session was closed
      ...
      at com.atlassian.confluence.core.ConfluenceEntityObject.getCreatorName(ConfluenceEntityObject.java:27)
      

      The documentation says:

      At a minimum, the module class must implement Quartz's Job interface, but for access to Confluence's objects and database you should extend com.atlassian.quartz.jobs.AbstractJob.

      But simply extending AbstractJob is not enough. There is no transaction management automatically applied in this case.

            Assignee:
            Unassigned
            Reporter:
            Ulrich Kuhnhardt [Comalatech]
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: