Aklakan commented on issue #1384:
URL: https://github.com/apache/jena/issues/1384#issuecomment-1157545018

   > This also means you can develop, try out and change based on your usage 
before it gets "frozen" by putting it in Jena.
   Yes sure
   
   > Is it something general other users would want?
   Well it's the analogy to JDBC, where DataSource is the factory for 
connection instances. 
   Based on DataSource, there are systems such as 
[Hikari](https://github.com/brettwooldridge/HikariCP) that implement connection 
pooling, automatic stale connection detection and replay of statements that 
failed due to connection loss.
   The pooling aspect is particularly nice, because it enables components to 
frequently acquire short-lived connections (OLTP) Close those connections make 
them go back into the local pool without actually closing the physical 
connection to the database.
   
   Also in the LSQ system, I use the RDF-variant of that interface for 
connection recovery: If it turns out that a connection was lost (e.g. due to a 
system-under-test actually crashing on a query) I can call `getConnection()` in 
a loop in an attempt to reconnect (e.g. while the docker container restarts). 
**using whatever settings were in place when the DataSource was created**.
   So this pattern with an (RDF)DataSource is not my invention - but I noticed 
it's not part of the RDFConnection API.
   
   If you want more evidence I could also eventually write to the Jena dev 
mailing list about
   
   > This also means you can develop, try out and change based on your usage 
before it gets "frozen" by putting it in Jena.
   
   Yes, sure, I don't mean to 'spam' Jena with my custom components. But I 
think an assembler for the already Jena native class RDFConnection (maybe later 
also RDFDataSource) would be nice. But for now I'll go ahead as you suggest 
with making the changes in my own code.
   
   I leave the issue open in case you want to leave a comment on the 
RDFDataSource, other than that you can close it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to