db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r379551 - in /db/derby/code/trunk/java/drda/org/apache/derby/impl/drda: Database.java XADatabase.java
Date Tue, 21 Feb 2006 18:08:55 GMT
Author: djd
Date: Tue Feb 21 10:08:53 2006
New Revision: 379551

URL: http://svn.apache.org/viewcvs?rev=379551&view=rev
Log:
DERBY-1015 (partial) Minor cleanup in the methods to obtain a connection in the network server.

Modified:
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
    db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java?rev=379551&r1=379550&r2=379551&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/Database.java Tue Feb 21 10:08:53
2006
@@ -112,7 +112,7 @@
 	 * @param conn Connection
 	 * @exception SQLException
 	 */
-	protected void setConnection(Connection conn)
+	void setConnection(Connection conn)
 		throws SQLException
 	{
 		this.conn = conn;
@@ -124,7 +124,7 @@
 	 *
 	 * @return connection
 	 */
-	protected Connection getConnection()
+	Connection getConnection()
 	{
 		return conn;
 	}
@@ -208,7 +208,7 @@
 	 * @param p Properties for connection attributes to pass to connect
 	 * @return new local connection
 	 */
-	protected Connection makeConnection(Properties p) throws SQLException
+	void makeConnection(Properties p) throws SQLException
 	{
 		p.put(Attribute.USERNAME_ATTR, userId);
                 
@@ -221,7 +221,6 @@
 			conn.setAutoCommit(false);
 		}
 		setConnection(conn);
-		return conn;
 	}
 
 	// Create string to pass to DataSource.setConnectionAttributes

Modified: db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java?rev=379551&r1=379550&r2=379551&view=diff
==============================================================================
--- db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java (original)
+++ db/derby/code/trunk/java/drda/org/apache/derby/impl/drda/XADatabase.java Tue Feb 21 10:08:53
2006
@@ -62,7 +62,7 @@
 	 * Make a new connection using the database name and set 
 	 * the connection in the database
 	 **/
-	protected synchronized Connection makeConnection(Properties p) throws
+	synchronized void makeConnection(Properties p) throws
  SQLException
 	{
 		if (xaDataSource == null)
@@ -92,9 +92,7 @@
 		// Client will always drive the commits so connection should
 		// always be autocommit false on the server. DERBY-898/DERBY-899
 		conn.setAutoCommit(false);
-		setConnection(conn);
-		return conn;
-		
+		setConnection(conn);		
 	}
 
 	/** SetXAResource



Mime
View raw message