Issue Details (XML | Word | Printable)

Key: GEOT-1327
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Jesse Eichar
Reporter: Vitali Diatchkov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
GeoTools

Notification mechanism of feature events needs revisiting

Created: 14/Jun/07 08:18 AM   Updated: 14/Jun/07 08:18 AM
Component/s: data shapefile
Affects Version/s: 2.2.3
Fix Version/s: 2.2.3

Environment: UDIG 1.1 + GeoTools 2.2.x


 Description  « Hide
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.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.