commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: [POOL] Use of Exception for caller class info
Date Fri, 03 Mar 2017 20:08:54 GMT
I remember that :)

On 3 March 2017 at 12:15, Gary Gregory <garydgregory@gmail.com> wrote:

> Hi Matt,
>
> Feel free to hack on this yourself as all Apache Committers have karma
> within Apache Commons.
>
> Gary
>
> On Fri, Mar 3, 2017 at 9:58 AM, Mark Thomas <markt@apache.org> wrote:
>
> > On 03/03/2017 16:13, Matt Sicker wrote:
> > > I started using commons-pool 2 yesterday to implement connection
> pooling
> > > for Elasticsearch (mainly for health checking, though who knows where
> > this
> > > internal project ends up going) and I noticed that Exception is used to
> > > track users of objects from the pool. In Log4j, we use a myriad of
> > > strategies to obtain caller class info that are much faster than
> > generating
> > > a stack trace such as the internal sun Reflection class, a
> > SecurityManager,
> > > and we're also looking at the Java 9 StackWalker class which provides a
> > > standard way of doing it. Is there any particular reason why
> > > DefaultPooledObject uses Exception instead of faster strategies?
> >
> > The code dates back a good number of years (probably more than a decade)
> > and no-one - to date - has felt the urge to improve it.
> >
> > As always, patches welcome.
> >
> > Mark
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
> >
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Matt Sicker <boards@gmail.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message