This content has been marked as final.
Show 4 replies
-
1. Re: how to add a CheckedAction to EJB3 app
marklittle Nov 24, 2008 7:28 AM (in response to mazz)In order to change the CheckedAction that is used by a transaction you need to grab the underlying transaction instance (BasicAction).
-
2. Re: how to add a CheckedAction to EJB3 app
mazz Nov 24, 2008 10:59 AM (in response to mazz)In order to change the CheckedAction that is used by a transaction you need to grab the underlying transaction instance (BasicAction).
I've posted a related question on the EJB3 forums to ask them how I can do this from within the context of a EJB3 app:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=146198 -
3. Re: how to add a CheckedAction to EJB3 app
mazz Nov 29, 2008 7:36 PM (in response to mazz)"mark.little@jboss.com" wrote:
In order to change the CheckedAction that is used by a transaction you need to grab the underlying transaction instance (BasicAction).
Ah-ha! OK, I see this in the API:/** * @return the thread's notion of the current transaction. */ public static BasicAction Current () { return ThreadActionData.currentAction(); }
So, it looks like all I need to do is call:
BasicAction.Current().setCheckedAction()
where setCheckedAction is:/** * Add the specified CheckedAction object to this transaction. * * @return the previous <code>CheckedAction</code>. * @see com.arjuna.ats.arjuna.coordinator.CheckedAction */ public final synchronized CheckedAction setCheckedAction(CheckedAction c)
I can call this within my EJB3 interceptor to do what I want. -
4. Re: how to add a CheckedAction to EJB3 app
marklittle Dec 1, 2008 7:31 AM (in response to mazz)Yes, that should do it.