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

Lukas Ott closed PLC4X-135.
---------------------------
    Resolution: Auto Closed

> Allow the PooledPlcDriverManager to use a given PlcDriverManager as "base"
> --------------------------------------------------------------------------
>
>                 Key: PLC4X-135
>                 URL: https://issues.apache.org/jira/browse/PLC4X-135
>             Project: Apache PLC4X
>          Issue Type: New Feature
>            Reporter: Julian Feinauer
>            Priority: Major
>
> Currently, the pool automatically creates a new Driver Manager (via a 
> possibly given ClassLoader).
> But it would be good to use a given one so that one can, e.g. use Monitoring 
> or other Things on the Manager.
> Reason is that we use Subclassing there instead of delegate, see
> {code:java}
>   private void setFromPoolCreator(PooledPlcDriverManager.PoolCreator 
> poolCreator) {
>     this.keyedObjectPool = poolCreator.createPool(new 
> PooledPlcConnectionFactory() {
>       public PlcConnection create(PoolKey key) throws Exception {
>         PlcAuthentication plcAuthentication = key.plcAuthentication;
>         String url = key.url;
>         if (plcAuthentication == PooledPlcDriverManager.noPlcAuthentication) {
>           PooledPlcDriverManager.LOGGER.debug("getting actual connection for 
> {}", url);
>           return PooledPlcDriverManager.super.getConnection(url);
>         } else {
>           PooledPlcDriverManager.LOGGER.debug("getting actual connection for 
> {} and plcAuthentication {}", url, plcAuthentication);
>           return PooledPlcDriverManager.super.getConnection(url, 
> plcAuthentication);
>         }
>       }
>     });
>   }
> {code}
> from org.apache.plc4x.java.utils.connectionpool.PooledPlcDriverManager.java;



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to