Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

live data

 
wu jong
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The data tables in my oracle 9i database change frequently and I want to find a way to get some form of notification (preferrably along with the changed data) to be called in my java app hosted by a servlet container such as Tomcat - what is the best way to go ?

My priliminary reading of oracle specific RowSets indicates that it can notify only if changes are made to its reference and are not when changes are done by somebody else to the database through some other process.
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have a read up on "triggers", these can be performed before/after inserts, updates, deletes on your table.
 
wu jong
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, I am looking for the best way to notify my middle tier components to get a notification whenever there is a database update

?
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you want to achieve !!

Database change can be notified to databse object using trigger, but for java program to be notified you need to query database.

could you explain you requirement in details.

Shailesh
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well you could have your trigger (which in Oracle I think can be written in java) write the database changes as they occur to some external resource (a message queue might be an idea), then your middle tier component can be listening incoming messages on that queue for example.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic