Is there any design pattern which deals with exception handling issues in J2EE architecture?
On a different note... Does anybody know when is the EJB design patterns book mentioned on this website is coming out and where can I buy it from?
Thanks,
Vipul
-
Any design pattern for Excpetion handling? (7 messages)
- Posted by: Vipul Sagare
- Posted on: October 29 2001 16:29 EST
Threaded Messages (7)
- Any design pattern for Excpetion handling? by Lofi Dewanto on October 30 2001 03:49 EST
- Any design pattern for Excpetion handling? by Michael Stevens on October 30 2001 07:34 EST
- Any design pattern for Excpetion handling? by Chetan Shah on October 30 2001 10:29 EST
- Any design pattern for Excpetion handling? by Pranab Ghosh on October 30 2001 15:58 EST
- Any design pattern for Excpetion handling? by Hai Hoang on October 31 2001 14:26 EST
- Any design pattern for Excpetion handling? by Vipul Sagare on November 01 2001 02:03 EST
- Any design pattern for Excpetion handling? by Jerry Zhu on November 01 2001 02:34 EST
- Any design pattern for Excpetion handling? by Hai Hoang on October 31 2001 14:26 EST
-
Any design pattern for Excpetion handling?[ Go to top ]
- Posted by: Lofi Dewanto
- Posted on: October 30 2001 03:49 EST
- in response to Vipul Sagare
-
Any design pattern for Excpetion handling?[ Go to top ]
- Posted by: Michael Stevens
- Posted on: October 30 2001 07:34 EST
- in response to Vipul Sagare
The book "Effective Java" by Joshua Bloch has an entire chapter on exceptions. They are grouped into 9 "Items" which are sort of best practices around the use of exceptions. It's a great book that contains other useful information for Java programmers. I don't know of any specific issues or books relating to J2EE and exceptions. -
Any design pattern for Excpetion handling?[ Go to top ]
- Posted by: Chetan Shah
- Posted on: October 30 2001 10:29 EST
- in response to Michael Stevens
I think if you are using EJBs then you must consider using Nested Exception Handling Technique.
The article which discusses Nested Exception Handling is here -->
http://www.javaworld.com/javaworld/javatips/jw-javatip91.html
Let me know what do you think.
-Chetan -
Any design pattern for Excpetion handling?[ Go to top ]
- Posted by: Pranab Ghosh
- Posted on: October 30 2001 15:58 EST
- in response to Vipul Sagare
I just use a generic AppException that extends the java Exception class. Typically, in my ejb methods, I throw this along with RemoteException. Appexception can nest other exceptions and is integrated with log4j. The constructor will log the error message through log4j.
Having a class hierarchy of exceptions may not be worth it, because handling them becomes tedious.
Pranab -
Any design pattern for Excpetion handling?[ Go to top ]
- Posted by: Hai Hoang
- Posted on: October 31 2001 14:26 EST
- in response to Pranab Ghosh
I've a sample code of this exception pattern available at http://www.myhtg.com/examples.zip -
Any design pattern for Excpetion handling?[ Go to top ]
- Posted by: Vipul Sagare
- Posted on: November 01 2001 14:03 EST
- in response to Hai Hoang
Thank you.
Excellent links and book(Effective Java). Really helpful!!!!
Wish had documentation for http://www.myhtg.com/examples.zip
Vipul
-
Any design pattern for Excpetion handling?[ Go to top ]
- Posted by: Jerry Zhu
- Posted on: November 01 2001 02:34 EST
- in response to Pranab Ghosh
could make a brief introduction about log4j?thanks in advance