Liam Coughlin wrote:

b) Yes it will have a thread safety issue -- you'll need to synchronize on
something when setting the pmdKnownBroken variable.

When setting? Or when reading? Remember, once pmdKnownBroken is true, it will never again be false, so there's no risk that one thread will try to set it to true and another thread will try to set it to false.

IMO the biggest risks here are:

1) Running getParameterType too many times (ideally we should only ever run it once on Oracle, but that may be too much to ask)

2) We overcompensate and create an unecessary synchronization bottleneck

What if I just make pmdKnownBroken "volatile"?

-Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to