[Proxool-cvs] proxool/src/java/org/logicalcobwebs/proxool ConnectionPool.java,1.65,1.66 PrototyperTh
UNMAINTAINED!
Brought to you by:
billhorsman
|
From: <bil...@us...> - 2003-04-10 08:24:00
|
Update of /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool
In directory sc8-pr-cvs1:/tmp/cvs-serv16184
Modified Files:
ConnectionPool.java PrototyperThread.java
Log Message:
removed very frequent debug
Index: ConnectionPool.java
===================================================================
RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/ConnectionPool.java,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** ConnectionPool.java 11 Mar 2003 23:58:04 -0000 1.65
--- ConnectionPool.java 10 Apr 2003 08:23:54 -0000 1.66
***************
*** 643,650 ****
*/
protected void changeStatus(int oldStatus, int newStatus) {
! LOG.debug("About to change status");
connectionCountByState[oldStatus]--;
connectionCountByState[newStatus]++;
! LOG.debug("Changing status from " + oldStatus + " to " + newStatus);
// Check to see if shutdown is waiting for all connections to become
// non-active
--- 643,650 ----
*/
protected void changeStatus(int oldStatus, int newStatus) {
! // LOG.debug("About to change status");
connectionCountByState[oldStatus]--;
connectionCountByState[newStatus]++;
! // LOG.debug("Changing status from " + oldStatus + " to " + newStatus);
// Check to see if shutdown is waiting for all connections to become
// non-active
***************
*** 892,912 ****
*/
protected void acquirePrimaryReadLock() throws InterruptedException {
! if (log.isDebugEnabled()) {
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! log.debug("About to acquire primary read lock", e);
! }
! // log.debug("About to acquire primary read lock");
! }
primaryReadWriteLock.readLock().acquire();
! if (log.isDebugEnabled()) {
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! log.debug("Acquired primary read lock", e);
! }
! //log.debug("Acquired primary read lock");
! }
}
--- 892,912 ----
*/
protected void acquirePrimaryReadLock() throws InterruptedException {
! // if (log.isDebugEnabled()) {
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // log.debug("About to acquire primary read lock", e);
! // }
! // // log.debug("About to acquire primary read lock");
! // }
primaryReadWriteLock.readLock().acquire();
! // if (log.isDebugEnabled()) {
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // log.debug("Acquired primary read lock", e);
! // }
! // //log.debug("Acquired primary read lock");
! // }
}
***************
*** 915,923 ****
*/
protected void releasePrimaryReadLock() {
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! log.debug("Released primary read lock", e);
! }
//log.debug("Released primary read lock");
primaryReadWriteLock.readLock().release();
--- 915,923 ----
*/
protected void releasePrimaryReadLock() {
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // log.debug("Released primary read lock", e);
! // }
//log.debug("Released primary read lock");
primaryReadWriteLock.readLock().release();
***************
*** 933,963 ****
boolean success = false;
try {
! if (log.isDebugEnabled()) {
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! log.debug("About to acquire primary write lock", e);
! }
! //log.debug("About to acquire primary write lock");
! }
primaryReadWriteLock.writeLock().acquire();
success = true;
! if (log.isDebugEnabled()) {
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! log.debug("Acquired primary write lock", e);
! }
! //log.debug("Acquired primary write lock");
! }
} finally {
! if (log.isDebugEnabled() && !success) {
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! log.debug("Failed to acquire primary write lock", e);
! }
! //log.debug("Failed to acquire primary write lock");
! }
}
}
--- 933,963 ----
boolean success = false;
try {
! // if (log.isDebugEnabled()) {
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // log.debug("About to acquire primary write lock", e);
! // }
! // //log.debug("About to acquire primary write lock");
! // }
primaryReadWriteLock.writeLock().acquire();
success = true;
! // if (log.isDebugEnabled()) {
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // log.debug("Acquired primary write lock", e);
! // }
! // //log.debug("Acquired primary write lock");
! // }
} finally {
! // if (log.isDebugEnabled() && !success) {
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // log.debug("Failed to acquire primary write lock", e);
! // }
! // //log.debug("Failed to acquire primary write lock");
! // }
}
}
***************
*** 968,976 ****
protected void releasePrimaryWriteLock() {
primaryReadWriteLock.writeLock().release();
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! log.debug("Released primary write lock", e);
! }
//log.debug("Released primary write lock");
}
--- 968,976 ----
protected void releasePrimaryWriteLock() {
primaryReadWriteLock.writeLock().release();
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // log.debug("Released primary write lock", e);
! // }
//log.debug("Released primary write lock");
}
***************
*** 999,1013 ****
protected void acquireConnectionStatusWriteLock() {
try {
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! LOG.debug("About to acquire connectionStatus write lock", e);
! }
connectionStatusReadWriteLock.writeLock().acquire();
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! LOG.debug("Acquired connectionStatus write lock", e);
! }
} catch (InterruptedException e) {
log.error("Couldn't acquire connectionStatus write lock", e);
--- 999,1013 ----
protected void acquireConnectionStatusWriteLock() {
try {
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // LOG.debug("About to acquire connectionStatus write lock", e);
! // }
connectionStatusReadWriteLock.writeLock().acquire();
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // LOG.debug("Acquired connectionStatus write lock", e);
! // }
} catch (InterruptedException e) {
log.error("Couldn't acquire connectionStatus write lock", e);
***************
*** 1017,1032 ****
protected void releaseConnectionStatusWriteLock() {
connectionStatusReadWriteLock.writeLock().release();
! try {
! throw new RuntimeException("TRACE ONLY");
! } catch (RuntimeException e) {
! LOG.debug("Released connectionStatus write lock", e);
! }
}
protected void acquireConnectionStatusReadLock() {
try {
! LOG.debug("About to acquire connectionStatus read lock");
connectionStatusReadWriteLock.readLock().acquire();
! LOG.debug("Acquired connectionStatus read lock");
} catch (InterruptedException e) {
log.error("Couldn't acquire connectionStatus read lock", e);
--- 1017,1032 ----
protected void releaseConnectionStatusWriteLock() {
connectionStatusReadWriteLock.writeLock().release();
! // try {
! // throw new RuntimeException("TRACE ONLY");
! // } catch (RuntimeException e) {
! // LOG.debug("Released connectionStatus write lock", e);
! // }
}
protected void acquireConnectionStatusReadLock() {
try {
! // LOG.debug("About to acquire connectionStatus read lock");
connectionStatusReadWriteLock.readLock().acquire();
! // LOG.debug("Acquired connectionStatus read lock");
} catch (InterruptedException e) {
log.error("Couldn't acquire connectionStatus read lock", e);
***************
*** 1036,1040 ****
protected void releaseConnectionStatusReadLock() {
connectionStatusReadWriteLock.readLock().release();
! LOG.debug("Released connectionStatus read lock");
}
--- 1036,1040 ----
protected void releaseConnectionStatusReadLock() {
connectionStatusReadWriteLock.readLock().release();
! // LOG.debug("Released connectionStatus read lock");
}
***************
*** 1047,1050 ****
--- 1047,1053 ----
Revision history:
$Log$
+ Revision 1.66 2003/04/10 08:23:54 billhorsman
+ removed very frequent debug
+
Revision 1.65 2003/03/11 23:58:04 billhorsman
fixed deadlock on connection expiry
Index: PrototyperThread.java
===================================================================
RCS file: /cvsroot/proxool/proxool/src/java/org/logicalcobwebs/proxool/PrototyperThread.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PrototyperThread.java 10 Mar 2003 23:43:12 -0000 1.3
--- PrototyperThread.java 10 Apr 2003 08:23:55 -0000 1.4
***************
*** 50,56 ****
}
}
! if (LOG.isDebugEnabled()) {
! LOG.debug("Swept " + sweptCount + " pools");
! }
doWait();
--- 50,56 ----
}
}
! // if (LOG.isDebugEnabled()) {
! // LOG.debug("Swept " + sweptCount + " pools");
! // }
doWait();
***************
*** 76,79 ****
--- 76,82 ----
Revision history:
$Log$
+ Revision 1.4 2003/04/10 08:23:55 billhorsman
+ removed very frequent debug
+
Revision 1.3 2003/03/10 23:43:12 billhorsman
reapplied checkstyle that i'd inadvertently let
|