Reputation: 5571
I have defined def sessionFactory
in my class class UpdateService.
However sessionFactory
always remains null
. (I am calling the service from a controller and a job)
I need to clear Hibernate second level query cache from that service. What could be the problem?
Upvotes: 1
Views: 954
Reputation: 75681
Do you also use def updateService
in the controller and job, or are you using new UpdateService()
? You have to use dependency injection (i.e. def foo
).
Upvotes: 3