OK, i figured it out, I didn;t realise you can inject services into the contribute methods:

something like...

   public static void contributeBindingSource(
MappedConfiguration<String, BindingFactory> configuration,
                           BindingSource bindingSource,
                           @InjectService("SymbolSource")
                           SymbolSource symbolSource
   ) {
       configuration.add("list", new ListBindingFactory(bindingSource));
       configuration.add("symb", new SymbolBindingFactory(symbolSource));
   }


(IoC on steroids !!)


Joel Halbert wrote:
Hi,

I am writing a binding for looking up symbols. In my binding factory I need access to the SymbolSource service.

How can you access a T5 Service within a class that is not managed by Tap IoC (thus the dependency can not be injected) and does not have access to the ServletContext (thus the dependency can not be looked up manually from the Registry (the registry is set as a servlet context parameter)) ?

Thx
Joel


--
SU3 Analytics Ltd
61b Oxford Gardens
W10 5UJ
London

Tel: +44 20 8960 2634
Mob: +44 75 2501 0825
www.su3analytics.com

SU3 Analytics Ltd is a company registered in England and Wales under company 
number 06639473 at registered address 61b Oxford Gardens, London W10 5UJ, 
United Kingdom.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to