Okay, this still doesnt work.
I stepped through the code and the connection to postgresql is still in
auto-commit mode which would explain why its not working.
private void process() throws Exception
{
DefaultTransaction trans = new DefaultTransaction();
FeatureWriter aWriter = ds.getFeatureWriter(table_name,trans);
while (aWriter.hasNext())
{
Feature f = aWriter.next(); // get a feature
Geometry g = (Geometry) f.getAttribute(source_column);
Geometry g_gen = generalize(g,tolerance);
f.setAttribute(dest_colum,g_gen); // modify it
aWriter.write(); // write it to DB
}
aWriter.close();
trans.commit();
}
I think the connection first gets setup as a reader and gets defaulted
to autocommit and then no one bothers to change it for the transaction
the update system is using.
dave
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel