I can't help you in java sorry - in c# I would (possibly, without knowing any more of your requirements)
a) write a 'Win32' service
b) the service would use FileSystemWatcher
FileSystemWatcher Class (System.IO)[
^]
c) when a file is added
ci) of the correct name
cii) with proper content
I would
d) extract & upload the xml/data and upload to your database
e) any files no matching name &/or content at ci && cii get put into an error file and reported on later
f) the service would provide (through some interface) stats on successful files vs 'error' files etc
This could be split into 'two different' services/apps, but maybe that's overkill, it depends on the volume/frequency of the uploads etc
in c#, you can use 'TopShelf' as the basis for a Service - this might be worthwhile looking at
[NuGet Gallery | Topshelf.FileSystemWatcher 1.0.0.17](https://www.nuget.org/packages/Topshelf.FileSystemWatcher/) [
^]
I'm pretty sure its easy enough to do in java