On Tue, Apr 8, 2008 at 7:24 PM, Robin Helgelin <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 8, 2008 at 7:07 PM, Dave Dombrosky <[EMAIL PROTECTED]> wrote:
>  > Is there still no solution to this problem?  I am also trying to
>  >  override the default SaltSource, but the tapestry5-acegi package
>  >  always wants to use the one it defines.
>  >
>  >  I tried using contributions to Alias and AliasOverrides, and also
>  >  annotating my own buildMySaltSource() method with
>  >  @Marker(AcegiServices.class), but nothing seems to work.
>
>  Yes, I'll have a solution for this, I'll have a new 1.0.4-SNAPSHOT out
>  in a day or two that fixes this.

Ok, here we go. I've uploaded a 1.1.0-SNAPSHOT which fixes the problem
by introducing a new interface that only extends the acegi SaltSource
interface. I'll leave it as a snapshot for a few days, then I'll
release the 1.1.0 release.

>From my example project:
    public static void bind(ServiceBinder binder) {
        binder.bind(SaltSourceService.class,
SaltSourceImpl.class).withId("MySaltSource");
    }

    public static SaltSourceService buildMySaltSource() throws Exception {
        SaltSourceImpl saltSource = new SaltSourceImpl();
        saltSource.setSystemWideSalt("BBEEF");
        saltSource.afterPropertiesSet();
        return saltSource;
    }

    public static void
contributeAliasOverrides(@InjectService("MySaltSource")
SaltSourceService saltSource,
            Configuration<AliasContribution> configuration) {
        configuration.add(AliasContribution.create(SaltSourceService.class,
saltSource));
    }

-- 
 regards,
 Robin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to