[webbeans-dev] multi-phase transactional observers

Gavin King gavin at hibernate.org
Wed Dec 3 16:39:21 EST 2008


An issue that came up from the RI team was whether a transactional
observer can observe multiple phases, for example:

   void doSomething(@Observes @BeforeTransactionCompletion
@AfterTransactionCompletion SomeEvent se) { ... }

I think it's a bad idea to allow this, since it breaks the model of
one observer invocation per event fired, and because there's no real
way for the observer method to distinguish between the different
phases.

So unless anyone objects, I'm going to go ahead and clarify that this
is not supported in the spec.

-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org



More information about the weld-dev mailing list