I have an interface for a Service object that looks something like the following (simplified for brevity):
public interface ItemService {
public Item getItemB
As @Wouter mentioned one alternative is using asynchronous messaging techniques. I can think of 2 other approaches:
ItemService
get stored in database table after commit (so on rollback they are not avialable). A background (async) job examines the events and calls the appropriate services. You could call it 'selfmade JMS'. Possible alternative if messaging infrastructure is not available.I guess a final answer is not possible as it really depends on the details of your system, especially all the external services that get triggered by the events.