You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Julian Feinauer <j....@pragmaticminds.de> on 2018/09/11 18:57:26 UTC

AutoCloseable for Reader / Writer

Hey Everybody,

we just head the short notice about the „Connection Pool“ earlier today and one thing I wanted to ask with regards to Chris refactoring is, if there is a reason behind the fact that PlcConnection is AutoCloseable but Reader and Writer are not.
Should they have a lifecycle which is strongly bound to “their” PlcConnection (for S7 its pretty obvious).

The reason behind this question is that without AutoCloseable I would not like to use it in a ConnectionPool as the chance is pretty high that clients forget to give back the connection.

If you agree, I think now would be a good time to decide as the current refactoring will change many thinks so this should be no issue.

Best
Julian

Re: AutoCloseable for Reader / Writer

Posted by Christofer Dutz <ch...@c-ware.de>.
No objections :-)

Outlook for Android<https://aka.ms/ghei36> herunterladen

________________________________
From: Julian Feinauer <j....@pragmaticminds.de>
Sent: Tuesday, September 11, 2018 8:57:26 PM
To: dev@plc4x.apache.org
Subject: AutoCloseable for Reader / Writer

Hey Everybody,

we just head the short notice about the „Connection Pool“ earlier today and one thing I wanted to ask with regards to Chris refactoring is, if there is a reason behind the fact that PlcConnection is AutoCloseable but Reader and Writer are not.
Should they have a lifecycle which is strongly bound to “their” PlcConnection (for S7 its pretty obvious).

The reason behind this question is that without AutoCloseable I would not like to use it in a ConnectionPool as the chance is pretty high that clients forget to give back the connection.

If you agree, I think now would be a good time to decide as the current refactoring will change many thinks so this should be no issue.

Best
Julian