On Jun 9, 2008, at 4:47 PM, Dan Allen wrote:
On Mon, Jun 9, 2008 at 5:40 PM, Gavin King
<gavin(a)hibernate.org>
wrote:
> This is correct, it prevents some very wrong behavior when the
> component is invoked recursively.
Hmmm, so its one of those "damned if you do, damned if you don't".
There is one possible workaround. The Events component could skip the
METHOD context when looking up the observers. The other solution is to
use the example I gave and lookup the component outside of the METHOD
scope.
The Events context can push a new method context before raising an
event and pop it back afterwards to solve the problem, though I
suspect that would nullify that SFSB unwrapping protection that it
appears the method context interceptor was trying to solve. I'll have
to test it out.