Since it should not store the element instance in the LocaleProvider instance. The instance will be constructor through IoC and the element instance is not known in that context. It's also much more appropriate since the element instance changes at each request, and otherwise you'd have to create a new LocaleProvider instance for each request.
If we want to avoid creation of LocalProvider instance with each element instance, the only way I see is to store the LocalProvider in a global variable. Is it right?

No, if they are injected through IoC, the reference factory can either provide the LocalProvider as a singleton, either instantiate it at each use. This can then be injected into a property. We still need to add simple reference factory features to RIFE itself currently it delegates that to a repository participant where you either do it in plain Java or interface with an IoC container like Spring or Pico.

--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to