Re: [commons-dbcp] branch master updated: Update MXBean for use of Duration with BasicDataSource
XxxxMXBean interfaces are (arguably) a special case since they exist to expose methods via JMX. I wouldn't expect any users of DBCP to be implementing this interface. If we think there is a real risk that users have implemented this interface (for what use case?) then I can add default implementations for those methods. Mark On 05/01/2022 19:36, Gary Gregory wrote: If you add methods to an existing interface, this will break binary compatibility unless you add them as default methods. Or am i missing something? Gary On Wed, Jan 5, 2022, 14:10 wrote: This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git The following commit(s) were added to refs/heads/master by this push: new 28eb33b Update MXBean for use of Duration with BasicDataSource 28eb33b is described below commit 28eb33b5b3551de2e630a4cb59dc3bc5506f8114 Author: Mark Thomas AuthorDate: Wed Jan 5 19:07:51 2022 + Update MXBean for use of Duration with BasicDataSource --- .../org/apache/commons/dbcp2/BasicDataSource.java | 7 ++ .../org/apache/commons/dbcp2/DataSourceMXBean.java | 77 ++ .../commons/dbcp2/TestBasicDataSourceMXBean.java | 37 +++ 3 files changed, 121 insertions(+) diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java index 07615d2..bb451cd 100644 --- a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java +++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java @@ -1064,6 +1064,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * @return the maximum permitted duration of a connection. * @since 2.10.0 */ +@Override public Duration getMaxConnDuration() { return maxConnDuration; } @@ -1123,6 +1124,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * @return the maxWaitDuration property value. * @since 2.10.0 */ +@Override public synchronized Duration getMaxWaitDuration() { return this.maxWaitDuration; } @@ -1147,6 +1149,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * @see #setMinEvictableIdle(Duration) * @since 2.10.0 */ +@Override public synchronized Duration getMinEvictableIdleDuration() { return this.minEvictableIdleDuration; } @@ -1324,6 +1327,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * @return Timeout before an abandoned connection can be removed. * @since 2.10.0 */ +@Override public Duration getRemoveAbandonedTimeoutDuration() { return abandonedConfig == null ? Duration.ofSeconds(300) : abandonedConfig.getRemoveAbandonedTimeoutDuration(); } @@ -1353,6 +1357,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * there are minIdle idle connections in the pool * @since 2.10.0 */ +@Override public synchronized Duration getSoftMinEvictableIdleDuration() { return softMinEvictableIdleDuration; } @@ -1429,6 +1434,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * @see #setDurationBetweenEvictionRuns(Duration) * @since 2.10.0 */ +@Override public synchronized Duration getDurationBetweenEvictionRuns() { return this.durationBetweenEvictionRuns; } @@ -1482,6 +1488,7 @@ public class BasicDataSource implements DataSource, BasicDataSourceMXBean, MBean * * @return the timeout in seconds before connection validation queries fail. */ +@Override public Duration getValidationQueryTimeoutDuration() { return validationQueryTimeoutDuration; } diff --git a/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java b/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java index 56fb5c8..9922542 100644 --- a/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java +++ b/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java @@ -17,6 +17,7 @@ package org.apache.commons.dbcp2; import java.sql.SQLException; +import java.time.Duration; /** * Defines the methods that will be made available via @@ -138,10 +139,21 @@ public interface DataSourceMXBean { boolean getLogExpiredConnections(); /** + * See {@link BasicDataSource#getMaxConnDuration()}. + * + * @return {@link BasicDataSource#getMaxConnDuration()}. + * @since 2.10.0 + */ +Duration getMaxConnDuration(); + +/** * See {@link BasicDataSource#getMaxConnLifetimeMillis()}. * * @return {@link BasicDataSource#getMaxConnLifetimeMillis()}. + * + * @deprecated Use {@link #getMaxConnDurati
Re: [VOTE] Release Apache Commons JCS 3.1 based on rc2
Did you have an old NOTICE file in the directory where you built the jcs release? I read the release instructions [1] and the code of commons-release-plugin [2], and found nothing that appeared to replace files or dates. The tag on GitHub is showing NOTICE.txt (with the extension) with the correct dates. Maybe somebody else knows how that can happen. -Bruno [1] https://commons.apache.org/releases/prepare.html [2] https://github.com/apache/commons-release-plugin/tree/966cb151acba3939e90a0572df3a03de7ad6ed16/src/assembly On Thursday, 6 January 2022, 12:25:20 am NZDT, Thomas Vandahl wrote: Hi Bruno, > Am 05.01.2022 um 06:41 schrieb Bruno P. Kinoshita > : > > I didn't have much time, so inspected only one file, randomly selected, from > the dist area. The src zip. @Thomas, I think the NOTICE has the date 2020? I > think that can be fixed later? Everything else looks OK in that file. This is what the maven-remote-resources-plugin puts out, probably based on ${project.build.outputTimestamp}. No idea where it comes from and who sets this. Anyone? Bye, Thomas - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [commons-dbcp] branch master updated: Update MXBean for use of Duration with BasicDataSource
If you add methods to an existing interface, this will break binary compatibility unless you add them as default methods. Or am i missing something? Gary On Wed, Jan 5, 2022, 14:10 wrote: > This is an automated email from the ASF dual-hosted git repository. > > markt pushed a commit to branch master > in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git > > > The following commit(s) were added to refs/heads/master by this push: > new 28eb33b Update MXBean for use of Duration with BasicDataSource > 28eb33b is described below > > commit 28eb33b5b3551de2e630a4cb59dc3bc5506f8114 > Author: Mark Thomas > AuthorDate: Wed Jan 5 19:07:51 2022 + > > Update MXBean for use of Duration with BasicDataSource > --- > .../org/apache/commons/dbcp2/BasicDataSource.java | 7 ++ > .../org/apache/commons/dbcp2/DataSourceMXBean.java | 77 > ++ > .../commons/dbcp2/TestBasicDataSourceMXBean.java | 37 +++ > 3 files changed, 121 insertions(+) > > diff --git a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java > b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java > index 07615d2..bb451cd 100644 > --- a/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java > +++ b/src/main/java/org/apache/commons/dbcp2/BasicDataSource.java > @@ -1064,6 +1064,7 @@ public class BasicDataSource implements DataSource, > BasicDataSourceMXBean, MBean > * @return the maximum permitted duration of a connection. > * @since 2.10.0 > */ > +@Override > public Duration getMaxConnDuration() { > return maxConnDuration; > } > @@ -1123,6 +1124,7 @@ public class BasicDataSource implements DataSource, > BasicDataSourceMXBean, MBean > * @return the maxWaitDuration property value. > * @since 2.10.0 > */ > +@Override > public synchronized Duration getMaxWaitDuration() { > return this.maxWaitDuration; > } > @@ -1147,6 +1149,7 @@ public class BasicDataSource implements DataSource, > BasicDataSourceMXBean, MBean > * @see #setMinEvictableIdle(Duration) > * @since 2.10.0 > */ > +@Override > public synchronized Duration getMinEvictableIdleDuration() { > return this.minEvictableIdleDuration; > } > @@ -1324,6 +1327,7 @@ public class BasicDataSource implements DataSource, > BasicDataSourceMXBean, MBean > * @return Timeout before an abandoned connection can be removed. > * @since 2.10.0 > */ > +@Override > public Duration getRemoveAbandonedTimeoutDuration() { > return abandonedConfig == null ? Duration.ofSeconds(300) : > abandonedConfig.getRemoveAbandonedTimeoutDuration(); > } > @@ -1353,6 +1357,7 @@ public class BasicDataSource implements DataSource, > BasicDataSourceMXBean, MBean > * there are minIdle idle connections in the pool > * @since 2.10.0 > */ > +@Override > public synchronized Duration getSoftMinEvictableIdleDuration() { > return softMinEvictableIdleDuration; > } > @@ -1429,6 +1434,7 @@ public class BasicDataSource implements DataSource, > BasicDataSourceMXBean, MBean > * @see #setDurationBetweenEvictionRuns(Duration) > * @since 2.10.0 > */ > +@Override > public synchronized Duration getDurationBetweenEvictionRuns() { > return this.durationBetweenEvictionRuns; > } > @@ -1482,6 +1488,7 @@ public class BasicDataSource implements DataSource, > BasicDataSourceMXBean, MBean > * > * @return the timeout in seconds before connection validation > queries fail. > */ > +@Override > public Duration getValidationQueryTimeoutDuration() { > return validationQueryTimeoutDuration; > } > diff --git a/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java > b/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java > index 56fb5c8..9922542 100644 > --- a/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java > +++ b/src/main/java/org/apache/commons/dbcp2/DataSourceMXBean.java > @@ -17,6 +17,7 @@ > package org.apache.commons.dbcp2; > > import java.sql.SQLException; > +import java.time.Duration; > > /** > * Defines the methods that will be made available via > @@ -138,10 +139,21 @@ public interface DataSourceMXBean { > boolean getLogExpiredConnections(); > > /** > + * See {@link BasicDataSource#getMaxConnDuration()}. > + * > + * @return {@link BasicDataSource#getMaxConnDuration()}. > + * @since 2.10.0 > + */ > +Duration getMaxConnDuration(); > + > +/** > * See {@link BasicDataSource#getMaxConnLifetimeMillis()}. > * > * @return {@link BasicDataSource#getMaxConnLifetimeMillis()}. > + * > + * @deprecated Use {@link #getMaxConnDuration()}. > */ > +@Deprecated > long getMaxConnLifetimeMillis(); > > /** > @@ -166,17 +178,39 @@ public interface DataSourceMXBean { > int getMaxTotal(); > > /** > + * See
Re: [MATH] Build Failure
By the way, we should also start a new ML thread when we change subject (this thread was about "Build Failure", not about modifying a previous PR). Thanks, Gilles Le mer. 5 janv. 2022 à 17:50, Gilles Sadowski a écrit : > > On GH, the "feature" branch referred to below is at > > https://github.com/apache/commons-math/tree/feature__MATH-1563__genetic_algorithm > > Le mer. 5 janv. 2022 à 17:45, Gilles Sadowski a écrit : > > > > Hello. > > > > Le mer. 5 janv. 2022 à 09:26, Avijit Basak a écrit > > : > > > > > > Hi All > > > > > >I have identified a few *protected* methods which could be made > > > *private*. Those are mostly validation methods of input arguments and used > > > internally. Keeping them as protected won't add much value considering > > > future extension. > > > > This is the crux of the above (long) discussion. > > Everything that "could" be private, must be private. > > Anything that does not need to be public should be private > > by default, until a use-case is demonstrated for enhancing > > its visibility status. > > > > > I would like to do the modification. > > >It would be helpful if anyone can confirm the process of checking > > > in > > > new code now. Will it be as part of the same PR(#200) with a new commit? > > > > No. The state of PR #200 as of two days ago is in the > > feature__MATH-1563__genetic_algorithm > > branch.[1] > > From now on, modifications should come as new PRs based against > > that branch (i.e. *not* the "master" branch). > > > > > Would the commit message remain the same as earlier? > > > > No; please describe concisely, but fully, what the commit does. > > [For major changes, it may be useful to also file a JIRA report.] > > If there are several trivial changes, it is preferable that they be > > collected as a single commit (per PR). > > In this instance, the commit message could just be > > ---CUT--- > > Changed "protected" to "private". > > ---CUT--- > > without much more details, since it is in line with the general > > consensus that more "privacy" is better. ;-) > > However, please be careful to not mix several types of changes > > (e.g. visibility level changes and formatting changes) within the > > same commit. > > > > Thanks in advance, > > Gilles > > > > [1] > > https://gitbox.apache.org/repos/asf?p=commons-math.git;a=shortlog;h=refs/heads/feature__MATH-1563__genetic_algorithm > > > > > > > > Thanks & Regards > > > --Avijit Basak > > > > > > On Sun, 2 Jan 2022 at 19:05, Avijit Basak wrote: > > > > > > > Hi All > > > > > > > > I have created a new *PR*(*#200*) with all changes under a > > > > single > > > > commit message. Kindly review the same and let me know if any further > > > > change is required. > > > > > > > > Thanks & Regards > > > > --Avijit Basak > > > > > > > > > [...] - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [MATH] Build Failure
On GH, the "feature" branch referred to below is at https://github.com/apache/commons-math/tree/feature__MATH-1563__genetic_algorithm Le mer. 5 janv. 2022 à 17:45, Gilles Sadowski a écrit : > > Hello. > > Le mer. 5 janv. 2022 à 09:26, Avijit Basak a écrit : > > > > Hi All > > > >I have identified a few *protected* methods which could be made > > *private*. Those are mostly validation methods of input arguments and used > > internally. Keeping them as protected won't add much value considering > > future extension. > > This is the crux of the above (long) discussion. > Everything that "could" be private, must be private. > Anything that does not need to be public should be private > by default, until a use-case is demonstrated for enhancing > its visibility status. > > > I would like to do the modification. > >It would be helpful if anyone can confirm the process of checking in > > new code now. Will it be as part of the same PR(#200) with a new commit? > > No. The state of PR #200 as of two days ago is in the > feature__MATH-1563__genetic_algorithm > branch.[1] > From now on, modifications should come as new PRs based against > that branch (i.e. *not* the "master" branch). > > > Would the commit message remain the same as earlier? > > No; please describe concisely, but fully, what the commit does. > [For major changes, it may be useful to also file a JIRA report.] > If there are several trivial changes, it is preferable that they be > collected as a single commit (per PR). > In this instance, the commit message could just be > ---CUT--- > Changed "protected" to "private". > ---CUT--- > without much more details, since it is in line with the general > consensus that more "privacy" is better. ;-) > However, please be careful to not mix several types of changes > (e.g. visibility level changes and formatting changes) within the > same commit. > > Thanks in advance, > Gilles > > [1] > https://gitbox.apache.org/repos/asf?p=commons-math.git;a=shortlog;h=refs/heads/feature__MATH-1563__genetic_algorithm > > > > > Thanks & Regards > > --Avijit Basak > > > > On Sun, 2 Jan 2022 at 19:05, Avijit Basak wrote: > > > > > Hi All > > > > > > I have created a new *PR*(*#200*) with all changes under a single > > > commit message. Kindly review the same and let me know if any further > > > change is required. > > > > > > Thanks & Regards > > > --Avijit Basak > > > > > > > [...] - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [MATH] Build Failure
Hello. Le mer. 5 janv. 2022 à 09:26, Avijit Basak a écrit : > > Hi All > >I have identified a few *protected* methods which could be made > *private*. Those are mostly validation methods of input arguments and used > internally. Keeping them as protected won't add much value considering > future extension. This is the crux of the above (long) discussion. Everything that "could" be private, must be private. Anything that does not need to be public should be private by default, until a use-case is demonstrated for enhancing its visibility status. > I would like to do the modification. >It would be helpful if anyone can confirm the process of checking in > new code now. Will it be as part of the same PR(#200) with a new commit? No. The state of PR #200 as of two days ago is in the feature__MATH-1563__genetic_algorithm branch.[1] >From now on, modifications should come as new PRs based against that branch (i.e. *not* the "master" branch). > Would the commit message remain the same as earlier? No; please describe concisely, but fully, what the commit does. [For major changes, it may be useful to also file a JIRA report.] If there are several trivial changes, it is preferable that they be collected as a single commit (per PR). In this instance, the commit message could just be ---CUT--- Changed "protected" to "private". ---CUT--- without much more details, since it is in line with the general consensus that more "privacy" is better. ;-) However, please be careful to not mix several types of changes (e.g. visibility level changes and formatting changes) within the same commit. Thanks in advance, Gilles [1] https://gitbox.apache.org/repos/asf?p=commons-math.git;a=shortlog;h=refs/heads/feature__MATH-1563__genetic_algorithm > > Thanks & Regards > --Avijit Basak > > On Sun, 2 Jan 2022 at 19:05, Avijit Basak wrote: > > > Hi All > > > > I have created a new *PR*(*#200*) with all changes under a single > > commit message. Kindly review the same and let me know if any further > > change is required. > > > > Thanks & Regards > > --Avijit Basak > > > > > [...] - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [VOTE] Release Apache Commons JCS 3.1 based on rc2
Hi Bruno, > Am 05.01.2022 um 06:41 schrieb Bruno P. Kinoshita > : > > I didn't have much time, so inspected only one file, randomly selected, from > the dist area. The src zip. @Thomas, I think the NOTICE has the date 2020? I > think that can be fixed later? Everything else looks OK in that file. This is what the maven-remote-resources-plugin puts out, probably based on ${project.build.outputTimestamp}. No idea where it comes from and who sets this. Anyone? Bye, Thomas - To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org
Re: [MATH] Build Failure
Hi All I have identified a few *protected* methods which could be made *private*. Those are mostly validation methods of input arguments and used internally. Keeping them as protected won't add much value considering future extension. I would like to do the modification. It would be helpful if anyone can confirm the process of checking in new code now. Will it be as part of the same PR(#200) with a new commit? Would the commit message remain the same as earlier? Thanks & Regards --Avijit Basak On Sun, 2 Jan 2022 at 19:05, Avijit Basak wrote: > Hi All > > I have created a new *PR*(*#200*) with all changes under a single > commit message. Kindly review the same and let me know if any further > change is required. > > Thanks & Regards > --Avijit Basak > > On Mon, 27 Dec 2021 at 23:31, Gilles Sadowski > wrote: > >> Hello. >> >> Le lun. 27 déc. 2021 à 16:02, Avijit Basak a >> écrit : >> > >> > Hi All >> > >> > Please ignore my previous mail. The rebase is done successfully. >> > Please let me know if there is any issue. >> >> Here is a the list of commit messages that are should not be >> present (at least not when introducing completely new code): >> >> Merge branch 'feature/MATH-1563-ADAPTIVE' of >> https://github.com/avijitbasak/commons-math.git into >> feature/MATH-1563-ADAPTIVE >> removed 64 by Long.SIZE >> Merge branch 'master' of https://github.com/apache/commons-math.git >> into feature/MATH-1563-ADAPTIVE >> Minor change for UniformRandomProvider >> modified as per PMD recommendations >> updated for checkstyle formatting >> An optimized data structure implementation for binary chromosome >> minor modifications >> Modifications as per review comments >> Developed the new genetic algorithm module following the JIRA MATH-1563. >> >> What I suggested is to check out a pristine copy of "master", and copy >> the new files onto it, and only change whatever needs to be touched for >> the new contents to be handled correctly (i.e. just the POM files I >> guess). >> >> Then generate a _new_ PR (and close #199). >> There should be a _single_ commit with a log message of the form: >> ---CUT--- >> MATH-1563: Introducing new implementation of GA functionality (WIP). >> ---CUT--- >> >> [If you don't want to give more details about all the changes, please >> stick to the above sentence. Note that the convention is that the >> issue identifier be followed by a colon; then, as the commit log >> summary, a single sentence, ending with a period, on the first line.] >> >> Thanks, >> Gilles >> >> > >> > Thanks & Regards >> > --Avijit Basak >> > >> > On Mon, 27 Dec 2021 at 19:21, Avijit Basak >> wrote: >> > >> > > Hi All >> > > >> > > I have tried to rebase. However I found too many conflicts and >> > > most of them are unnecessary. So I aborted the process. Can we avoid >> the >> > > rebase as we have very few commits after the last rebase. Please >> share your >> > > views on this. >> > > >> > > Thanks & Regards >> > > --Avijit Basak >> > > >> > > On Sat, 25 Dec 2021 at 18:45, Gilles Sadowski >> > > wrote: >> > > >> > >> Hello. >> > >> >> > >> I've fetched the current contents of PR 199; locally, the build >> completes >> > >> successfully, so the problem reported by Travis looks strange indeed. >> > >> I would create a branch for further discussion on your GA design but >> > >> please first create a *single* commit that contains all changes wrt >> to >> > >> current "master" with a clear log message (first word *must* be the >> JIRA >> > >> identifier of your proposal (perhaps a new JIRA report would be >> clearer?), >> > >> like: >> > >> ---CUT--- >> > >> MATH-: Refactoring of GA functionality (WIP) >> > >> >> > >> Summary of what has been implemented (with the corresponding JIRA >> > >> reports)... >> > >> >> > >> (optionally) Summary what is under discussion... >> > >> ---CUT--- >> > >> >> > >> Thanks, >> > >> Gilles >> > >> >> > >> >> [...] >> >> - >> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org >> For additional commands, e-mail: dev-h...@commons.apache.org >> >> > > -- > Avijit Basak > -- Avijit Basak