At first catch i am expecting to handle exceptions that could be arise while
creating the transaction and in the second try block i am commiting the
transaction it gives error at the last final block side while commiting.
Dave Newton-4 wrote:
>
> --- oguzhan tortop <[EMAIL PROTECTED]> wrote:
>> Yes , i can see it clearly from console as far as i
>> guess when u call invocation.invoke() ; only the
>> result of action become target.
>
> Which HibernateException, the first one or the second
> one?
>
>> >> result = invocation.invoke();
>> >> [...]
>> >> catch (Exception e) {
>> >> hs.setRollBackOnly(true);
>> >> if (e instanceof HibernateException) {
>
> Just catch a HibernateException rather than doing an
> instanceof.
>
>> >> return Action.ERROR;
>> >> }
>> >> finally {
>> >> try {
>> >> hs.disposeSession();
>> >> return result;
>
> So will it return result (from the invocation) if
> *this* is the HibernateException being caught?
>
> d.
>
>
>
>
> ____________________________________________________________________________________
> Don't get soaked. Take a quick peek at the forecast
> with the Yahoo! Search weather shortcut.
> http://tools.search.yahoo.com/shortcuts/#loc_weather
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Struts-2-exception-problem-tf3525255.html#a9837688
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]