Wow, spot on Filip!  Thanks very much for the tip.  Everything is working
now.

So folks, as of 5.0.15, the only way to inject a service into another
service is through the constructor.

Eric


Filip S. Adamsen-2 wrote:
> 
> Hi,
> 
> Sounds like you tried using @Inject and friends to inject the services? 
> This won't work.* You'll need to use constructor injection instead:
> 
> public class ServiceImpl implements Service {
> 
>    private final AnotherService anotherService;
> 
>    public ServiceImpl(AnotherService anotherService) {
>      this.anotherService = anotherService;
>    }
> }
> 
> * Except in the unreleased Tapestry 5.0.16, where this has been added. 
> See https://issues.apache.org/jira/browse/TAP5-231 for more information.
> 
> -Filip
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--How-to-get-to-ApplicationGlobals-and-ServletContext-tp19797812p19831048.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to