maxWait is only applicable when whenExhaustedAction="1":

                        switch(_whenExhaustedAction) {
                            case WHEN_EXHAUSTED_GROW:
                                // allow new object to be created
                                break;
                            case WHEN_EXHAUSTED_FAIL:
                                throw new NoSuchElementException();
                            case WHEN_EXHAUSTED_BLOCK:
                                    try {
                                        if(_maxWait <= 0) {
                                            wait();
                                        } else {
                                            wait(_maxWait);
                                        }
                                    } catch(InterruptedException e) {
                                        // ignored
                                    }
                                    if(_maxWait > 0 && ((System.currentTimeMillis() - 
starttime) >= _maxWait)) {
                                        throw new NoSuchElementException("Timeout 
waiting for idle object");
                                    } else {
                                        continue; // keep looping
                                    }
                            default:
                                throw new 
IllegalArgumentException("whenExhaustedAction " + _whenExhaustedAction + " not 
recognized.");
                        }

-----Original Message-----
From: Jair da Silva Ferreira J�nior [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 23, 2003 8:03 PM
To: OJB Users List
Subject: pool question


Hi,
    I'm confused about how maxWait and whenExhaustedAction work together in the 
connection-pool tag of the repository_database.xml file. 
    Is maxWait only used when whenExhaustedAction="1" (block when pool is exhausted) 
or is it used when whenExhaustedAction="0" (fail when pool is exhausted) and 
whenExhaustedAction="2" (grow when pool is exhausted) too?

Thanks,
    Jair Jr

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to