Skip to main content

@ApplicationException(rollback=true) does not rollback transaction

2 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ewernli
Offline
Joined: 2007-10-21

As a workaround, you can declare them in ejb-jar.xml will rollback=true. Then the exception will rollback transaction.

You can also double-check after deployment that the xml generated by Glassfish (can be found in domains/domain/generated/) match your expectation.

Mahesh Kannan

The bug is due to the fact that when the container asks our Deployment Object
Library for the list of app exceptions, in this case, the returned list doesn't
contain the app exception.

Also, it is to be noted that this bug happens only when app exceptions are
packaged this way. In other words app exceptions are NOT always ignored.

We are looking into this and the fix should be soon available.

Thanks,
--Mahesh

Witold Szczerba wrote:
> OMG - this bug is SO SERIOUS! We have found this bug in our application when our
> customer started complaining about inconsistent data across application
> (financial problems on accounts) with roots being many months back, when we
> started using Exceptions with @ApplicationException=true instead of plain
> RuntimeExceptions!
>
> For everyone interested - please vote for this bug. If you have paid
> support, please ask for update being delivered ASAP. This is not funny
> when there are inconsistent data, imagine:
> TRANSACTION {
> (1) $100,000 taken from account X
> (2) $100,000 to be placed into account Y - application exception
> }
>
> Now $100.000 is gone, taken from X and not transferred into Y. Poor
> customer, he/she just lost small amount of money :( And there are more
> poor customers, as this bug is happening always when exception is
> thrown.
>
> Please, vote for this issue:
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=5183
>
> Regards,
> Witold Szczerba
>
> 2008/6/19 :
>
>> Hi Cheng,
>>
>> Issue is reported. Issue number is 5183.
>>
>> Thanks again.
>> Robert
>> [Message sent by forum member 'robert74' (robert74)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=281334
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net