On Thu, 06 Oct 2011 11:24:39 -0300, josete <mual...@gmail.com> wrote:

Hi guys !

Hi!

I do need some behaviour in Tapestry already available to me via CDI in a
non-web Application.

I guess you're talking about Tapestry-IoC, not Tapestry (which is the web framework).

Let me explain myself :
I have a product, made for different customers.
The product is the same, but for some different implementations of common
services each one has.
For example :
com.mycompany.product.service.customer1.SubscribeService
com.mycompany.product.service.customer2.SubscribeService
com.mycompany.product.service.customer3.SubscribeService

This sounds like service overriding to me: have a module declare a default implementation, and other modules can override them. More details here: http://tapestry.apache.org/ioc-cookbook-overriding-ioc-services.html.

I believe that dinamically adding a service to  the  public static void
bind(ServiceBinder binder) in the AppModule is not the wright way to achieve it.

You can have different module classes, each having different services and service overrides (http://tapestry.apache.org/tapestry-ioc-modules.html), and just add the needed module when instantiating the Registry (http://tapestry.apache.org/starting-the-ioc-registry.html).

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to