You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "yigemaser (JIRA)" <ji...@apache.org> on 2007/09/27 23:41:50 UTC
[jira] Created: (POOL-105) how it go in method evict() of class
GenericKeyedObjectPool.java
how it go in method evict() of class GenericKeyedObjectPool.java
----------------------------------------------------------------
Key: POOL-105
URL: https://issues.apache.org/jira/browse/POOL-105
Project: Commons Pool
Issue Type: Bug
Affects Versions: 1.3
Environment: windows
Reporter: yigemaser
Priority: Minor
Fix For: 1.3
in the method evict(), if the getNumTests() get 10,the key will not change , is it a problem??
public synchronized void evict() throws Exception {
Object key = null;
...............
for(int i=0,m=getNumTests();i<m;i++) {
System.out.println("key="+key);
if(_poolMap.size() > 0) {
// Find next idle object pool key to work on
if (key == null) {
if (!keyIter.hasNext()) {
_recentlyEvictedKeys.clear();
remainingKeys = new HashSet(_poolMap.keySet());
keyIter = remainingKeys.iterator();
}
if (!keyIter.hasNext()) {
// done, there are no keyed pools
return;
}
key = keyIter.next();
}
...................
}
}
}
the print out will repeat 9 times , is it right??
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (POOL-105) how it go in method evict() of class
GenericKeyedObjectPool.java
Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/POOL-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phil Steitz updated POOL-105:
-----------------------------
Fix Version/s: (was: 1.3)
2.0
> how it go in method evict() of class GenericKeyedObjectPool.java
> ----------------------------------------------------------------
>
> Key: POOL-105
> URL: https://issues.apache.org/jira/browse/POOL-105
> Project: Commons Pool
> Issue Type: Bug
> Affects Versions: 1.3
> Environment: windows
> Reporter: yigemaser
> Priority: Minor
> Fix For: 2.0
>
>
> in the method evict(), if the getNumTests() get 10,the key will not change , is it a problem??
> public synchronized void evict() throws Exception {
> Object key = null;
> ...............
> for(int i=0,m=getNumTests();i<m;i++) {
> System.out.println("key="+key);
> if(_poolMap.size() > 0) {
> // Find next idle object pool key to work on
> if (key == null) {
> if (!keyIter.hasNext()) {
> _recentlyEvictedKeys.clear();
> remainingKeys = new HashSet(_poolMap.keySet());
> keyIter = remainingKeys.iterator();
> }
> if (!keyIter.hasNext()) {
> // done, there are no keyed pools
> return;
> }
> key = keyIter.next();
> }
> ...................
> }
> }
> }
> the print out will repeat 9 times , is it right??
> i think this should move " key = keyIter.next();" to next line
> if (key == null) {
> if (!keyIter.hasNext()) {
> _recentlyEvictedKeys.clear();
> remainingKeys = new HashSet(_poolMap.keySet());
> keyIter = remainingKeys.iterator();
> }
> if (!keyIter.hasNext()) {
> // done, there are no keyed pools
> return;
> }
> }
> key = keyIter.next();
> ......................
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (POOL-105) how it go in method evict() of class
GenericKeyedObjectPool.java
Posted by "Phil Steitz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/POOL-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Phil Steitz closed POOL-105.
----------------------------
Resolution: Duplicate
Fix for POOL-86 should correct this if it is in fact a bug
> how it go in method evict() of class GenericKeyedObjectPool.java
> ----------------------------------------------------------------
>
> Key: POOL-105
> URL: https://issues.apache.org/jira/browse/POOL-105
> Project: Commons Pool
> Issue Type: Bug
> Affects Versions: 1.3
> Environment: windows
> Reporter: yigemaser
> Priority: Minor
> Fix For: 1.3
>
>
> in the method evict(), if the getNumTests() get 10,the key will not change , is it a problem??
> public synchronized void evict() throws Exception {
> Object key = null;
> ...............
> for(int i=0,m=getNumTests();i<m;i++) {
> System.out.println("key="+key);
> if(_poolMap.size() > 0) {
> // Find next idle object pool key to work on
> if (key == null) {
> if (!keyIter.hasNext()) {
> _recentlyEvictedKeys.clear();
> remainingKeys = new HashSet(_poolMap.keySet());
> keyIter = remainingKeys.iterator();
> }
> if (!keyIter.hasNext()) {
> // done, there are no keyed pools
> return;
> }
> key = keyIter.next();
> }
> ...................
> }
> }
> }
> the print out will repeat 9 times , is it right??
> i think this should move " key = keyIter.next();" to next line
> if (key == null) {
> if (!keyIter.hasNext()) {
> _recentlyEvictedKeys.clear();
> remainingKeys = new HashSet(_poolMap.keySet());
> keyIter = remainingKeys.iterator();
> }
> if (!keyIter.hasNext()) {
> // done, there are no keyed pools
> return;
> }
> }
> key = keyIter.next();
> ......................
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (POOL-105) how it go in method evict() of class
GenericKeyedObjectPool.java
Posted by "yigemaser (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/POOL-105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
yigemaser updated POOL-105:
---------------------------
Description:
in the method evict(), if the getNumTests() get 10,the key will not change , is it a problem??
public synchronized void evict() throws Exception {
Object key = null;
...............
for(int i=0,m=getNumTests();i<m;i++) {
System.out.println("key="+key);
if(_poolMap.size() > 0) {
// Find next idle object pool key to work on
if (key == null) {
if (!keyIter.hasNext()) {
_recentlyEvictedKeys.clear();
remainingKeys = new HashSet(_poolMap.keySet());
keyIter = remainingKeys.iterator();
}
if (!keyIter.hasNext()) {
// done, there are no keyed pools
return;
}
key = keyIter.next();
}
...................
}
}
}
the print out will repeat 9 times , is it right??
i think this should move " key = keyIter.next();" to next line
if (key == null) {
if (!keyIter.hasNext()) {
_recentlyEvictedKeys.clear();
remainingKeys = new HashSet(_poolMap.keySet());
keyIter = remainingKeys.iterator();
}
if (!keyIter.hasNext()) {
// done, there are no keyed pools
return;
}
}
key = keyIter.next();
......................
was:
in the method evict(), if the getNumTests() get 10,the key will not change , is it a problem??
public synchronized void evict() throws Exception {
Object key = null;
...............
for(int i=0,m=getNumTests();i<m;i++) {
System.out.println("key="+key);
if(_poolMap.size() > 0) {
// Find next idle object pool key to work on
if (key == null) {
if (!keyIter.hasNext()) {
_recentlyEvictedKeys.clear();
remainingKeys = new HashSet(_poolMap.keySet());
keyIter = remainingKeys.iterator();
}
if (!keyIter.hasNext()) {
// done, there are no keyed pools
return;
}
key = keyIter.next();
}
...................
}
}
}
the print out will repeat 9 times , is it right??
> how it go in method evict() of class GenericKeyedObjectPool.java
> ----------------------------------------------------------------
>
> Key: POOL-105
> URL: https://issues.apache.org/jira/browse/POOL-105
> Project: Commons Pool
> Issue Type: Bug
> Affects Versions: 1.3
> Environment: windows
> Reporter: yigemaser
> Priority: Minor
> Fix For: 1.3
>
>
> in the method evict(), if the getNumTests() get 10,the key will not change , is it a problem??
> public synchronized void evict() throws Exception {
> Object key = null;
> ...............
> for(int i=0,m=getNumTests();i<m;i++) {
> System.out.println("key="+key);
> if(_poolMap.size() > 0) {
> // Find next idle object pool key to work on
> if (key == null) {
> if (!keyIter.hasNext()) {
> _recentlyEvictedKeys.clear();
> remainingKeys = new HashSet(_poolMap.keySet());
> keyIter = remainingKeys.iterator();
> }
> if (!keyIter.hasNext()) {
> // done, there are no keyed pools
> return;
> }
> key = keyIter.next();
> }
> ...................
> }
> }
> }
> the print out will repeat 9 times , is it right??
> i think this should move " key = keyIter.next();" to next line
> if (key == null) {
> if (!keyIter.hasNext()) {
> _recentlyEvictedKeys.clear();
> remainingKeys = new HashSet(_poolMap.keySet());
> keyIter = remainingKeys.iterator();
> }
> if (!keyIter.hasNext()) {
> // done, there are no keyed pools
> return;
> }
> }
> key = keyIter.next();
> ......................
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.