[Acegisecurity-developer] JdbcDaoImpl overrides queries and mappings in initDao()
I'm trying to override the authorities by username query and mapping in a JdbcDaoImpl. JdbcDaoImpl extends JdbcDaoSupport which implements IntiliazingBean and defines a final afterPropertiesSet method which calls initDao(). Here's the cod from JdbcDaoImpl: protected void initDao() throws ApplicationContextException { initMappingSqlQueries(); } /** * Extension point to allow other MappingSqlQuery objects to be substituted * in a subclass */ protected void initMappingSqlQueries() { setUsersByUsernameMapping(new UsersByUsernameMapping(getDataSource())); setAuthoritiesByUsernameMapping(new AuthoritiesByUsernameMapping( getDataSource())); } Am I correct that this will effectively override any property config that you might have done in Spring? - Dave --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click ___ Home: http://acegisecurity.sourceforge.net Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer
Re: [Acegisecurity-developer] JdbcDaoImpl overrides queries and mappings in initDao()
Durham David R Jr Ctr 805 CSPTS/SCE wrote: Am I correct that this will effectively override any property config that you might have done in Spring? Yes, it will. Most people tend to change the SQL strings or subclass JdbcDapImpl, though, as opposed to provide a new AuthoritiesByUsernameMapping via a bean name="authoritiesByUsernameMappnig">. To avoid confusion I have removed the getters and setters for the MappingSqlQuery, so that people are forced to either use the query strings or subclass and override the MappingSqlQuerys. Committed to CVS. Cheers Ben --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click ___ Home: http://acegisecurity.sourceforge.net Acegisecurity-developer mailing list Acegisecurity-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acegisecurity-developer