Notification mechanism of feature events needs revisiting ---------------------------------------------------------
Key: GEOT-1327 URL: http://jira.codehaus.org/browse/GEOT-1327 Project: GeoTools Issue Type: Bug Components: data shapefile Affects Versions: 2.2.3 Environment: UDIG 1.1 + GeoTools 2.2.x Reporter: Vitali Diatchkov Assignee: Jesse Eichar Priority: Critical Fix For: 2.2.3 The problem description: During modifications in ShapefileDataStore through FeatureStore interface notification with feature events works ONLY in case of non-autocommit transaction. When the transaction is non-autocommit, all feature operations go through TransactionStateDiff class. In the chain of FeatureWriters there is a writer being created by TransactionStateDiff that is the only one place to raise feature events through ShapefileDataStore's feature listeners manager (see TransactionStateDiff.writer(..) method that creates DiffFeatureWriter and puts it to the chain of writers). If the transaction is autocommit then TransactionStatDiff is absent in the processing workflow and no other FeatureWriter takes care about notifications. The solution: In the AbstractDataStore (or its implementation classes like ShapefileDataStore) in the methods "getFeatureWriter(...)" to handle AUTO_COMMIT transaction case by wrapping FeatureWriter with "org.geotools.data.NotificationFeatureWriter" that is responsible for raising feature events. Or more optimized similar solution for the particular datastore implementation. AbstractDataStore class may use this general approach, if necessary, implementor may override this behavior to provide custom notification wrappers or other solution. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel