[
https://issues.apache.org/jira/browse/PLC4X-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17173840#comment-17173840
]
Christofer Dutz commented on PLC4X-224:
---------------------------------------
As we just chatted about this ... instead of implementing the above map or
explicitly ordert string generation, Julian and I think it would be better to
extend the Configuration with a "equalsForSharing", "equalsForPooling" method
that does the equality check in the Configuration class. As this is the only
one that can know about specific details. Details such as: "Parameter A is only
used for serial connections, so it has to be ignored in case of a tcp
connection" ....
> Add URI normalization method for Connection Strings for PooledDriverManager
> ---------------------------------------------------------------------------
>
> Key: PLC4X-224
> URL: https://issues.apache.org/jira/browse/PLC4X-224
> Project: Apache PLC4X
> Issue Type: Improvement
> Affects Versions: 0.7.0
> Reporter: Julian Feinauer
> Priority: Major
>
> Currently, one could write two "identical" connections with different
> connection strings, e.g.
> {code:java}
> s7://127.0.0.1?rackId=0&slotId=1
> {code}
> and
> {code:java}
> s7://127.0.0.1?slotId=1&rackId=0{code}
> If the connection Pool only looks at String comparison he would open two
> connetions as the strings are different.
> Thus each Connection should have a way to normalize its strings (also paste
> in all defaults) so that two Connection Stirngs beeing equal means the
> Connections are equal and can be shared.
> See PoolKeyFactory.java L44ff
--
This message was sent by Atlassian Jira
(v8.3.4#803005)