Hi dears,
I use jdev 11.1.1.7.0.
I need to handle the closed connection exception in my project, for this I've created MyErrorHandler class which extends DCErrorHandlerImpl (also updated DataBindings.cpx) and I've override the reportException() method as below :
@Override
public void reportException(DCBindingContainer formBnd, Exception ex) {
String msg = "";
JboException e = null;
Object[] exceptions;
if (ex instanceof java.sql.SQLRecoverableException) {
msg = ex.getMessage();
if (msg.indexOf("Connection") >= 0) {
e = new JboException("errro in connection to database ...");
throw new JboException(e);
} else {
super.reportException(formBnd, ex);
}
} else if (ex instanceof javax.el.ELException) {
msg = ex.getMessage();
if (msg.indexOf("JBO-26061") >= 0) {
e = new JboException("errro in connection to database ...");
throw new JboException(e);
} else {
super.reportException(formBnd, ex);
}
} else if (ex instanceof oracle.jbo.DMLException) {
this.reportException(formBnd, (Exception)ex.getCause());
} else if (ex instanceof oracle.jbo.JboException) {
exceptions = ((JboException)ex).getDetails();
if (exceptions.length > 0) {
for (int i = 0; i < exceptions.length; i++) {
this.reportException(formBnd, (Exception)exceptions[i]);
}
} else {
super.reportException(formBnd, ex);
}
}
}
when the connection is closed(in any reasons) the pop up error shows to user, which is too unclear

Is there any solution to handle this exception and then navigate to Error page or Login page.
Regards,
Habib