I am trying this and get exception: java.lang.IllegalStateException: Existing transaction detected in JobRepository. Please fix this and try again (e.g. remove @Transactional annotations from client).
Is there anyone who have encountered this problem?
@Transactional(propagation = Propagation.REQUIRED)
public void method1() // this method must be Transactional
{
... /*code to call JMS services*/
method2();
}
@Transactional(propagation = Propagation.NOT_SUPPORTED)
public void method2()
{
batchService.runJobWithId(123L);
}
Try removing @Transactional(propagation = Propagation.NOT_SUPPORTED)
from method2()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With