Hey everybody

First topic:
I just faced the problem of validating a given connection string to a PlcField 
(in general) for syntactical correctness.
For S7Field we implemented some static functionality (“matches(String)”) to 
check if the given string matches the PATTERNs , but i think we should 
implement something similar for all other implemented Devices/FieldTypes; as 
Java does not offer to override a static method defined in interface in an 
implemented class we should think about another solution.
I had a chat with Julian on slack and he suggested to acquire at first a Driver 
from DriverManager whereas the given driver (or connection) offers a method 
where the validation of a connection string to a field 
(“validateQuery(String)“) could be performed. Furthermore also DriverManager 
could offer a method to validate a field-connection-string and returning for 
what kind of Driver that string could be used.
I would highly appreciate to have a connection-string-validation as soon as 
possible; I also can start implementing that (@Chris,@Julian I promise to 
finish that in an appropriate amount of time, not like with my scraper-branch 
--> Sorry for that).

Second topic:
Close related is another topic I had some issues with: when fetching a 
Connection via getConnection() from a DriverManager we currently perform an 
implicit connect() to that connection. I think we should offer the user the 
possibility to connect to the connection on his request.

What do u think about these two topics?

Best
Tim

Reply via email to