Moving some DataConnector related classes over to -api
Rod Widdowson
rdw at steadingsoftware.com
Mon Oct 3 03:21:55 EDT 2016
> I saw the comment about having the c'tors calling initialize, but can't we leave that to Spring to handle? We already have cases
where
> some classes have c'tors that take parameters, but there are still properties available to set, so assuming initialization is done
at
> constructor time may not be true. That's yet another problem with mixing the metaphors.
Yes, but....
It's a bit subtle. My idea here is that people who have working spring-resource based configurations need to be able to continue
working between 3.2 and 3.3.
Now we are completely within our rights to say "you used and impl class, live with it", but based on that assumption:
The problem is that some of these classes have not become initializable. This means that the spring-resources file may not have the
magical default-init-method="initialize" default-destroy-method="destroy" in the <beans> statement.
Without this the configuration will not be loadable because of the code I added which requires that we be initialized before we are
used.
You can see that tripped up on this if you look at the changes I needed to make to
n/s/i/a/r/spring/dc/rdbms/rdbms-attribute-resolver-spring-context.xml
in the idp-attribute-resolver project.
The reason that this is needed goes back to the fact that the parsing for spring-resources is done in an entirely different context
(we do not inherit global.xml) so we need to respecify everything at the top if we want to use it.
Assuming a desire to make the configuration compatible we cannot expect people to make such changes to their configurations. Hence
the hideous "initialize in the constructor, swallow the ComponentInitializationException and throw a ConstraintException" code.
A motivation for me here is that by separating the "good code" from that muck I'll feel less nauseous.
Of course we can say "You used an impl, we never documented them, live with it". I would be surprised if there were many sites
using this except sites run by people who are active in this list.
Rod
More information about the dev
mailing list