Re: Access the ApplicationGlobals inside the "AppModule::bind()" method

2008-10-07 Thread Ulrich Stärk
After you defined the PropertiesFileSymbolProvider, you have to contribute it to the SymbolSource service (see the HOWTO). Afterwards you can just @Inject @Symbol("your-symbol-name-here") final String something into your service builder method, e.g. public YourService buildYourService(@Inject @Sym

Re: Access the ApplicationGlobals inside the "AppModule::bind()" method

2008-10-07 Thread Ville Virtanen
Just bind(@Inject @Symbol("some.identifier") String someSymbol) I think. This initiates the construction of symbolsource, which in turn calls the contribute in your appmodule which initiates the construction of the PropertiesFileSymbolProvider which reads the file. And btw, I would recommend h

Re: Access the ApplicationGlobals inside the "AppModule::bind()" method

2008-10-07 Thread Edouard sur edouardmercier.fr
Thank you for this very quick and clear answer! Does it mean that I will be able to inject the "PropertiesFileSymbolProvider" object inside the "AppModule::bind(ServiceBinder binder, @InjectService("PropertiesFileSymbolProvider") SymbolProvider propertiesFileSymbolProvider)" method this way? Or sh

Re: Access the ApplicationGlobals inside the "AppModule::bind()" method

2008-10-07 Thread Ulrich Stärk
Some of us (including me) tried to do the same thing but failed. See here http://markmail.org/message/hdcboxjrxkrgruyy for the discussion. It seems to come down to the order in which services are instantiated. By the time your service is being instantiated, the ServletContext has not yet been set i