EnsLib.SQL.OutboundAdapter and StayConnected Setting
Has anyone use any other setting then -1 on the Stay Connected setting on a SQL.OutboundAdapter? I am having issues with a particular database and wonder if it would be beneficial since I only connect once a day to read the data from the Adapter to create an HL7 message.
Thanks
Scott Roth
Comments
Scott,
if you use this just once a day there is no added value to keep the connection up.
It's rather the risk that some piece in between terminates it and triggers an error on your side.
With any value other -1 you disconnect or get disconnected but it's no error but expected behavior
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=ETCP_settings_outbound#ETCP_C220762
Good question, Scott. Yep, we also use stay connected =5, otherwise it will raise too often the alert. We are using ODBC, not JDBC though, however I don't think that makes much difference in this connection config.
Definitely, try Stay Connected = 5 so the connection would drop five seconds after data transfer.