TransactionParticipants get called by the TransactionManager using
abort callbacks, but for
situations where one needs access to the Context in a deeper class,
called by the participant (i.e. Managers), we now have a couple of
static ThreadLocal based methods:
Context getContext()(in case your Serializable is actually an instance of
Long getId ()
Please note returned values may be null when run outside the TM life-cycle.
Also note that the TM takes care of PAUSED transactions, setting
these values on the resumed thread.
See ChangeLog – 6da5f3 for details.