<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 2/6/14 8:41 PM, Brent Putman wrote:<br>
</div>
<blockquote cite="mid:52F439E6.9050101@georgetown.edu" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<br>
I think that's done pretty easily automagically with a
BeanPostProcessor that does something like:<br>
<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<tt>Object postProcessBeforeInitialization(Object bean, String
beanName) throws BeansException {</tt><tt><br>
</tt><tt> if (bean instanceof </tt><tt>IdentifiableComponent) {</tt><tt><br>
</tt><tt> ((IdentifiableComponent)bean).setID(beanName);</tt><tt><br>
</tt><tt> }</tt><tt><br>
</tt><tt>}</tt><br>
<blockquote
cite="mid:CAMNmQDRU0c9jTpGHT7D9GMg0BBUBtko74vuKzrj40YoNgQR3dg@mail.gmail.com"
type="cite"> </blockquote>
<br>
</blockquote>
<br>
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.<br>
<br>
<br>
</body>
</html>