commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject [POOL] Use of Exception for caller class info
Date Fri, 03 Mar 2017 16:13:37 GMT
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?

-- 
Matt Sicker <boards@gmail.com>

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