Working with the Domain Driven Architecture

From Opentaps Wiki
Revision as of 00:48, 5 December 2008 by Sichen (talk | contribs) (Instantiating Services and Repositories)
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.