Re: Aq and wls 8

From: Nigel Thomas <nigel.cl.thomas_at_googlemail.com>
Date: Mon, 8 Feb 2010 08:27:52 +0000
Message-ID: <53258cd51002080027u104b1765icb211b47129a90e2_at_mail.gmail.com>



Ujang

On 8 February 2010 00:25, Ujang Jaenudin <ujang.jaenudin_at_gmail.com> wrote:

can we use aq, from bea juSt post messages to aq, and let plsql dequeue to batch insert to auditing table per 200 trx or per 5 sec whichever the first

Sending a message on AQ involves posting changes into a queue table, which will be committed at the same time as the "real" transaction. That's not going to help any, is it? Plus, you will also need something running (a queue receiver, message driven bean or whatever) to dequeue the messages.

As you say you are using BEA (WebLogic I presume) you could try using it's built-in WebLogic JMS to send the audit transactions - then set up message driven beans or worker jobs to dequeue the messages and post the audit trail in batches as you like. That way, the audit data only hits the Oracle database once, asynchronously to the real transactions.

Of course, you will either need to send the audit messages as part of an XA transaction (and have the extra cost of 2-phase commit) or keep things simple (don't coordinate Oracle and JMS) and accept a small risk that a transaction may succeed but the audit message be lost (or vice versa) in the event of a system failure.

HTH Nigel

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Feb 08 2010 - 02:27:52 CST

Original text of this message