Triple t2 = SSE.parseTriple("(:x2 :p :z)") ;
boolean explicitTransactions = false ;
// Make store.
{
SDBConnection sConn1 = SDBConnectionFactory.create(conn) ;
Store store1 = StoreFactory.create(sConn1, store.getLayoutType(), store.getDatabaseType()) ;
if ( explicitTransactions )
store1.getConnection().getTransactionHandler().begin() ;
Graph graph1 = SDBFactory.connectDefaultGraph(store1) ;
graph1.add(t1) ;
assertTrue(graph1.contains(t1)) ;
if ( explicitTransactions )
{
store1.getConnection().getTransactionHandler().commit() ;
assertTrue(graph1.contains(t1)) ;
}
//store1.close() ;
}
// Mythically return conn to the pool.
// Get from pool
// i.e. same connection. Make a store around it
{
SDBConnection sConn2 = SDBConnectionFactory.create(conn) ;
Store store2 = StoreFactory.create(sConn2, store.getLayoutType(), store.getDatabaseType()) ;
if ( explicitTransactions )
store2.getConnection().getTransactionHandler().begin() ;