package devopsdistilled.operp.server.service.impl;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

import org.springframework.stereotype.Repository;

import devopsdistilled.operp.server.model.Item;
import devopsdistilled.operp.server.service.ItemService;

@Repository("ItemService")
public class ItemServiceImpl implements ItemService {

    @PersistenceContext
    private EntityManager em;

    @Override
    public Item createItem(String name) {
	Item item = new Item();
	item.setName("Test Item");
	em.persist(item);
	return item;
    }

}

@@ -180,16 +180,81 @@
 ository;
+%0Aimport org.springframework.transaction.annotation.Transactional;
 %0A%0Aimport
@@ -380,16 +380,31 @@
 rvice%22)%0A
+@Transactional%0A
 public c

add @Transactional