[jboss-jira] [JBoss JIRA] (JBJCA-1329) No error message on concurrent processing of the same inflow transaction

Stefano Maestri (JIRA) issues at jboss.org
Thu Aug 25 05:25:00 EDT 2016


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

Stefano Maestri commented on JBJCA-1329:
----------------------------------------

I believe is not a bug and it's up to the listener to manage the error condition.
As you can see from the log the WorkCompleted event has the right WorkCompletedException. Looking in 10.3.3.3 and 10.3.3.5 it's correct to have a WorkCompleted event since WorkCompletedException can be set only on this event, while WorkRejected could have only WorkRejectedException.
So the portion of spec you are quoting (it's in 15.4.4) is asking to set a proper WorkCOmpletedExcption, that is in fact how the application server is rejecting Work submission.

> No error message on concurrent processing of the same inflow transaction
> ------------------------------------------------------------------------
>
>                 Key: JBJCA-1329
>                 URL: https://issues.jboss.org/browse/JBJCA-1329
>             Project: IronJacamar
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: WildFly/IronJacamar 1.3.4.Final
>            Reporter: Ondra Chaloupka
>            Assignee: Stefano Maestri
>         Attachments: JcaInflowTransactionTestCase_multipleWorkSharedXidInBunch_jta_server.log
>
>
> I experience losing messages when they are received with the same xid when messages are received in parallel. This means case that prior message is not yet fully processed when meanwhile new message is promoted for being processed.
> This is the scenario which behaves wrong by my view
> * EIS passes a message with xid1 to RAR to be processed
> * first message is passed as work to be process (stays in progress)
> * EIS passes a second message with xid1 to RAR to be processed
> * the second message is forgotten. It will never reach a {{MessageListner}}
> ** no error is returned or shown in log
> Compared following scenario passes without a problem.
> * EIS passes a message with xid1 to RAR to be processed
> * first message is fully processed with {{MessageListner}} (it reaches the end of the _onMessage_ method)
> * EIS passes a second message with xid1 to RAR to be processed
> * second message is processed by {{MessageListener}}
> From logging I can see that work was cancelled [2] by call of WorkWrapper [1]. But any information is forgotten. There is no error message in the log and there is wrong type and listnener methods called ({{javax.resource.spi.work.WorkListener}}  by {{workCompleted}} with work type defined with status 4) for such messages.
> If I do understand right the jca specification says that {{WorkCompletedException}} needs to be shown[3].
> [1] https://github.com/ironjacamar/ironjacamar/blob/1.3/core/src/main/java/org/jboss/jca/core/workmanager/WorkWrapper.java#L459
> [2]
> {code}
> 2016-08-25 09:28:32,688 TRACE [org.jboss.jca.core.workmanager.WorkWrapper] (default-threads - 4) Cancel work: WorkWrapper at 1755d562[workManger=org.jboss.as.connector.services.workmanager.NamedWorkManager at dcb0b17[id=org.jboss.as.test.jbossts.crashrec.jca.rar.TestResourceAdapter-default name=default specCompliant=true shortRunningExecutor=org.jboss.jca.core.workmanager.StatisticsExecutorImpl at 5c446e25 longRunningExecutor=org.jboss.jca.core.workmanager.StatisticsExecutorImpl at 170ccc4f xaTerminator=org.jboss.jca.core.tx.jbossts.XATerminatorImpl at 57da418e validatedWork=[org.jboss.as.test.jbossts.crashrec.jca.rar.TxnWork, org.jboss.as.test.jbossts.crashrec.jca.rar.TestResourceTxnWorkUnit] callbackSecurity=null securityIntegration=org.jboss.jca.core.security.picketbox.PicketBoxSecurityIntegration at 78ad9dc3 resourceAdapter=org.jboss.as.test.jbossts.crashrec.jca.rar.TestResourceAdapter at fc1a5071 shutdown=false activeWorkWrappers=[WorkWrapper at 5715513d] statistics=WorkManagerStatistics at 71bdb84[active=1 successful=6 failed=0 doWorkAccepted=0 doWorkRejected=0 scheduleWorkAccepted=6 scheduleWorkRejected=0 startWorkAccepted=0 startWorkRejected=0]] work=org.jboss.as.test.jbossts.crashrec.jca.rar.TxnWork at 241d1e13 xid=formatId=4660 gtrid(64)={0x7f00000100000000010000002a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000} bqual(64)={0x7f00000100000000010000002a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000} txTimeout=-1 workListener=org.jboss.as.test.jbossts.crashrec.jca.rar.TestResourceWorkListner at 40b572b1 workContexts=null exception=javax.resource.spi.work.WorkCompletedException: ARJUNA016068: Work already active!, error code: 2]
> {code}
> [3]
> {quote}
> The application server must reject Work submissions for a transaction whosecompletion is in-progress, with a WorkCompletedException set to the errorcode WorkException.TX_CONCURRENT_WORK_DISALLOWED.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jboss-jira mailing list