It sounds somewhat like you are trying to "share" a configuration between
two or more services.

This was legit in HiveMind (the precursor to Tapestry 5 IoC).  However, in
the vast majority of cases, each service had at most one configuration
associated with it (often sharing the same name as the service) and the
sharing of configurations between services was rare.

As a way to simplify things, in Tapestry 5 IoC, each service is allowed a
single configuration.  This effectively unifies service names with
configuration names.

In the situations where I have two services, A and B, that share a
configuration, my approach has been to create a third service, C.  C owns
the configuration, and its service interface defines methods needed by A and
B to access that configuration data.

Often I've found that A and B don't need the raw configuration data, they
need "cooked" data, derived from the raw configuration data.  For instance,
the configuration data may include Class objects, and the other services may
need instances of those Classes.  Thus the C service can be responsible for
instantiating and caching those objects.  Many other similar cases are
present in the Tapestry source code.  This is a great separation of
concerns, and I think that your hypothetical tests for services A and B will
be simpler, clearer and more effective because of it.



On 8/29/07, Carlos Delfino Carvalho Pinheiro <
[EMAIL PROTECTED]> wrote:
>
>   Hi Howard Lewis!!!
>
>
>
> Dear,
>
>
>
> My name is Carlos Delfino, I AM work in one site like Orkut and LinkedIn
> with Tapestry 5.0.5, and I am trying create one service for use JPA on
> Tapestry 5, like "Tapestry Hibernate". However I use the Tapestry Hibernate
> when base for work.
>
>
>
> But I don´t know how I transfer configuration for services, I think use
> contribute Methods but if this correct method who I get the configuration on
> services.
>
>
>
> In the Tapestry Hibernate, the HibernateModule class is only a example? or
> is need for make the new service module.
>
>
>
> Thanks.
>
>
>
> --
>
> ¨~^.^~¨~^.^~¨~^.^~¨~^.^~¨~^.^~¨~^.^~¨
>
> Carlos Delfino -  [image: call_blue_white_124x52]
>
> Consultoria e Gestão de Projetos no Terceiro Setor
>
> http://www.linkedin.com/in/carlosdelfino
>
> ¨~^.^~¨~^.^~¨~^.^~¨~^.^~¨~^.^~¨~^.^~¨
>
>
>
>


-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

Reply via email to