}
public void testConcurrentTransactions() throws IOException {
//JDBCFeatureStore fs = (JDBCFeatureStore) dataStore.getFeatureSource(tname("ft1"));
Transaction tx1 = new DefaultTransaction();
//tx1.putState( fs, new JDBCTransactionState( fs ) );
Transaction tx2 = new DefaultTransaction();
//tx2.putState( fs, new JDBCTransactionState( fs ) );
FeatureWriter<SimpleFeatureType, SimpleFeature> w1 = dataStore.getFeatureWriterAppend(tname("ft1"), tx1);
FeatureWriter<SimpleFeatureType, SimpleFeature> w2 = dataStore.getFeatureWriterAppend(tname("ft1"), tx2);
SimpleFeature f1 = w1.next();
SimpleFeature f2 = w2.next();
f1.setAttribute(aname("intProperty"), new Integer(100));
f2.setAttribute(aname("intProperty"), new Integer(101));
w1.write();
w2.write();
w1.close();
w2.close();
tx1.commit();
tx2.commit();
tx1.close();
tx2.close();
SimpleFeatureCollection fc = dataStore.getFeatureSource(tname("ft1")).getFeatures();
assertEquals(5, fc.size());
}