Page 1 of 1

Question about option "AsyncNotification"

Posted: Tue 27 Jul 2010 14:59
by dimon_adv
In my application i try use queue with multiple consumer and i receive exception as described in http://www.devart.com/forums/viewtopic. ... tification

Initialization code:

Code: Select all

    orsn1: TOraSession;
    orq1: TOraQueue;

...
procedure TForm16.FormCreate(Sender: TObject);
begin
  orq1.DequeueOptions.ConsumerName := 'PSO_SOO';
  orq1.AsyncNotification := True;
  orsn1.Connected := True;
end;
After run i receive exception ORA-25257. Its a normal and i must use another way for use AsyncNotification ?

ODAC = 6.90.0.58 Delphi 2010 Oracle 11gR2 (Win7 x64)
Thanks.

Posted: Tue 03 Aug 2010 14:04
by bork
Hello

I cannot reproduce this issue. I executed the following code successfully:

Code: Select all

var
  MySession: TOraSession;
  MyQueueTable: TOraQueueTable;
  MyQueueAdmin: TOraQueueAdmin;
  MyQueue: TOraQueue;
begin
  MySession := TOraSession.Create(self);
  MySession.Server := '...';
  MySession.Username := '...';
  MySession.Password := '...';

  MySession.Open;

  MyQueueTable := TOraQueueTable.Create(self);
  MyQueueTable.QueueTableName := 'my_queue_test_table';
  MyQueueTable.CreateQueueTable;

  MyQueueAdmin := TOraQueueAdmin.Create(self);
  MyQueueAdmin.QueueName := 'my_queue_test';
  MyQueueAdmin.QueueTableName := 'my_queue_test_table';
  MyQueueAdmin.CreateQueue;

  MyQueue := TOraQueue.Create(self);
  MyQueue.QueueName := 'my_queue_test';
  MyQueue.DequeueOptions.ConsumerName := 'PSO_SOO';
  MyQueue.AsyncNotification := True;

  MySession.Close;
  MySession.Open;
end;
Please create a new empty application and execute the same code. And please provide me the result of this code execution. If this is working correctly then please modify this code to reproduce your issue.

Also please make sure that the user has permissions to access DBMS_AQADM and DBMS_AQ packages:
GRANT EXECUTE ON DBMS_AQADM TO ;
GRANT EXECUTE ON DBMS_AQ TO ;