Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
5.3.6, 5.4
Description
The commit after and persistence context annotations are required on the service interface definition thereby exposing internal implementation details (see below example from docs). Details of implementation should be hidden at the interface level, both these annotations break the rule.
Perhaps this code could appear in the Impl classes, or be provided in configuration somehow?
public interface UserDAO {
@CommitAfter
@PersistenceContext(unitName = "DemoUnit")
void add(User user);