Service implementations that use Iterator 's and other data structures that are lazily loaded from the underlying data store should be annotated with @Transactional . @Transactional d escribes transaction attributes on a method or a class.The first method from a class annotated @Transactional in the call stack will start a transaction. When that method terminates (ends, returns, or throws exception), then the transaction will be committed or rolled back. If a transactional method directly or indirectly invokes another transactional method, only one transaction is started. There are ways to start a second transaction, consult the @Transactional javadocs for more details. Also you may be able to locate a @NonTransactional which is just a markdermarker, this annotation has no effect in the application at runtime. It is only used by unit tests which seek to enforce/confirm that the transactional policy is being applied. Please read javadocs for additional details. |