-
Enhancement
-
Resolution: Fixed
-
P4
-
1.3.0
-
generic
-
generic
We need a mechanism to centrally capture all runtime Java Exceptions.
We have seen various scenarios where poor exception handling has led to frustrating time-consuming hard to debug issues. We have seen scenarios where Exceptions have been swallowed (with no indication!)
e.g.
try {
doSomeThing();
} catch(Exception e) { };
or trapped and re-thrown as different Exceptions so the root-cause is lost! Expecting every Developer to trap and handle various failure scenarios consistently is non-trivial.
A central, consistent Exception logging mechanism is needed to capture all failures consistently.
We would like to request Sun for a java.lang.Throwable listener mechanism, that provides us a way to receive a callback anytime there is a failure in the JVM, i.e. any time a java.lang.Throwable is instantiated in the JVM.
This callback will allow our Logging layer to log the failure with all the runtime Oracle Apps User Context to allow easier diagnostics and trouble shooting.
I did a search through the Sun Bug DB, and the nearest such feature request I have been able to find is 4448877:
https://javapartner.sun.com/partner/bugs/data/bugs/4448877.html
This would help greatly for support purposes! Thanks!
We would also like to add 2 additional related requirements for Sun to the RFE:
#1 In the Callback, pass us a reference to the Object that was being worked on.
i.e. if the currently executing api was
myObject.doSomething(); // throws Throwable
and an Exception was thrown, in the Callback, we should be passed a reference to "myObject".
This is to allow us to dump the Object state, that can be invaluable in post-mortem analysis.
#2 Further to #1, allow us to traverse up the Callstack to dump state of all involved Objects.
i.e. if
ObjectA.m1()
-> ObjectB.m2()
-> myObject.doSomething(); // throws Throwable
and an Exception was thrown, in the Callback, we should be passed a reference to "myObject",
and allows us traverse to get references to "ObjectB" & "ObjectA".
This is to allow us to dump all the Object states in the chain, that can be invaluable in post-mortem analysis.
We have seen various scenarios where poor exception handling has led to frustrating time-consuming hard to debug issues. We have seen scenarios where Exceptions have been swallowed (with no indication!)
e.g.
try {
doSomeThing();
} catch(Exception e) { };
or trapped and re-thrown as different Exceptions so the root-cause is lost! Expecting every Developer to trap and handle various failure scenarios consistently is non-trivial.
A central, consistent Exception logging mechanism is needed to capture all failures consistently.
We would like to request Sun for a java.lang.Throwable listener mechanism, that provides us a way to receive a callback anytime there is a failure in the JVM, i.e. any time a java.lang.Throwable is instantiated in the JVM.
This callback will allow our Logging layer to log the failure with all the runtime Oracle Apps User Context to allow easier diagnostics and trouble shooting.
I did a search through the Sun Bug DB, and the nearest such feature request I have been able to find is 4448877:
https://javapartner.sun.com/partner/bugs/data/bugs/4448877.html
This would help greatly for support purposes! Thanks!
We would also like to add 2 additional related requirements for Sun to the RFE:
#1 In the Callback, pass us a reference to the Object that was being worked on.
i.e. if the currently executing api was
myObject.doSomething(); // throws Throwable
and an Exception was thrown, in the Callback, we should be passed a reference to "myObject".
This is to allow us to dump the Object state, that can be invaluable in post-mortem analysis.
#2 Further to #1, allow us to traverse up the Callstack to dump state of all involved Objects.
i.e. if
ObjectA.m1()
-> ObjectB.m2()
-> myObject.doSomething(); // throws Throwable
and an Exception was thrown, in the Callback, we should be passed a reference to "myObject",
and allows us traverse to get references to "ObjectB" & "ObjectA".
This is to allow us to dump all the Object states in the chain, that can be invaluable in post-mortem analysis.
- relates to
-
JDK-4448877 Place ExceptionListener in the java.util package
- Closed