There is a requirement for me where when data is inserted into Oracle table, Front-end react should notify changes through Java in real-time. I have no idea how to do it. Any of you implemented this kind of requirement, please share your thoughts and suggestions.
In addition to Jan's answer, if you do not have a service layer and want to react to any change in the DB, you might want to use a Trigger which is able to execute (PL/)SQL statements. You can use such a statement to write the changes to a file and use a filesystemwatcher to catch changes in the file system. That way, you will alway immediately find out about any DB changes from the Java server.
Then you should use a websocket implementation, which falls back to long-polling AJAX in order to push out changes immediately to your clients.
Jan Vladimir Mostert
Idea Incubator
Do you have a service layer on top of your Oracle database doing the inserts / updates? If so, your service layer can be pushing updates via Web Sockets.
If someone else is doing the inserts from another application where you are just sharing a database, you need to find out if Oracle DB has a way to notify you of inserts, I doubt it though. Otherwise that other application needs to notify you that it made an insert / update.
If you're looking for Web Sockets solutions, I usually use VertX for web sockets, Spring MVC has that option as well and I'm pretty sure there are other options as well.