advanced-queuing

Using Oracle Advanced Queues to monitor when a database table column is updated

北城余情 提交于 2020-05-17 06:25:06
问题 Env: Oracle 12c I am new to Oracle Advanced Queues (AQ) and it looks like it's supposed to be the best approach to use instead of polling. Based on this, I want to utilise AQ to be used based on the following trigger: CREATE OR REPLACE TRIGGER MY_TRG AFTER UPDATE OF STATUS ON "MY_TABLE" REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW declare v_status INTEGER; begin if :OLD.status = 'ERROR' and (:NEW.status = 'OK' or :NEW.status = 'ERROR') then -- -- do some Advanced Queue processing here ? --

Is it possible to dequeue from ANYDATA Synchronous Capture queue using JDBC?

夙愿已清 提交于 2019-12-25 03:17:06
问题 What I'm trying to do is subscribe to all changes in Oracle table using Synchronous Capture, from Java process. ANYDATA queue is created with BEGIN DBMS_STREAMS_ADM.SET_UP_QUEUE( queue_table => 'hcb_qtab_any', queue_name => 'hcb_queue_any', queue_user => 'gguser'); END; And then I'm using code from Dequeue using Java for Oracle 11g queue as an example. I'm trying to do message = queue.dequeue(deq_option, XMLType.getORADataFactory()); But all I get is oracle.AQ.AQOracleSQLException : Error

Oracle AQ dequeue order

≯℡__Kan透↙ 提交于 2019-12-24 14:16:32
问题 A trigger in an Oracle 10g generates upsert and delete messages for a subset of rows in a regular table. These messages consist out of two fields: A unique row id. A non-unique id. When consuming these message I want to impose an order on the deque process that respects the following constraints: Messages must be dequeued in insertion order. Messages belonging to the same id must be dequeued in such a fashion that no other dequeuing process should be able to dequeue a potential successor

Lookup structure for handling future events (time based)

我们两清 提交于 2019-12-21 02:40:59
问题 I am looking for an efficient data structure, that'll allow me to cue events ... that is, i will be having an app, where at any time in execution, it is possible, that an event will be raised for a future point in execution ... something like: t=20: in 420 seconds, A occurs t=25: in 13 seconds, B occurs t=27: in 735 seconds, C occurs ... so i'd like to have a data structure, where i can put in any event in any time in the future and where i can get and (by doing so) remove all due events ...

mongodb query without field name

家住魔仙堡 提交于 2019-12-18 05:23:24
问题 I would like query all objects that have a field containing a specific value. For example, I have two documents: {"123": "apple", "217": "pear", "179": "orange"} {"831": "pear", "189": "grapes"} and would like to get all objects that has a field whose value is "apple", but I do not know the name of the field. Is it possible to specify a query in MongoDB to achieve this? (The numerical keys in the objects are children ids, and the values in the objects are long GUIDs) 回答1: Unfortunately,

mongodb query without field name

≯℡__Kan透↙ 提交于 2019-12-18 05:23:08
问题 I would like query all objects that have a field containing a specific value. For example, I have two documents: {"123": "apple", "217": "pear", "179": "orange"} {"831": "pear", "189": "grapes"} and would like to get all objects that has a field whose value is "apple", but I do not know the name of the field. Is it possible to specify a query in MongoDB to achieve this? (The numerical keys in the objects are children ids, and the values in the objects are long GUIDs) 回答1: Unfortunately,

Migrating from IBM MQ to javax.jms.* (Weblogic)

拥有回忆 提交于 2019-12-12 21:15:21
问题 I've been looking for days about how one could migrate from using IBM Websphere MQ to rather only using the QueueManager within Weblogic 10.3.x server. This would save cost of licenses for IBM MQ. The closest I came was finiding an external link which stated that IBM examples existed that did something similar(moving away from MQ to standard jms libraries), but when I attempted to follow the link: http://www.developer.ibm.com/isv/tech/sampmq.html it lead to a dead page :\ More specifically I

How to schedule a work to run at particular time using dbms_scheduler

南楼画角 提交于 2019-12-12 18:34:38
问题 Im not clear about this, here in DBMS_SCHEDULER we have CREATE_PROGRAM CREATE_JOB CREATE_SCHEDULE etc., after reading the oracle doc still im unclear what to use, On the Oracle side, i am going to use DBMS_SCHEDULER to insert a new message into the queue at the appropriate time, i planned to create scheduler to execute it on particular time and then create program to execute my PL/SQL block which will enqueue the message in the queue Or instead of using CREATE_SCHEDULE and CREATE_PROGRAM,

Oracle Advanced Queue In Java

眉间皱痕 提交于 2019-12-08 01:20:52
问题 I am implementing Oracle Advanced Queue and am completely new to it. I have a few doubts regarding it. Below is my code: package com; /* Set up main class from which we will call subsequent examples and handle exceptions: */ import java.sql.*; import oracle.AQ.*; public class test_aqjava { public static void main(String args[]) { AQSession aq_sess = null; try { aq_sess = createSession(args); createAqTables(aq_sess); enqueueMsg(aq_sess); // dequeueMsg(aq_sess); aq_sess.close(); /* now run the

Oracle Advanced Queue In Java

你。 提交于 2019-12-06 09:25:51
I am implementing Oracle Advanced Queue and am completely new to it. I have a few doubts regarding it. Below is my code: package com; /* Set up main class from which we will call subsequent examples and handle exceptions: */ import java.sql.*; import oracle.AQ.*; public class test_aqjava { public static void main(String args[]) { AQSession aq_sess = null; try { aq_sess = createSession(args); createAqTables(aq_sess); enqueueMsg(aq_sess); // dequeueMsg(aq_sess); aq_sess.close(); /* now run the test: */ // runTest(aq_sess); } catch (Exception ex) { System.out.println("Exception-1: " + ex); ex