I've got a problem with my Spring-Boot Application. I'm trying to send a notification after i get a result from my function with @Transactional, but @Transactional doesn't work, the rollback doesn't work. This is the code.
@Service
public class ParkingServiceImpl implements ParkingService {
@Override
public void getParkingFromBOAsyncWrapper() {
ArrayList<BOUserParking> listUserParkingfromBO = getParkingFromBOTransaction();
/** Send notification **/
if(listUserParkingfromBO!=null){
notificationService.sendNotification(listUserParkingfromBO);
}
}
@Transactional
@Override
public ArrayList<BOUserParking> getParkingFromBOTransaction() {
// .... insert or update on db
}
}