Hello, My 2 cents.. Afaik ServiceLocator is used mainly for looking up JNDI objects, because it saves you from instantiating a new Context Every time..
It seems that what you are talking about is a Business delegate Factory? If that is the case, you could use a plugIn for your factory, since It has application context scope.. Behind BD you can either use session or not... and the BD will use ServiceLocator singleton to lookup your JNDI objects... Hope this helps Regards marco -----Original Message----- From: Koon Yue Lam [mailto:[EMAIL PROTECTED] Sent: 12 July 2004 09:19 To: [EMAIL PROTECTED] Subject: Struts design problem, any help? Hi, I am very new in Struts. Can anyone give me some suggestion on the design of a Service Locator ?? I use ActionServlet as a front controller, and dispatch request to various Action, then I want all the Actions access my business tier only by the Service Locator, which return an interface of the requested service. I don't want to use session bean currently but I want my design can upgrade to session bean easily. So I think using a Service locator and return an interface of a business service is similiar to the EJBHome / EJBRemote concept. Which I can easily upgrade my application to using session bean. However how can I implement the Service Locator? Is it a POJO / Servlet / or another Struts Action ?? I try to implement it as a POJO Singleton and then share by many request, but do I need to program the multi-thread part of this POJO Service Locator by myself ?? What happen if a large number of concurrent request to that Service Locator? Any help would be appreciate Regards --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]