Announcement Announcement Module
Collapse
No announcement yet.
Migrating Existing App to Spring Rich Client Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I find it's much cleaner to hide the app context behind a facade:

    Code:
    class ServiceLocatorImp implements ServiceLocator {
         public OrderService getOrderService() {
              return (OrderService) appCtx.getBean("orderService");
         }
    }
    This forces you to have a single point of control for all of you serivce lookups and also alows you to mix diferent lookup strategies behind the facade. For instance, you may still want to use JNDI for some services and the app context for others.

    Ollie

    Comment


    • #17
      Okay, Ollie, thanks for all the tips!

      Comment

      Working...
      X