tian-zhihui / cordysfilecon

Automatically exported from code.google.com/p/cordysfilecon
Apache License 2.0
0 stars 0 forks source link

Error Notification File Poller #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Feature I would like to see:
If an exception occurs in the file poller we need it to trigger a web service / 
SOAP message. Which SOAP message to send should be configurable.

Impact if not implemented:
Have to use one of the alternatives or project specific patch.

Alternatives:

1) Use a (custom) JMX connector to listen for notifications and call our SOAP 
message.
2) Custom log consumer on a "host"

Original issue reported on code.google.com by nicolaix...@gmail.com on 28 Feb 2011 at 8:41

GoogleCodeExporter commented 8 years ago
I see from the code that it is possible to define a custom 
<error-handler-class>, which so far seem to be the best solution for us. 
However I am not sure if all exceptions/errors are being handled through the 
error handler. Some places it looks like it is just logged using the Cordys 
logger. 

I need to handle both errors that occur in the processing of a file (through 
the states) and error coming from the system (e.g. when a folder can not be 
found).

Original comment by nicolaix...@gmail.com on 28 Feb 2011 at 12:00

GoogleCodeExporter commented 8 years ago
I have now created a patch that allows me to create a more configurable custom 
error handler for the file connector. It stores the entire XML configuration of 
a folder allowing us to keep both standard folder configuration and the custom 
configuration for the file poller in the same XML file.

The notification itself is implemented in a custom error handler class.

Attached are some example code and the XML configuration for the error handler. 
It has been stripped a bit to make it project neutral.

Original comment by nicolaix...@gmail.com on 1 Mar 2011 at 3:52

Attachments:

GoogleCodeExporter commented 8 years ago
Philip, Anantha, what's your opinion on this patch. Can we include this into 
trunk? 

Original comment by ma...@vandeveen.com on 10 Mar 2011 at 4:28

GoogleCodeExporter commented 8 years ago
The patch file itself is fine, so I think it can be included. And since there 
are currently no XSDs that define the format of the configuration XML the 
modifications will not give any problems.

Original comment by pgus...@gmail.com on 14 Mar 2011 at 9:15

GoogleCodeExporter commented 8 years ago
Anantha, can you review this patch as well and move it into trunk?

Original comment by ma...@vandeveen.com on 15 Mar 2011 at 9:46

GoogleCodeExporter commented 8 years ago
Sure.

Original comment by srkrishn...@gtempaccount.com on 16 Mar 2011 at 9:24

GoogleCodeExporter commented 8 years ago
Applied patch. Please refer to changes here r62.

Original comment by srkrishn...@gtempaccount.com on 22 Mar 2011 at 11:10