ObjectFilter and Collections -- Why Communities are Important
I have been wrestling with handling collections in a robust manner in ObjectFilter for a while. The initial implementation cheated, it returned a different, unmodifiable collection. The next implementation cheated, it returned a different collection which delegated everything important to the real one. The next implementation was going to cheat again, it would return a cglib generated proxy which acted like the second impl, but got rid of nasty class cast exceptions on returns expecting the concrete impl. All of these basically sucked.
So I explain the problem to my friend Shaun and in five minutes he points out that instead of advising the collection it should be advising the calls to the collection. Duh. This makes the collection advice simply a special case of the property advice where it pretends that the instance doesn't exist instead of [nulling|throwing exception|whistling dixie].
More importantly, it points out how screamingly important it is to ask other people when you are stuck =)
0 writebacks [/src/java/aop] permanent link
I Want Change Listeners on Collections
I really want to be able to put a change listener on a java.util.HashMap
-- not a java.util.Map
. Requiring people to run with an instrumented rt.jar probably isn't an option.
3 writebacks [/src/java] permanent link
Everything has just been confirmed, I am a BOF speaker at JavaOne this year! BOF-2911 "Building Fault-Tolerant Enterprise Application" =)
That said, I am looking forward to watching Cedric, Gregor, James, and Graham in their cage match ;-)