hi all, I solved my problem!! the problem was in the database - i use MySQL 4.1. I tried the same example using MSSQL2000 and it works!! can anybody tell me what to do in order to run transaction on MySQL???
DC> Per the EJB spec, throwing an application exception doesn't cause a DC> rollback. call setRollbackOnly on the bean's context object. DC> 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? >> >> >> DC> ------------------------------------------------------- DC> This SF.Net email sponsored by: Free pre-built ASP.NET sites including DC> Data Reports, E-commerce, Portals, and Forums are available now. DC> Download today and enter to win an XBOX or Visual Studio .NET. DC> http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 DC> _______________________________________________ DC> JBoss-user mailing list DC> [EMAIL PROTECTED] DC> https://lists.sourceforge.net/lists/listinfo/jboss-user -- Best regards, Nikolay mailto:[EMAIL PROTECTED] ------------------------------------------------------- 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