Hi
I think there's a small typo in the documentation in
http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html
In the section : Injecting dependencies
==============================================
For example, let's say the Indexer needs a JobScheduler to control when
it executes, and a FileSystem to access files and store indexes.
public static Indexer build(JobScheduler scheduler, FileSystem fileSystem)
{
IndexerImpl indexer = new IndexerImpl(fileSystem);
scheduler.scheduleDailyJob(indexer);
return indexer;
}
Here we've annotated the parameters of the service builder method to
identify what service to inject for that parameter.
================================================
But there's no anotation at all so I think the author meant
==============================================
For example, let's say the Indexer needs a JobScheduler to control when
it executes, and a FileSystem to access files and store indexes.
public static Indexer build(@InjectService JobScheduler scheduler,
@InjectService FileSystem fileSystem)
{
IndexerImpl indexer = new IndexerImpl(fileSystem);
scheduler.scheduleDailyJob(indexer);
return indexer;
}
Here we've annotated the parameters of the service builder method to
identify what service to inject for that parameter.
================================================
Michael.
/ /