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. I can get the two services to conflict and throw the following error, but this is as far as I've gotten: Exception constructing service 'DaoAuthenticationProvider': Error invoking service builder method nu.localhost.tapestry.acegi.services.SecurityModule.buildDaoAuthenticationProvider(UserDetailsService, PasswordEncoder, SaltSource) (at SecurityModule.java:267) (for service 'DaoAuthenticationProvider'): Unable to locate a single service assignable to type org.acegisecurity.providers.dao.SaltSource with marker annotation nu.localhost.tapestry.acegi.services.AcegiServices. -Dave On Fri, Mar 21, 2008 at 5:04 AM, Christian Gorbach <[EMAIL PROTECTED]> wrote: > > hmm..... > I'm also interested in a solution for this issue.. > anyone? > c)hristian > > > > > > > Robin Helgelin wrote: > > > > Any help on this? Howard? > > > > On Sun, Mar 16, 2008 at 12:16 PM, Robin Helgelin <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> This is my SaltSource service from tapestry5-acegi package. > >> > >> @Marker(AcegiServices.class) > >> public static SaltSource buildSaltSource(@Inject > >> @Value("${acegi.password.salt}") final String salt) { > >> SystemWideSaltSource s = new SystemWideSaltSource(); > >> s.setSystemWideSalt(salt); > >> return s; > >> } > >> > >> How do I go ahead a create an alias override for that? This code from > >> my example application seemed to work before I added the @Marker > >> annotation. > >> > >> public static void bind(ServiceBinder binder) { > >> binder.bind(SaltSource.class, > >> SaltSourceImpl.class).withId("MySaltSource"); > >> } > >> > >> public static SaltSource buildMySaltSource() throws Exception { > >> SaltSourceImpl saltSource = new SaltSourceImpl(); > >> saltSource.setSystemWideSalt("ANOTHERBEEFYSALT"); > >> saltSource.afterPropertiesSet(); > >> return saltSource; > >> } > >> > >> public static void contributeAlias(@InjectService("MySaltSource") > >> SaltSource saltSource, > >> Configuration<AliasContribution> configuration) { > >> configuration.add(AliasContribution.create(SaltSource.class, > >> saltSource)); > >> } > >> > >> > >> -- > >> regards, > >> Robin > >> > > > > > > > > -- > > regards, > > Robin > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/How-to-override-a-service-create-with-%40Marker-tp16077914p16194944.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]