Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No Session found for current thread" for job listener #102

Open
apandichi opened this issue Jul 9, 2018 · 0 comments
Open

"No Session found for current thread" for job listener #102

apandichi opened this issue Jul 9, 2018 · 0 comments

Comments

@apandichi
Copy link

apandichi commented Jul 9, 2018

I get org.hibernate.HibernateException: No Session found for current thread during the jobWasExecuted method of a job listener.

The documentation clearly states that "Jobs are configured by default to have Hibernate Session bounded to thread each time job is executed."

However, it is not clear if the same is true for the listeners of a job. If the job listeners don't have a Hibernate session by default, is there a way to add / open a session for certain listeners? I mean, other than wrapping the listener code in DomainClass.withTransaction { ... }

Grails version: 3.3.5
Quartz plugin version: 2.0.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant