You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2012/04/27 14:55:49 UTC

[jira] [Created] (POOL-214) GenericObjectPool.evictionPolicy not thread-safe

Sebb created POOL-214:
-------------------------

             Summary: GenericObjectPool.evictionPolicy not thread-safe
                 Key: POOL-214
                 URL: https://issues.apache.org/jira/browse/POOL-214
             Project: Commons Pool
          Issue Type: Bug
            Reporter: Sebb


The instance field GenericObjectPool.evictionPolicy is not updated in a thread-safe way.

It either needs to be made volatile, or the getters/setters could synch. on the evictionLock.
The latter is probably more sensible, as the field is used whilst holding that lock.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (POOL-214) GenericObjectPool.evictionPolicy not thread-safe

Posted by "Mark Thomas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Thomas resolved POOL-214.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

This was resolved as part of the refactoring to use BaseGenericObjectPool
                
> GenericObjectPool.evictionPolicy not thread-safe
> ------------------------------------------------
>
>                 Key: POOL-214
>                 URL: https://issues.apache.org/jira/browse/POOL-214
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 2.0
>
>
> The instance field GenericObjectPool.evictionPolicy is not updated in a thread-safe way.
> It either needs to be made volatile, or the getters/setters could synch. on the evictionLock.
> The latter is probably more sensible, as the field is used whilst holding that lock.
> [Note: AFAICT, that is currently the only unsafe field in GOP]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (POOL-214) GenericObjectPool.evictionPolicy not thread-safe

Posted by "Sebb (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/POOL-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb updated POOL-214:
----------------------

    Description: 
The instance field GenericObjectPool.evictionPolicy is not updated in a thread-safe way.

It either needs to be made volatile, or the getters/setters could synch. on the evictionLock.
The latter is probably more sensible, as the field is used whilst holding that lock.

[Note: AFAICT, that is currently the only unsafe field in GOP]

  was:
The instance field GenericObjectPool.evictionPolicy is not updated in a thread-safe way.

It either needs to be made volatile, or the getters/setters could synch. on the evictionLock.
The latter is probably more sensible, as the field is used whilst holding that lock.

    
> GenericObjectPool.evictionPolicy not thread-safe
> ------------------------------------------------
>
>                 Key: POOL-214
>                 URL: https://issues.apache.org/jira/browse/POOL-214
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Sebb
>
> The instance field GenericObjectPool.evictionPolicy is not updated in a thread-safe way.
> It either needs to be made volatile, or the getters/setters could synch. on the evictionLock.
> The latter is probably more sensible, as the field is used whilst holding that lock.
> [Note: AFAICT, that is currently the only unsafe field in GOP]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira