On Tue, 2003-12-09 at 13:55, Berin Loritsch wrote: > [EMAIL PROTECTED] wrote: > > When using struts and an embedded fortress container as service > > provider, where should the container live? > > - jndi-tree > > - servlet-context > > - application-context > > - session > > > > Does anyone have experience with this? Any "best practices"? > > THe most common approach is to store the reference to the container > in the JNDI tree.
I like using the ServletContext, but it all depends on if you want a single container per webapp or per server. Also, I tend to just put the fortress ServiceManager in the context. This is all I generally need. If I'm using the JNDI tree, then i'll usually find a way to map individual services (like EJB's) into the tree and not the whole container/serviceManager. Best solution for Struts is to create your own AbstractAction of some sorts and have a "Object getService(String name)" method defined. That way you can easily experiment with each methodology without changing the code in each action that needs a service. Also, search the mailing list archives for "struts" and you'll find some previous threads on this subject. -- jaaron <http://jadetower.org> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
