Re: t5 Inject service to HttpSessionListener

2008-02-28 Thread anujith amaratunga
Thanks Mark. I've tried this approach, but as you say it builds you a new Registry. The problem is if you need a stateful service, i.e. a service which handles persistence. Depending on your configuration this might give you undesired results. The solution suggested by Ted, http://www.nabble.com

Re: t5 Inject service to HttpSessionListener

2008-02-28 Thread Ted Steen
We had the same problem. We created a static field (of the service type) in the HttpSessionListener and when the service was created (in buildService...) we assigned the service to the static field. We then could access the service from the HttpSessionListener via that static field. Yes, it sucks,

Re: t5 Inject service to HttpSessionListener

2008-02-28 Thread Mark W. Shead
On Feb 28, 2008, at 7:32 AM, anujith amaratunga wrote: Registry from the HttpSessionListener itself, so I can pull out my service. Is there a way to access the Registry from a non page, non service class? You can create a registry by doing something like: RegistryBuilder builder = new Regis