[jbossts-issues] [JBoss JIRA] (JBTM-1338) Provide an async commit feature hanging off UserTransactionImple

Ales Justin (JIRA) jira-events at lists.jboss.org
Tue Jan 8 19:03:09 EST 2013


    [ https://issues.jboss.org/browse/JBTM-1338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744189#comment-12744189 ] 

Ales Justin commented on JBTM-1338:
-----------------------------------

OK, got it working.

final class AsyncTxHelper {
    private static final String GET_TM = "getTransactionManager";
    private static final String COMMIT_ASYNC = "commitAsync";

    static Future<Void> commit(Object tx) {
        if (tx != null) {
            try {
                if (tx instanceof TransactionManager) {
                    tx = ReflectionUtils.invokeStaticMethod(tx.getClass(), GET_TM);
                }
                return (Future<Void>) ReflectionUtils.invokeInstanceMethod(tx, COMMIT_ASYNC);
            } catch (Exception ignore) {
            }
        }
        return null;
    }

                
> Provide an async commit feature hanging off UserTransactionImple
> ----------------------------------------------------------------
>
>                 Key: JBTM-1338
>                 URL: https://issues.jboss.org/browse/JBTM-1338
>             Project: JBoss Transaction Manager
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: JTA
>            Reporter: Tom Jenkinson
>            Assignee: Tom Jenkinson
>             Fix For: 4.17.3, 5.0.0.M2
>
>
> Equivalent of https://github.com/capedwarf/capedwarf-blue/blob/master/datastore/src/main/java/org/jboss/capedwarf/datastore/JBossTransaction.java#L257

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossts-issues mailing list