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 jb...@apache.org on 2005/09/09 20:07:28 UTC
svn commit: r279839 - in /db/derby/code/trunk/java/drda/org/apache/derby:
drda/NetworkServerControl.java impl/drda/DRDAConnThread.java
impl/drda/NetworkServerControlImpl.java
Author: jboynes
Date: Fri Sep 9 11:07:24 2005
New Revision: 279839
URL: http://svn.apache.org/viewcvs?rev=279839&view=rev
Log:
cosmetic; fix javadoc and imports to make idea happy
Modified:
db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java
db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
Modified: db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java?rev=279839&r1=279838&r2=279839&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/drda/NetworkServerControl.java Fri Sep 9 11:07:24 2005
@@ -20,7 +20,6 @@
package org.apache.derby.drda;
-import java.io.OutputStream;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.util.Properties;
Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/DRDAConnThread.java?rev=279839&r1=279838&r2=279839&view=diff
==============================================================================
--- 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 Sep 9 11:07:24 2005
@@ -1770,7 +1770,8 @@
* the values sent in the ACCRDB are used.
* Objects may follow in one DSS or in several DSS chained together.
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void parseOPNQRYobjects(DRDAStatement stmt)
throws DRDAProtocolException, SQLException
@@ -1961,7 +1962,7 @@
* There are two possible formats, fixed and extended which includes length
* information for the strings
*
- * @exception throws DRDAProtocolException
+ * @throws DRDAProtocolException
*/
private void writePKGNAMCSN(String pkgcnstknStr) throws DRDAProtocolException
{
@@ -2013,7 +2014,8 @@
* MONITOR - Monitor events - optional.
*
* @return DRDAStatement we are continuing
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private DRDAStatement parseCNTQRY() throws DRDAProtocolException, SQLException
{
@@ -3072,7 +3074,8 @@
*
* @return return 0 - don't return sqlda, 1 - return input sqlda,
* 2 - return output sqlda
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private int parsePRPSQLSTT() throws DRDAProtocolException,SQLException
{
@@ -3151,7 +3154,8 @@
* Objects may follow in one DSS or in several DSS chained together.
*
* @return SQL statement
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private String parsePRPSQLSTTobjects(DRDAStatement stmt)
throws DRDAProtocolException, SQLException
@@ -3285,7 +3289,8 @@
* MONITOR - Monitor events - optional.
*
* @return expect "output sqlda" or not
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private boolean parseDSCSQLSTT() throws DRDAProtocolException,SQLException
{
@@ -3347,7 +3352,8 @@
* QRYROWSET - Query Rowset Size - Level 7
* MONITOR - Monitor events - optional.
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void parseEXCSQLSTT() throws DRDAProtocolException,SQLException
{
@@ -3642,7 +3648,8 @@
* Objects may follow in one DSS or in several DSS chained together.
*
* @param stmt the DRDAStatement to execute
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void parseEXCSQLSTTobjects(DRDAStatement stmt) throws DRDAProtocolException, SQLException
{
@@ -3695,12 +3702,14 @@
/**
* Write SQLCINRD - result set column information
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void writeSQLCINRD(DRDAStatement stmt) throws DRDAProtocolException,SQLException
{
ResultSet rs = null;
- PreparedStatement ps = stmt.getPreparedStatement();
+ // todo ps is never used or closed - could this be a memory leak?
+ PreparedStatement ps = stmt.getPreparedStatement();
if (!stmt.needsToSendParamData)
rs = stmt.getResultSet();
@@ -3733,7 +3742,8 @@
/**
* Write SQLRSLRD - result set reply data
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void writeSQLRSLRD(DRDAStatement stmt) throws DRDAProtocolException,SQLException
{
@@ -3762,7 +3772,8 @@
* PKGSNLST - list of PKGNAMCSN -required
* SRVDGN - Server Diagnostic Information -optional
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void writeRSLSETRM(DRDAStatement stmt) throws DRDAProtocolException,SQLException
{
@@ -3803,7 +3814,8 @@
* FDODSC - FD:OCA data descriptor - required
* FDODTA - FD:OCA data - optional
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void parseSQLDTA_work(DRDAStatement stmt) throws DRDAProtocolException,SQLException
{
@@ -3953,7 +3965,8 @@
* @param paramLenNumBytes Number of bytes for encoding LOB Length
*
* @return updated paramExtPositions
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private ArrayList readAndSetParams(int i, DRDAStatement stmt, int
drdaType, EmbedParameterSetMetaData pmeta,
@@ -4198,7 +4211,8 @@
* @param stmt associated ps
* @param drdaType drda type of the parameter
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void readAndSetExtParam( int i, DRDAStatement stmt,
int drdaType, int extLen)
@@ -4267,7 +4281,8 @@
* SQLSTT - SQL Statement -required
*
* @return update count
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private int parseEXCSQLIMM() throws DRDAProtocolException,SQLException
{
@@ -4321,7 +4336,8 @@
* TYPDEFOVR - TYPDEF Overrides - required
* SQLSTT - SQL Statement - required (at least one; may be more)
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private boolean parseEXCSQLSET() throws DRDAProtocolException,SQLException
{
@@ -4383,7 +4399,8 @@
* Objects may follow in one DSS or in several DSS chained together.
*
* @return SQL Statement
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private String parseEXECSQLIMMobjects() throws DRDAProtocolException, SQLException
{
@@ -4433,8 +4450,8 @@
*
* Objects may follow in one DSS or in several DSS chained together.
*
- * @return Count of updated rows.
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void parseEXCSQLSETobjects()
throws DRDAProtocolException, SQLException
@@ -4576,7 +4593,7 @@
* PKGCNSTKN - RDB Package Consistency Token
* PKGSN - RDB Package Section Number
*
- * @exception throws DRDAProtocolException
+ * @throws DRDAProtocolException
*/
private String parsePKGNAMCSN() throws DRDAProtocolException
{
@@ -4801,7 +4818,8 @@
* MONITOR - Monitor events - optional.
*
* @return DRDAstatement being closed
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private DRDAStatement parseCLSQRY() throws DRDAProtocolException, SQLException
{
@@ -5533,7 +5551,8 @@
*
* @param stmt prepared statement
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void writeSQLDARD(DRDAStatement stmt, boolean rtnOutput, SQLException e) throws DRDAProtocolException, SQLException
{
@@ -5582,7 +5601,8 @@
* If the QRYDSC will not fit into the current block, as many columns as can
* fit are sent and then the remaining are sent in the following blocks.
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void writeQRYDSC(DRDAStatement stmt, boolean FDODSConly)
throws DRDAProtocolException, SQLException
@@ -5682,7 +5702,8 @@
* @param colEnd end column to send
* @param first is this the first group
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void writeSQLDTAGRP(DRDAStatement stmt, ResultSetMetaData rsmeta,
EmbedParameterSetMetaData pmeta,
@@ -5807,7 +5828,8 @@
* Byte string
*
* @param stmt DRDA statement we are processing
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void writeQRYDTA (DRDAStatement stmt)
throws DRDAProtocolException, SQLException
@@ -6069,7 +6091,8 @@
* @param stmt DRDA statment
* @param blksize size of query block
*
- * @exception SQLException, DRDAProtocolException
+ * @throws SQLException
+ * @throws DRDAProtocolException
*/
private void splitQRYDTA(DRDAStatement stmt, int blksize) throws SQLException,
DRDAProtocolException
@@ -6115,7 +6138,8 @@
*
* @param stmt DRDA statement
* @param rs Result set
- * @exception DRDAProtocolException,SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void doneData(DRDAStatement stmt, ResultSet rs)
throws DRDAProtocolException, SQLException
@@ -6256,7 +6280,8 @@
* parameter number (in case of parameter)
* @param rtnOutput whether this is for a result set
*
- * @exception DRDAProtocolException, SQLException
+ * @throws DRDAProtocolException
+ * @throws SQLException
*/
private void writeSQLDAGRP(ResultSetMetaData rsmeta, EmbedParameterSetMetaData pmeta, int elemNum, boolean rtnOutput)
throws DRDAProtocolException, SQLException
Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java?rev=279839&r1=279838&r2=279839&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/NetworkServerControlImpl.java Fri Sep 9 11:07:24 2005
@@ -20,56 +20,49 @@
package org.apache.derby.impl.drda;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.OutputStream;
import java.io.PrintStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
import java.io.PrintWriter;
-import java.io.UnsupportedEncodingException;
+import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.Socket;
-import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.Statement;
import java.sql.SQLException;
import java.sql.SQLWarning;
-import java.util.Enumeration;
import java.util.ArrayList;
+import java.util.Enumeration;
import java.util.Hashtable;
-import java.util.Locale;
import java.util.Properties;
import java.util.StringTokenizer;
import java.util.Vector;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
+import org.apache.derby.drda.NetworkServerControl;
+import org.apache.derby.iapi.jdbc.DRDAServerStarter;
import org.apache.derby.iapi.reference.Attribute;
import org.apache.derby.iapi.reference.Property;
+import org.apache.derby.iapi.reference.SQLState;
+import org.apache.derby.iapi.services.i18n.MessageService;
+import org.apache.derby.iapi.services.info.JVMInfo;
import org.apache.derby.iapi.services.info.ProductGenusNames;
import org.apache.derby.iapi.services.info.ProductVersionHolder;
-import org.apache.derby.iapi.services.info.JVMInfo;
-import org.apache.derby.iapi.reference.SQLState;
-import org.apache.derby.impl.jdbc.EmbedSQLException;
-import org.apache.derby.iapi.jdbc.DRDAServerStarter;
-import org.apache.derby.iapi.tools.i18n.LocalizedResource;
-import org.apache.derby.iapi.tools.i18n.LocalizedOutput;
+import org.apache.derby.iapi.services.monitor.Monitor;
import org.apache.derby.iapi.services.property.PropertyUtil;
import org.apache.derby.iapi.services.sanity.SanityManager;
-import org.apache.derby.iapi.services.i18n.MessageService;
-import org.apache.derby.iapi.services.monitor.Monitor;
+import org.apache.derby.iapi.tools.i18n.LocalizedOutput;
+import org.apache.derby.iapi.tools.i18n.LocalizedResource;
import org.apache.derby.iapi.util.StringUtil;
-import org.apache.derby.drda.NetworkServerControl;
+import org.apache.derby.impl.jdbc.EmbedSQLException;
/**
@@ -301,7 +294,7 @@
* Internal constructor for NetworkServerControl API.
* @param address - InetAddress to listen on, May not be null. Throws NPE if null
* @param portNumber - portNumber to listen on, -1 use propert or default.
- * @exception throw Exception on error
+ * @throws Exception on error
* @see NetworkServerControl
*/
public NetworkServerControlImpl(InetAddress address, int portNumber) throws Exception
@@ -899,7 +892,7 @@
}
/**
- *@see NetworkServerControl#runtimeinfo
+ *@see NetworkServerControl#getRuntimeInfo
*/
public String runtimeInfo()
throws Exception
@@ -1034,16 +1027,16 @@
* Set a thread name to be something that is both meaningful and unique (primarily
* for debugging purposes).
*
+ * The received thread's name is set to a new string of the form
+ * [newName + "_n"], where 'n' is a unique thread id originally generated
+ * by the jvm Thread constructor. If the default name of the thread has
+ * been changed before getting here, then nothing is done.
+ *
* @param thrd An instance of a Thread object that still has its default
* thread name (as generated by the jvm Thread constructor). This should
* always be of the form "Thread-N", where N is a unique thread id
* generated by the jvm. Ex. "Thread-0", "Thread-1", etc.
*
- * @return The received thread's name has been set to a new string of the form
- * [newName + "_n"], where 'n' is a unique thread id originally generated
- * by the jvm Thread constructor. If the default name of the thread has
- * been changed before getting here, then nothing is done.
- *
**/
public static void setUniqueThreadName(Thread thrd, String newName) {
@@ -1444,7 +1437,7 @@
*
* @param msgProp message property key
*
- * @exception throws an Exception if an error occurs
+ * @throws Exception if an error occurs
*/
protected void consolePropertyMessage(String msgProp)
throws Exception
@@ -1457,7 +1450,7 @@
* @param msgProp message property key
* @param arg argument for message
*
- * @exception throws an Exception if an error occurs
+ * @throws Exception if an error occurs
*/
protected void consolePropertyMessage(String msgProp, String arg)
throws Exception
@@ -1470,7 +1463,7 @@
* @param msgProp message property key
* @param args argument array for message
*
- * @exception throws an Exception if an error occurs
+ * @throws Exception if an error occurs
*/
protected void consolePropertyMessage(String msgProp, String [] args)
throws Exception
@@ -1498,7 +1491,7 @@
*
* @param writer writer to use
*
- * @exception throws Exception if a problem occurs sending OK
+ * @throws Exception if a problem occurs sending OK
*/
private void writeCommandReplyHeader(DDMWriter writer) throws Exception
{
@@ -1511,7 +1504,7 @@
*
* @param writer writer to use for sending OK
*
- * @exception throws Exception if a problem occurs sending OK
+ * @throws Exception if a problem occurs sending OK
*/
private void sendOK(DDMWriter writer) throws Exception
{
@@ -1525,7 +1518,7 @@
* @param writer writer to use for sending
* @param val int val to send
*
- * @exception throws Exception if a problem occurs
+ * @throws Exception if a problem occurs
*/
private void sendOKInt(DDMWriter writer, int val) throws Exception
{
@@ -1541,7 +1534,7 @@
* @param messageType 1 for Warning, 2 for Error 3 for SQLError
* @param message message
*
- * @exception throws Exception if a problem occurs sending message
+ * @throws Exception if a problem occurs sending message
*/
private void sendMessage(DDMWriter writer, int messageType, String message)
throws Exception
@@ -1558,7 +1551,7 @@
* @param se Cloudscape exception
* @param type type of exception, SQLERROR or SQLWARNING
*
- * @exception throws Exception if a problem occurs sending message
+ * @throws Exception if a problem occurs sending message
*/
private void sendSQLMessage(DDMWriter writer, SQLException se, int type)
throws Exception
@@ -1587,7 +1580,7 @@
*
* @param writer writer to use for sending sysinfo
*
- * @exception throws Exception if a problem occurs sending value
+ * @throws Exception if a problem occurs sending value
*/
private void sendSysInfo(DDMWriter writer) throws Exception
{
@@ -1609,7 +1602,7 @@
*
* @param writer writer to use for sending sysinfo
*
- * @exception throws Exception if a problem occurs sending value
+ * @throws Exception if a problem occurs sending value
*/
private void sendRuntimeInfo(DDMWriter writer) throws Exception
{
@@ -1630,7 +1623,7 @@
*
* @param writer writer to use for sending sysinfo
*
- * @exception throws Exception if a problem occurs sending value
+ * @throws Exception if a problem occurs sending value
*/
private void sendPropInfo(DDMWriter writer) throws Exception
{
@@ -1696,7 +1689,7 @@
*
* @return system information for Cloudscape
*
- * @exception throws IOException if a problem occurs encoding string
+ * @throws IOException if a problem occurs encoding string
*/
private String getCLSSysInfo() throws IOException
{
@@ -2438,9 +2431,8 @@
}
/**
- * Get property info
+ * Initialize fields from system properties
*
- * @return system properties
*/
private void getPropertyInfo() throws Exception
{
@@ -2529,7 +2521,7 @@
* @param messageKey message key
* @param args arguments to message
*
- * @exception throws an Exception if an error occurs
+ * @throws Exception if an error occurs
*/
private void consolePropertyMessageWork(String messageKey, String [] args)
throws Exception
@@ -2582,7 +2574,7 @@
*
* @param msg msg containing SQL Exception
*
- * @exception throws a SQLException
+ * @throws SQLException
*/
private void throwSQLException(String msg) throws SQLException
{
@@ -2642,7 +2634,7 @@
*
* @param msg msg containing SQL Warning
*
- * @exception throws a SQLWarning
+ * @throws SQLWarning
*/
private void throwSQLWarning(String msg) throws SQLWarning
{
@@ -2704,7 +2696,7 @@
* (so don't do it again).
*
* @param e An unexpected exception.
- * @exception throws an Exception with message UNEXPECTED_ERR.
+ * @throws Exception with message UNEXPECTED_ERR.
*/
private void throwUnexpectedException(Exception e)
throws Exception {