Github user afs commented on the issue:

    https://github.com/apache/jena/pull/161
  
    Example:
    ```
        public static void dsgTxn() {
            DatasetGraphTransaction.promotion = true ;
            DatasetGraph dsg = TDBFactory.createDatasetGraph() ;
    
            Quad q1 = SSE.parseQuad("(_ :s :p1 1)") ;
            
            dsg.begin(ReadWrite.READ); 
            // Start R->W here
            dsg.add(q1) ;
            dsg.commit();
            dsg.end() ;
    
            Txn.execRead(dsg, ()->{
                RDFDataMgr.write(System.out, dsg.getDefaultGraph(), Lang.NT);
            });
            
            System.out.println("DONE") ;
        }
    ```
    
    NB Current `Txn` does not work for promotion - it needs to `commit()`, not 
just `end()` a read transaction.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to