cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r418094 - in /incubator/cayenne/sandbox/derby-pool/src/pool: DatabaseShutdownDelegate.java DerbyShutdownDelegate.java SharedEmbeddedDataSource.java
Date Thu, 29 Jun 2006 17:33:59 GMT
Author: aadamchik
Date: Thu Jun 29 10:33:58 2006
New Revision: 418094

URL: http://svn.apache.org/viewvc?rev=418094&view=rev
Log:
cleaning up the demo

Modified:
    incubator/cayenne/sandbox/derby-pool/src/pool/DatabaseShutdownDelegate.java
    incubator/cayenne/sandbox/derby-pool/src/pool/DerbyShutdownDelegate.java
    incubator/cayenne/sandbox/derby-pool/src/pool/SharedEmbeddedDataSource.java

Modified: incubator/cayenne/sandbox/derby-pool/src/pool/DatabaseShutdownDelegate.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/derby-pool/src/pool/DatabaseShutdownDelegate.java?rev=418094&r1=418093&r2=418094&view=diff
==============================================================================
--- incubator/cayenne/sandbox/derby-pool/src/pool/DatabaseShutdownDelegate.java (original)
+++ incubator/cayenne/sandbox/derby-pool/src/pool/DatabaseShutdownDelegate.java Thu Jun 29
10:33:58 2006
@@ -6,7 +6,5 @@
 
 public interface DatabaseShutdownDelegate {
 
-	void beforeYieldDbOwnership(DataSource ds) throws SQLException;
-
-	void afterYieldDbOwnership(DataSource ds) throws SQLException;
+	void yieldDbOwnership(DataSource ds) throws SQLException;
 }

Modified: incubator/cayenne/sandbox/derby-pool/src/pool/DerbyShutdownDelegate.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/derby-pool/src/pool/DerbyShutdownDelegate.java?rev=418094&r1=418093&r2=418094&view=diff
==============================================================================
--- incubator/cayenne/sandbox/derby-pool/src/pool/DerbyShutdownDelegate.java (original)
+++ incubator/cayenne/sandbox/derby-pool/src/pool/DerbyShutdownDelegate.java Thu Jun 29 10:33:58
2006
@@ -13,11 +13,7 @@
 		this.url = url;
 	}
 
-	public void beforeYieldDbOwnership(DataSource ds) throws SQLException {
-
-	}
-
-	public void afterYieldDbOwnership(DataSource ds) throws SQLException {
+	public void yieldDbOwnership(DataSource ds) throws SQLException {
 		try {
 			DriverManager.getConnection(url + ";shutdown=true");
 		} catch (SQLException e) {

Modified: incubator/cayenne/sandbox/derby-pool/src/pool/SharedEmbeddedDataSource.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/sandbox/derby-pool/src/pool/SharedEmbeddedDataSource.java?rev=418094&r1=418093&r2=418094&view=diff
==============================================================================
--- incubator/cayenne/sandbox/derby-pool/src/pool/SharedEmbeddedDataSource.java (original)
+++ incubator/cayenne/sandbox/derby-pool/src/pool/SharedEmbeddedDataSource.java Thu Jun 29
10:33:58 2006
@@ -92,7 +92,7 @@
 			} catch (SQLException e) {
 				System.out.println("Retrying...");
 				owner = false;
-				
+
 				// this is needed to prevent events flood
 				try {
 					wait(maxOpWait);
@@ -211,12 +211,9 @@
 		}
 
 		System.out.println("Yield");
-		if (delegate != null) {
-			delegate.beforeYieldDbOwnership(this);
-		}
 
 		if (delegate != null) {
-			delegate.afterYieldDbOwnership(this);
+			delegate.yieldDbOwnership(this);
 		}
 
 		owner = false;



Mime
View raw message