|
From: <jue...@we...> - 2004-10-10 09:21:31
|
Everybody, =20 I've reworked a couple of internal things over the past few days = (already committed): =20 * AbstractBeanFactory implements "destroyBean" functionality itself, = which was made possible by an earlier change in the dependency tracking = strategy. AbstractAutowireCapableBeanFactory is purely responsible for = actual bean instance creation now. =20 * DefaultListableBeanFactory's "getBeansOfType" is completely = reimplemented now, always detecting FactoryBeans correctly (no matter if = a FactoryBean implements other interfaces too or was registered as a = manual singleton). =20 * ProxyFactoryBean and AbstractPrototypeBasedTargetSource leverage = BeanFactory's new "getType" method now, to determine the type upfront = before fetching bean instances (usually for prototypes). This works for = child bean definitions etc too now, not just for conventional beans. =20 * The "invokeJoinpointUsingReflection" has moved from = aop.framework.AopProxyUtils to aop.support.AopUtils, to resolve a = subpackage interdependency (aop.framework should use aop.support, not = the other way round). =20 * JdkDynamicAopProxy handles the "hashCode" method locally now, just = like it does for "equals". This is mainly necessary for remoting = proxies, but also for consistent behavior of a proxy's "equals" and = "hashCode" methods (i.e. always return same hash code if equals). =20 * HttpInvokerClientInterceptor and RmiClientInterceptor handle = "toString" invocations locally now, returning a description of the = remoting proxy. "equals" and "hashCode" are handled locally too, through = JdkDynamicAopProxy (see above). =20 * I've moved the util.Assert class over from the sandbox, in a stripped = down fashion. It is used in a couple of places in the data access = support now, to catch null DataSource arguments etc early and in an = obvious fashion. Note that such stuff is usually caught by = afterPropertiesSet, but only inside a bean factory... =20 Regarding Assert: I've omitted all methods that use default messages = there, because I believe that this is bad practice. = Assert.nonNull(myRef) would throw a generic IllegalArgumentException, = which is not really more useful that an NPE... There needs to be a = specific message, for example: Assert.nonNull(ds, "No DataSource = specified"). =20 Most of the above is about improvements and optimizations in the = internals, also solving corner cases in behavior. While all tests pass = again, there could be undiscovered side effects: Therefore, I'd like to = encourage everybody to test the current CVS contents as thoroughly as = possible. 1.1.2 is still 4 weeks away, but it's never too early to start = testing :-) =20 Juergen |