You could put a timestamp on each record and then do a polling loop
looking for records newer than the last record you found previously.
That would detect the new records inserted by Java.
i misread the OP. sorry about that.
Keep up to date with Rails on Twitter and This Week in Rails
Policies: Conduct, License, Maintenance, Security, Trademarks