Working with the Domain Driven Architecture
From Opentaps Wiki
Jump to navigationJump to search
Here are some tips for working with the Domain Driven Architecture:
Instantiating Services and Repositories
If you have a domain, the easiest way to instantiate a Service or Repository from your domain is to use the instantiateService or instantiateRepository methods, like this:
public OrderInventoryService getOrderInventoryService() throws ServiceException { return instantiateService(OrderInventoryService.class); }
This will automatically set up the Infrastructure and User for your Service or Repository.