473,395 Members | 1,986 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Monitor database for changes using java

8
Hi All,

Is it possible to automatically monitor the database at regular intervals say for eg. a particular table for any changes in a particular field and capture those changes in a servlet or java.

thanks,
krithi
Dec 12 '07 #1
7 7221
BigDaddyLH
1,216 Expert 1GB
I don't know special way to make that easy.

The best way would be if you designed the database to include an audit table, and added triggers to the database to log all significant changes to the audit table.
Dec 12 '07 #2
heat84
118 100+
I don't know special way to make that easy.

The best way would be if you designed the database to include an audit table, and added triggers to the database to log all significant changes to the audit table.
I am not sure whether I am getting my collegue wrong, what he said may mean that he wants the java application to "pick" when the database changes in real time . Perhaps he/she can shed more light on that?
Dec 13 '07 #3
kath11
8
have created a trigger for monitoring a single table for any changes in the database, but how can i call tht trigger from servlet? should i write a javabean so tht it can schedule jobs or is there a way to directly call the trigger from servlet?
Dec 13 '07 #4
heat84
118 100+
have created a trigger for monitoring a single table for any changes in the database, but how can i call tht trigger from servlet? should i write a javabean so tht it can schedule jobs or is there a way to directly call the trigger from servlet?
There is a jar called quartz .jar which has the capabilites of helping you schedule a job.
Dec 13 '07 #5
BigDaddyLH
1,216 Expert 1GB
There is a jar called quartz .jar which has the capabilites of helping you schedule a job.
Hmmm.... I thought Quartz was a scheduler, meaning that it can prod a job to routinely poll the database, but that's different from having a database trigger instigate something.

If you have a trigger firing when you want in the database, this becomes more of a database question. You'd like that trigger to reach out and notify some external process. That sounds like something most DBMSs should support. You should continue investigating on the database side. This doesn't sound like a Java question.
Dec 13 '07 #6
heat84
118 100+
Hmmm.... I thought Quartz was a scheduler, meaning that it can prod a job to routinely poll the database, but that's different from having a database trigger instigate something.

If you have a trigger firing when you want in the database, this becomes more of a database question. You'd like that trigger to reach out and notify some external process. That sounds like something most DBMSs should support. You should continue investigating on the database side. This doesn't sound like a Java question.
Well I think we have two different perceptions concerning this problem . You are right quartz is a scheduler , I was answering to his question on whether he/she can write a scheduled job.
Dec 14 '07 #7
BigDaddyLH
1,216 Expert 1GB
Well I think we have two different perceptions concerning this problem . You are right quartz is a scheduler , I was answering to his question on whether he/she can write a scheduled job.
Indeed, there are two ways to go. A process can routinely check for changes or the database itself can notice a relevant change and signal.
Dec 14 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Sarah Tanembaum | last post by:
I was wondering if it is possible to create a secure database system using RDBMS(MySQL, Oracle, SQL*Server, PostgreSQL etc) and web scripting/programming language(Perl, PHP, Ruby, Java, ASP, etc)...
346
by: rkusenet | last post by:
http://biz.yahoo.com/rc/040526/tech_database_marketshare_1.html Interesting to see that database sales for windows is more than Unix.
12
by: Brett Robichaud | last post by:
I need to make access to a reference object threadsafe. My natural instinct was to simply use Monitor.Enter() and Exit(). The problem is that the object behind the reference changes frequently,...
1
by: Mike | last post by:
I have to ask a stupid question regarding Monitor. Wait() and Pulse() make be used to wait for and signal events in a given thread. However, neither can be used until calling within a...
1
by: MAB | last post by:
I need to create a service (or something else) to monitor the coming and goings of files (& possible folders) beneath a root folder. This service need to know the path/FileName of any new files so...
2
by: Graville | last post by:
All, OK wasn't sure where to post this one but this should hopefully be ok. I am looking for a way to streamline some of the process within our dev team. One of the areas that often takes time...
1
by: jcor | last post by:
Hi, I already posted a similar problem, but now I have more concrete ideas of what I need. I'm trying to build a "drop box" so I can be watching a directory and every time a file is created I'll work...
9
by: Peter Duniho | last post by:
Is there a straightfoward API in .NET that allows for inspection of a database? That is, to look at the structure of the database, without knowing anything in advance about it? For example,...
2
by: samvb | last post by:
Hi, I have just finished a program that uses ms access and depends on system date to do certain things. just when i was testing it, a friend suggested that i change system date to see how it reacts....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.