What, you mean like the line immediately above where he threw the
exception?  :-)

-- 
Danny Yates
 


-----Original Message-----
From: Dan Christopherson [mailto:[EMAIL PROTECTED] 
Sent: 24 July 2003 15:27
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] JBoss Transaction Problems


Per the EJB spec, throwing an application exception doesn't cause a 
rollback. call setRollbackOnly on the bean's context object.

Nikolay Ganev wrote:
> hi all,
> 
> I tried to test CMT using JBoss.
> I made simple example using Session Statefull Bean updating the
> database...
> there is method that intentionally throwing exception - and i hoped
> that all changes will be rollback but they didnt
> i send u some code and XML settings:
> method:
> .........
> updateChecking(checkingBalance);
>             if (checkingBalance < 0.00)
>             {
>                 context.setRollbackOnly();
>                 throw new InsufficientBalanceException();
>             }
> .....
> 
> in ejb-jar.xml
> <container-transaction>
>             <method>
>                 <description />
>                 <ejb-name>Bank</ejb-name>
>                 <method-name>*</method-name>
>             </method>
>             <trans-attribute>Required</trans-attribute>
>         </container-transaction>
> 
>    could anyone help me why this transaction doesnt work?
> 
>   
> 




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


_____________________________________________________________________ 
Notice to recipient: 
The information in this internet e-mail and any attachments is confidential
and may be privileged. It is intended solely for the addressee. If you are
not the intended addressee please notify the sender immediately by
telephone. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it,
is prohibited and may be unlawful. 

When addressed to external clients any opinions or advice contained in this
internet e-mail are subject to the terms and conditions expressed in any
applicable governing terms of business or client engagement letter issued by
the pertinent Bank of America group entity. 

If this email originates from the U.K. please note that Bank of America,
N.A., London Branch, Banc of America Securities Limited and Banc of America
Futures Incorporated are regulated by the Financial Services Authority.
_____________________________________________________________________ 




-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to