You need to add the @Transactional
annotation to the public User addUser(String name, String surname)
method other wise the method will execute in a non transactional way.
@Transactional
uses proxy mechanism to implement transactional support, it will be invoked only when you call the method from a second object (ie If you call a method within the same class it will not go through the proxy system so it will always run using the callers transaction).