I need a Java client to remove all DataChangeRegistrations that currently exist in the database. The DataChangeRegistrations (and their DataChangeNotification objects) were previously created by other Java clients whose JVMs were killed before they had a chance to unregister their DCNs. I tried to remove the DCN's in two ways, both which cause SQLExceptions to be thrown.
I get the registration ids like this:
pstmt = conn.prepareStatement("SELECT REGID from user_change_notification_regs");
Then once I have them I tried one of the below options:
This causes a "java.sql.SQLException: Unsupported feature" exception in
2) DatabaseChangeRegistration dcr = conn.getDatabaseChangeRegistration(registration_id); //and then...
This cases a "Exception in thread "main" java.lang.NullPointerException" in
Are these commands supposed to work? Is there some other way I should be removing the DCN's?