I am trying to implement a system that detects modifications (e.g. insert operation) in the database. I searched over net and found these two examples: [amis technology blog|http://technology.amis.nl/2012/06/18/notifying-adf-applications-of-database-changes-fast-and-lean-using-database-query-result-change-notification-part-one/] and [niallcblogs post |http://niallcblogs.blogspot.nl/2009/06/auto-refreshing-adf-chart-objects-in.html]
I have downloaded a sample application in AMIS' BLOG and follow the steps which registers notifications listeners to database.
Both requires "change notification" privilege in database so I have added change notification privilege to my db user.
When I run the application It registers listeners to db notifications correctly with "registerForDatabaseNotifications" method.
Adds DatabaseNotificationHandler instances as listeners. But when I inserted a row to the table,
It does not reach to "onDatabaseChangeNotification" method as expected in the example.
After this unsuccessful attempt, I ve tried niallcblogs post, followed the steps to create and refresh a chart according to emp and dept
tables iln SCOTT schema. But again the notification does not reach to the method.
I use Jdeveloper 220.127.116.11.0 and access to HR schema over a remote connection to our Oracle DB
Do you have any idea? I can add project sources if needed?
The version of db is "*Oracle Database 11g Enterprise Edition Release 18.104.22.168.0 - 64bit Production*"
The document you sent says the database must be at least 11.0.0. So the problem must be something different.
Do you have any other suggestion?
well, if you followed sample from amis blog, then there is db_notifications table and db trigger.
I suppose that you already checked if this table contains new records, so if this is ok and your registration query is also ok, I don't have other suggestions :(
Yes I followed the steps in the sample and created the trigger and db_notifications table.
It generates new records in the table db_notifications. The query registration process is being passed
without any exception. The only problem is DB does not notify the application over jdbc. I am running the application
on my local weblogic server. Only the db is remote. Does it cause any problem ?
Maybe you can try some simple application, for example, you can adjust this cmd line program: http://docs.oracle.com/cd/E14072_01/java.112/e10589/dbchgnf.htm#CHDCJFGJ
and if this works then concentrate to problem in ADF.
Well, at least you know that this is not problem in ADF :)
Try to set prop.setProperty(OracleConnection.DCN_QUERY_CHANGE_NOTIFICATION, *"false"* );
This will listen to all changes on your table.
If this works, then problem is with registration query, and if don't work then try to disable all firewalls, antiviruses etc. :)