How to perform rollback in Spring Data JPA for the following scenario?

```
Transactional
@Override
public Employee saveEmployee(EmployeeDto dto) {
    // check if EmployeeId and Department Id is present
    Employee employee = this.getByEmployeeId(dto);
    Department department = this.getByDepartmentId(dto);

    Employee employee = convertToEntity(dto, employee, department);
    employee.setEmployees(Arrays.asList(employee));
    department.setEmployees(Arrays.asList(employee));

    try {
        employee = employeeRepository.save(employee); //line-11
    } catch (DataIntegrityViolationException e) {
        throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "ConstraintViolationException", e.getCause());
    } catch (Exception ex) {
        throw new InternalServerException(HttpStatus.INTERNAL_SERVER_ERROR, env.getProperty(IConst.ERROR_DB_EXCEPTION), ex);
    }

    EmployeeEmployeeDepartment r = new EmployeeEmployeeDepartment();
    r.setId(new EmployeeDepartmentPK());
    r.setEmployee(employee);
    r.setDepartment(department);
    r.setEmployee(employee);

    try {
        compositeRepository.save(r); //line-22
    }catch (DataIntegrityViolationException e) {
        throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "ConstraintViolationException", e.getCause());
    } 
    catch (Exception ex) {
        throw new InternalServerException(HttpStatus.INTERNAL_SERVER_ERROR, env.getProperty(IConst.ERROR_DB_EXCEPTION), ex);
    }
    return employee;
}

```

How to roll back line-11 if line-22 fails?