commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DBCP-434) Disable JMX for Statement Pool
Date Wed, 11 Feb 2015 13:47:12 GMT

     [ https://issues.apache.org/jira/browse/DBCP-434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Phil Steitz updated DBCP-434:
-----------------------------
    Attachment: DBCP-434.patch

Any objections to this patch?

> Disable JMX for Statement Pool
> ------------------------------
>
>                 Key: DBCP-434
>                 URL: https://issues.apache.org/jira/browse/DBCP-434
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>         Environment: commons-dbcp2: 2.0.1
> commons-pool2: 2.3
>            Reporter: Thomas Thieringer
>         Attachments: DBCP-434.patch
>
>
> I'm using the PoolableConnectionFactory and don't care about JMX, so I don't set the
dataSourceJmxName, but I want to use a pool for my PreparedStatements. The makeObject() method
initializes this pool automatically (lines 224-243) but seems to forget to disable JMX completely
if I don't want it, i.e. GenericKeyedObjectPoolConfig.setJmxEnabled(...) is never called and
always has the default value (=true). Therefore the JMX registration happens, which can cause
a problem for me because of security constraints.
> Because of the way the makeObject() method is written, I have no influence on this part,
so my quick solution was to disable the poolStatement option for the PoolableConnectionFactory
and provide a custom ConnectionFactory object instead that basically does the same thing with
the statement pool and also disables the JMX option.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message