bike part reward : setting bean ID property automatically

Brent Putman putmanb at georgetown.edu
Thu Feb 6 20:51:22 EST 2014


On 2/6/14 8:41 PM, Brent Putman wrote:
>
> I think that's done pretty easily automagically with a
> BeanPostProcessor that does something like:
>
> Object postProcessBeforeInitialization(Object bean, String beanName)
> throws BeansException {
>   if (bean instanceof IdentifiableComponent) {
>     ((IdentifiableComponent)bean).setID(beanName);
>   }
> }
>

Actually, looks like that interface doesn' define a setID method, and
even the abstract impls I see in java-support currently expose it as a
protected method, not public.  I can't look at any of our concrete impls
until I get back to a working Eclipse workspace, so I don't know if any
of them actually expose this in a useful way (probably not).  But
off-hand this general approach is the only way I see to do it
automatically, without redundant/verbose config.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20140206/22a724c1/attachment.html 


More information about the dev mailing list