It would probably be best to process the events from a thread local queue executed within a single, ordered last (interposed), synchronisation. Nevertheless, it seems this implementation would require a spec change in CDI. Ive created an issue under the spec but there never has been any interest, so Ive just built my own event library and only use CDI for injection currently. With this weird handling, the after transaction handlers are just too limited and quirky to make sense for me. |