Doing delete and create in same transaction so that rollback happens if any of them fail

I am trying to do delete and create of a pojo from inside the component. First I do the delete and then call save to create it again. The problem is that when the save fails, the delete isn't getting rollbacked.

public Item itemDeleteAndCreate(@NonNull Item itemToUpdate, Long itemId, @NonNull Item item) throws ParseException, IOException {
//        validateSchema(item);
    Map<String, Object> exclusionTagsIfExist = exclusionRulesComponent.calculateExclusionTagsForProduct(item.getProductAttributes());
    Map<String, Object> itemAttribute = item.getProductAttributes();
    itemAttribute.put(EXCLUSION_TAGS, exclusionTagsIfExist);
    updateImageUrlWithImageData(item);"Final item to be patched -> %s ", item.toString()));

    //ItemService itemService = new ItemService(itemBuilder);
    //return itemService.deleteAndCreate(itemToUpdate,item);
    Item updatedItem =;
    return updatedItem;

This is the controller from where the component is called.

public class ItemController extends AbstractController<Item, Long> {
private final ItemComponent itemComponent;
private final ItemBuilder builder;

@RequestMapping(method = {RequestMethod.POST})
public ResponseEntity<?> save(@RequestBody @NonNull Item item,
                              @NonNull final HttpServletRequest request) {"Received request to save " + item);

    try {
        Item savedItem =, request);

From, itemDeleteAndCreate is called like this

Item updatedItem = itemDeleteAndCreate(itemToUpdate, itemId, item);

I have enabled transaction in my config through EnableTransactionManagement. I have also tried mode as AdviceMode.ASPECTJ but even that isn't helping.

Also I have tried writing wrapper class and putting this function in there and then creating an object of that class and calling this function on that object.

The Builder class eventually call Dao of crudRepository which also has a transactional annotation on its delete and save function.

This function is called from controller which doesn't have @transactional on it.

Also I have tried propagation level of acquires new but even that didn't work.

I have also tried rollbackfor Exception.class but even that doesn't work.

Any help would be appreciated.