1. Tapestry is built on top of an IOC container (called unimaginatively Tapestry IOC) 2. Services are added to the IOC registry by an IOC Module ( http://tapestry.apache.org/tapestry-ioc-modules.html) 3. Components often require Services 4. Component libraries can include a "Tapestry-Module-Classes" entry in their jar manifest which will cause tapestry to load additional IOC Modules 5. Tapestry IOC provides loads of goodies including service overriding, decorating and contributions
Some reading to get you started: http://tapestry.apache.org/ioc.html http://tapestry.apache.org/component-libraries.html On 2 Aug 2013 10:18, "Nikola Vulovic" <nivuk...@gmail.com> wrote: > do not know why? > Services are not very clear to me and documentation is unclear > it worked when I removed line > binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class); > > > On Fri, Aug 2, 2013 at 5:21 AM, Nikola Vulovic <nivuk...@gmail.com> wrote: > > > this is the error: > > java.lang.RuntimeException: Service id 'KaptchaProducer' has already been > > defined by > > org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) > (at > > KaptchaProducerImpl.java:34) via > > org.apache.tapestry5.kaptcha.services.KaptchaModule.bind(ServiceBinder) > (at > > KaptchaModule.java:38) and may not be redefined by > > org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl(Map) > (at > > KaptchaProducerImpl.java:34) via > > domaci850.services.AppModule.bind(ServiceBinder) (at AppModule.java:33). > > You should rename one of the service builder methods. > > > > This is appmodule > > import > org.apache.tapestry5.kaptcha.internal.services.KaptchaProducerImpl; > > import org.apache.tapestry5.kaptcha.services.KaptchaProducer; > > > > public static void bind(ServiceBinder binder) { > > // binder.bind(MyServiceInterface.class, MyServiceImpl.class); > > // Make bind() calls on the binder object to define most IoC services. > > // Use service builder methods (example below) when the implementation > > // is provided inline, or requires more initialization than simply > > // invoking the constructor. > > binder.bind(KaptchaProducer.class, KaptchaProducerImpl.class); > > } > > Added library's > > tapestry-kaptcha-5.3.7.jar > > kaptcha-2.3.2.jar > > kaptcha-2.3.2-jdk14.jar > > > > What should be renamed? > > Thanks for help > > > > -- > > Pozdrav Nikola Vulovic > > > > > > -- > Pozdrav Nikola Vulovic >