Aklakan commented on PR #3511:
URL: https://github.com/apache/jena/pull/3511#issuecomment-3633553744

   I think there are three meaningful policies for how to pass on transactions 
when doing
   
   ```java
   DatasetGraphOverRDFLink dsg = new DatasetGraphOverRDFLink(linkCreator);
   RDFLink frontLink = RDFLink.connect(dsg);
   
   RDFLink backingLink = dsg.newLink(); // Calls linkCreator.create()
   ```
   
   * Link-per-execution: Every query exec obtained from the front facing link, 
such as via `QueryExec qe = frontLink.query(...)`, is backed by a fresh backing 
link (`dsg.newLink()`) that is closed when `qe` is closed.
   * Pass through: `RDFLink.connect(dsg)` returns the same link returned by 
`dsg.newLink()`. This is currently unsupported because it would require 
adapting `RDFLink.connect`.
   * Thread-local-links: `dsg.begin()` will open a link via `dsg.newLink()` and 
place it into a ThreadLocal. All further API calls will go to that backing link 
until `dsg.end()` is called.
    The behavior should be the same as pass-through. The only difference is, 
that the link returned by `RDFLink.connect` is a wrapper that delegates to the 
backing link in dsg's thread local.
   
   I updated the code of `DatasetGraphOverRDFLink` with an internal 
`TransactionalOverRDFLink` class for the thread-local-links policy.
   


-- 
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