Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 22 package org.jboss.resource.adapter.jdbc.vendor; 23 24 import java.io.Serializable ; 25 import java.sql.SQLException ; 26 import org.jboss.resource.adapter.jdbc.ExceptionSorter; 27 28 29 40 public class OracleExceptionSorter implements ExceptionSorter, Serializable  41 { 42 private static final long serialVersionUID = 573723525408205079L; 43 44 public OracleExceptionSorter() 45 { 46 } 47 48 public boolean isExceptionFatal(final SQLException e) 49 { 50 final int error_code = Math.abs( e.getErrorCode() ); 52 if( ( error_code == 28 ) || ( error_code == 600 ) || ( error_code == 1012 ) || ( error_code == 1014 ) || ( error_code == 1033 ) || ( error_code == 1034 ) || ( error_code == 1035 ) || ( error_code == 1089 ) || ( error_code == 1090 ) || ( error_code == 1092 ) || ( error_code == 1094 ) || ( error_code == 2396 ) || ( error_code == 3106 ) || ( error_code == 3111 ) || ( error_code == 3113 ) || ( error_code == 3114 ) || ( error_code >= 12100 && error_code <= 12299 ) ) { 70 return true; 71 } 72 73 final String error_text = (e.getMessage()).toUpperCase(); 74 75 78 if( ( error_code < 20000 || error_code >= 21000 ) && 79 ( (error_text.indexOf("SOCKET") > -1) || (error_text.indexOf("CONNECTION HAS ALREADY BEEN CLOSED") > -1) 81 || (error_text.indexOf("BROKEN PIPE") > -1) ) ) 82 { 83 return true; 84 } 85 86 return false; 87 } 88 89 } 90
| Popular Tags
|