Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Hi, Looking at your example: 1) BOException Is a specific Exception class derived from 'Throwable' (i.e. BOException extends Throwable). This is a custom exception class which contains some of the transaction information (like connection name, username, userid etc.). 2) BOTransaction Is a transaction class containing transaction details As per case 1), since BOException contains transaction information it depends on BOTransaction. I think the problem is that the first exception is merely that. It should not need to import the transaction objects or extend them (I'm not sure which fron your example). The exception should have one or two properties which can be filled by the transaction object creating then exception and passing in the details to its constructor, for example throw new BOException("invalid user",connection()..); Hope I'm clear.
Replies: |
Sponsored Links
|