You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2007/08/03 19:26:39 UTC
svn commit: r562524 - in
/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda: DDMWriter.java
DRDAConnThread.java
Author: kmarsden
Date: Fri Aug 3 10:26:38 2007
New Revision: 562524
URL: http://svn.apache.org/viewvc?view=rev&rev=562524
Log:
DERBY-2933 (partial) When network server disconnects due to an I/O Exception it does not always log the exception that caused the error
Committing change for IOExceptions during writeScalarStream(). There also may be exceptions during disconnect of a session when the server shuts down and I left these unlogged.
Modified:
db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java
db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java?view=diff&rev=562524&r1=562523&r2=562524
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DDMWriter.java Fri Aug 3 10:26:38 2007
@@ -709,7 +709,7 @@
out.flush();
}catch(IOException e){
- agent.markCommunicationsFailure ("DDMWriter.writeScalarStream()",
+ agent.markCommunicationsFailure (e,"DDMWriter.writeScalarStream()",
"",
e.getMessage(),
"*");
Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?view=diff&rev=562524&r1=562523&r2=562524
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java Fri Aug 3 10:26:38 2007
@@ -450,10 +450,40 @@
protected void markCommunicationsFailure(String arg1, String arg2, String arg3,
String arg4) throws DRDAProtocolException
{
- Object[] oa = {arg1,arg2,arg3,arg4};
- throw DRDAProtocolException.newDisconnectException(this,oa);
+ markCommunicationsFailure(null,arg1,arg2,arg3, arg4);
}
+
+
+ /**
+ * Indicate a communications failure. Log to derby.log
+ *
+ * @param e - Source exception that was thrown
+ * @param arg1 - info about the communications failure
+ * @param arg2 - info about the communications failure
+ * @param arg3 - info about the communications failure
+ * @param arg4 - info about the communications failure
+ *
+ * @exception DRDAProtocolException disconnect exception always thrown
+ */
+ protected void markCommunicationsFailure(Exception e, String arg1, String arg2, String arg3,
+ String arg4) throws DRDAProtocolException
+ {
+ String dbname = null;
+
+ if (database != null)
+ {
+ dbname = database.dbName;
+ }
+ if (e != null) {
+ println2Log(dbname,session.drdaID, e.getMessage());
+ server.consoleExceptionPrintTrace(e);
+ }
+
+ Object[] oa = {arg1,arg2,arg3,arg4};
+ throw DRDAProtocolException.newDisconnectException(this,oa);
+ }
+
/**
* Syntax error
*