I have a question about Spring 3.2.3 @Transactional annotation. My Service class looks like this:
@Service @Transactional
class InventoryDisclosureBO {
@Aut
You cannot call persist() from processDisclosureData() because it belongs to the same class and it will bypass transactional proxy created by Spring for InventoryDisclosureBO. You should call it from other beans to make @Transactional annotations work. When Spring injects a reference to InventoryDisclosureBO bean to other beans it actually injects a reference to InventoryDisclosureBOProxy which contains transactional logic, eg
class Bean2 {
@Autowire
private InventoryDisclosureBO idbo; <-- Spring will inject a proxy here
public void persist(InventoryDisclosureStatus data) {
idbo.persist(data); <-- now it will work via proxy
}
...