java - What is the best way to encapsulate multiple service calls using Spring? -
i need call 1 third party service , if succeeds, call service of application. best approach encapsulate calls? , ensure become single transaction?
for example, call services in 1 single point:
public class thirdpartyservice(){ sendproduct(){ // call external service } } public class productservice(){ confirmproduct(){ // stuff } }
Comments
Post a Comment