Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Facade interface

843830Jan 7 2008 — edited Jan 8 2008
Hey,

I have SWT client that communicate with the server via facade.

The facade layer is a group of stateless session beans.

I want to get advices from you about handling exceptions.

1. As I mentioned above the fa�ade is stateless session bean (ejb3) and the transaction is CMT, which means that the transaction is closed and committed after my method ended. The problem with this is that the client gets unclear exceptions like DB vendor exception or hibernate exception in case of commit failure. I want to hear what are you doing?

2. If inner component in the server throw an exception the above layer wrap this exception and throw it to the layer above in case it catch the exception. In the fa�ade I cant wrap the exception I get and throw it to the client, because the client doesn�t know the inner server exception or third-party exception, so it will get class not found.. in order to solve this I have catch(Exception) in the fa�ade that throw new ServerClientException , but in this way I lose a lot of information regarded to the underline reasons to the exception. I be happy to hear your opinion about this.

Thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 5 2008
Added on Jan 7 2008
7 comments
243 views