sbuster
May 24th, 2005, 10:09 AM
Can someone give me some best practices for obtaining an ApplicationContext from within a Business Object. I have a struts web application which leverages the ContextListener stuff, but that is for "Action" classes. What do I do in my Business Object which needs access to another business object defined in Spring? I have an "order" business object which needs access to a "shipping calculator" business object, both defined in spring, but not a part of the action. Is it best to use ThreadLocal variables integrated with ContextListener, is it best to stor the ApplicationContext in JNDI? What is the best approach? How do I hook Business objects with Spring?
Thanks
Thanks