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

Phil Steitz closed DBCP-434.
----------------------------

> 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
>             Fix For: 2.1
>
>         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)

Reply via email to