Question about option "AsyncNotification"

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
dimon_adv
Posts: 27
Joined: Mon 01 Feb 2010 09:36

Question about option "AsyncNotification"

Post by dimon_adv » Tue 27 Jul 2010 14:59

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.

bork
Devart Team
Posts: 649
Joined: Fri 12 Mar 2010 07:55

Post by bork » Tue 03 Aug 2010 14:04

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 ;

Post Reply