1 posts in topic
Flat View  Flat View

Posted By:   mohammad_rizwan
Posted On:   Thursday, September 26, 2002 08:08 AM

I have set transaction attribute of a method in sessionBean as Required, where in that method i am calling two entity beans, whose methods transaction attributes are required only. After second entity beans method failing the excepion thrown is not coming to exception part of Session Bean, but it is going to javabean from where i called session bean.
but the whole transaction is rolled back.
Can any one explain why i am not getting exception in catch block of session bean please?

Re: Transction+ExceptionHandling(Urgent)

Posted By:   Nick_Maiorano  
Posted On:   Thursday, September 26, 2002 06:50 PM


Without actually seeing the code, I can only think of 2 reasons why this is happenning:

1. In the session bean, you have no matching catch() statement capable of catching the exception but have declared it in the method. As a result, it is being propagating back to the java bean.

2. A runtime exception (such as a NullPointerException) is being thrown by your entity bean. Runtime exceptions do not propagate across rmi and so control goes back to your caller, in this case the java bean.

If my guess is right, you should deal with the runtime exception which is an indication of a programming error rather than trying to catch the exceptions.

Anyway, it's only a guess... hope this help!

About | Sitemap | Contact