From: Marc P. <ma...@an...> - 2005-12-11 16:17:56
|
On 10 Dec 2005, at 01:18, Lane Sharman wrote: > public class GlobalWM { > private static WebMacro _wm = new WM(); > > public static WM getInstance() { > return _wm; > } > > this is really all you need and the method need not be synchronized > because a class load is synchronized. Good point - but we can't do that really, I think we do need to use ServletBroker and that WM ctor is not going to work for us is it. If you remember, I had to add new methods to the servlet brokers in WM 2.0 to pave the way for the JSP taglib, because the ServletContext is not known until the taglib is invoked, which is an arbitrary time after the taglib object is intantiated. So we need some syncing I believe. Cheers + |