will help you I am trying to schedule a job using Quartz in Spring boot. below are the code which I am using below are my configurations... , I was able to fix the issue by changing SchedulerFactoryBean
Does that help @Transaction annotation has an attribute rollbackFor (@Transaction(value = "DB1", rollbackFor = SqlException.class) for example) that may cover your needs. However, there is only one transaction will be actually used in your code, because B is invoked not via Spring proxy but via inner call (this.B()). To execute method inside a separate transaction method must be invoked via Spring proxy - someService.B(), not this.B().
How spring transaction works in this example and how to resolve LazyInitializationException?
help you fix your problem I am getting org.hibernate.LazyInitializationException exception. What I know is, the issue is caused because I have fetched profile object in user entity lazily and before proxy object gets initialized the session is closed. , Is the session closed after executing findAll() method?
LazyInitializationException in spite of Spring transaction?
To fix the issue you can do Because the FetchType of Brand is lazy, it will not automatically be loaded into the session with call to fetchAll(). To have it automatically load into the session, you need to: Change