You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "martijn.list" <ma...@gmail.com> on 2011/06/21 08:32:05 UTC

Is it possible te 'replace' ClientDataEncoder

I would like to use my own implementation of ClientDataEncoder. Is it
possible to replace the existing ClientDataEncoder with my own
implementation?

Kind regards,

Martijn Brinkers

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


Re: Is it possible te 'replace' ClientDataEncoder

Posted by "martijn.list" <ma...@gmail.com>.
On 06/21/2011 01:49 PM, Thiago H. de Paula Figueiredo wrote:
> On Tue, 21 Jun 2011 07:37:51 -0300, martijn.list
> <ma...@gmail.com> wrote:
> 
>> It took me some time to get rid of the "tapestry Construction of service
>> 'ServiceOverride' has failed due to recursion" error at startup but the
>> following lines added to the AppModule work
>> public static void bind(ServiceBinder binder)
>> {
>>   binder.bind(ClientDataEncoder.class, HMACClientDataEncoder.class).
>>         withId("HMACClientDataEncoder");
>> }
> 
> Plase try this:
> 
> public static void contributeServiceOverride(
>     MappedConfiguration<Class<?>,Object> configuration,
>         HMACClientDataEncoder override) {
>    configuration.add(ClientDataEncoder.class, override);
> }
> 

that seems to result in:

Construction of service 'ServiceOverride' has failed due to recursion:
the service depends on itself in some way.

Martijn

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


Re: Is it possible te 'replace' ClientDataEncoder

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 21 Jun 2011 07:37:51 -0300, martijn.list <ma...@gmail.com>  
wrote:

> It took me some time to get rid of the "tapestry Construction of service
> 'ServiceOverride' has failed due to recursion" error at startup but the
> following lines added to the AppModule work
> public static void bind(ServiceBinder binder)
> {
>   binder.bind(ClientDataEncoder.class, HMACClientDataEncoder.class).
>         withId("HMACClientDataEncoder");
> }

Plase try this:

public static void contributeServiceOverride(
	MappedConfiguration<Class<?>,Object> configuration,
         HMACClientDataEncoder override) {
    configuration.add(ClientDataEncoder.class, override);
}

-- 
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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Is it possible te 'replace' ClientDataEncoder

Posted by "martijn.list" <ma...@gmail.com>.
It took me some time to get rid of the "tapestry Construction of service
'ServiceOverride' has failed due to recursion" error at startup but the
following lines added to the AppModule work


public static void bind(ServiceBinder binder)
{
  binder.bind(ClientDataEncoder.class, HMACClientDataEncoder.class).
        withId("HMACClientDataEncoder");
}

public static void contributeServiceOverride(
	MappedConfiguration<Class<?>,Object> configuration,
        @Local ClientDataEncoder override)
{
  configuration.add(ClientDataEncoder.class, override);
}


HMACClientDataEncoder is the new implementation of ClientDataEncoder

Kind regards,

Martijn Brinkers


On 06/21/2011 08:32 AM, martijn.list wrote:
> I would like to use my own implementation of ClientDataEncoder. Is it
> possible to replace the existing ClientDataEncoder with my own
> implementation?
> 
> Kind regards,
> 
> Martijn Brinkers


-- 
Djigzo open source email encryption

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