Skip to content

Commit

Permalink
Bring documentation of acquireRetryAttempts into sync with c3p0's act…
Browse files Browse the repository at this point in the history
…ual behavior.
  • Loading branch information
swaldman committed Feb 18, 2024
1 parent adff508 commit 24a5fed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
-- Bring documentation of acquireRetryAttempts into sync with c3p0's actual behavior.
See https://github.com/swaldman/c3p0/issues/132
Thanks marcatl, MichaelMih, Leona Nezvalova!
-- Include license files in published source jar.
See https://github.com/swaldman/c3p0/issues/167
c3p0-0.10.0-pre2
Expand Down
6 changes: 3 additions & 3 deletions doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ <h3>
the DataSource will see an Exception, indicating that a Connection could not be acquired.
Note that clients do not see any Exception until a full round of attempts fail, which
may be some time after the initial Connection attempt. If <tt>acquireRetryAttempts</tt>
is set to 0, c3p0 will attempt to acquire new Connections indefinitely, and calls to
is set to a value less than 0, c3p0 will attempt to acquire new Connections indefinitely, and calls to
<tt>getConnection()</tt> may block indefinitely waiting for a successful acquisition.
</p>
<p>
Expand Down Expand Up @@ -2218,8 +2218,8 @@ <h3>
<dd>
<div class="default">Default: 30</div>
<div class="propdesc">
Defines how many times c3p0 will try to acquire a new Connection from the database before giving up. If
this value is less than or equal to zero, c3p0 will keep trying to fetch a Connection indefinitely.
Defines how many times c3p0 will retry after a failure to acquire a new Connection from the database before giving up. If
this value is less than zero, c3p0 will keep trying to fetch a Connection indefinitely.
[See <a href="#configuring_recovery">"Configuring Recovery From Database Outages"</a>]
</div>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion src/com/mchange/v2/resourcepool/BasicResourcePool.java
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ private void doAcquireAndDecrementPendingAcquiresWithinLockAlways() throws Excep
{ doAcquire( DECREMENT_WITH_CERTAINTY ); }

private final static int NO_DECREMENT = 0;
private final static int DECREMENT_ON_SUCCESS =1;
private final static int DECREMENT_ON_SUCCESS = 1;
private final static int DECREMENT_WITH_CERTAINTY = 2;

private void doAcquire( int decrement_policy ) throws Exception
Expand Down

0 comments on commit 24a5fed

Please sign in to comment.