Hi Frank,
Have a read of Martin Fowler's article on deciding which option best
suits you:
http://martinfowler.com/articles/injection.html
As Dave described you have many possibilities, but the common techniques
are (not in order of preference):
a. Use a ServletContextListener to to setup your services and place
them in Application Scope. Look them up from your action
b. as per b, but include an interceptor to inject them into your
actions based on interfaces (eg.MyServiceAware)
c. Setup your business services as Singletons or accessed through a
Registry (setup as per a)
d. Use an IOC container. Spring and Guice. Guice is simple, elegant
and does this single task extremely well; Spring knowledge is a
must-have and reflects the community's consensus on best-practice in
almost every imaginable aspect of a web application.
Hope that helps.
Jeromy Evans
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]