Hi Dale,
From a quick once over of the code, it looks like the
FeatureEventListener implementation for the JDBC datastores will only
fire feature events for the FeatureStore which adding features to the
database.
In the context of GeoServer, this may work if the features are being
added via WFS-T (or another GeoServer based import method). I don't
think a FeatureEventListener in GeoServer has any kind of Postgres
database triggers/callbacks configured.
Hope that helps.
Cheers,
Jim
On 09/13/2016 10:19 AM, Dale F. McIntosh wrote:
> I am trying to response to feature changes on a PostgresSQL/PostGIS database.
>
> I'm using GeoServer version 2.9.1, GeoTools 15.1, PostgreSQL 9.5, , PostGIS
> 2.2.1
>
> When I attach a FeatureListener to the consumer feature source, I don't get
> any events when I perform CRUD operations on the features using the GeoServer
> REST interface.
>
> FeatureTypeInfo fti =
> catalog.getFeatureTypeByName("c2rpc:Track");
> FeatureSource<? extends FeatureType, ? extends Feature>
> consumerFS = fti.getFeatureSource(null, null);
> FeatureListener consumerFL = null;
> logger.log(Level.INFO, "Registering a feature listener
> for feature type " + name.getURI() + ".");
>
> consumerFS.addFeatureListener(consumerFL = new
> FeatureListener() {
> public void changed(FeatureEvent featureEvent) {
> logger.log(Level.INFO, "Received
> FeatureEvent from layer " + name.getURI() + " of Type: " +
> featureEvent.getType());
> }
> });
>
> Is there something I'm doing wrong, something I need to configure, or is
> FeatureListener eventing not hooked up to the PostGIS Data Store?
>
> Thanks,
> Dale McIntosh
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> GeoTools-GT2-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users