3 Replies Latest reply on Dec 11, 2002 8:16 PM by 82532

    OO4O and AQ Callback - Help

    192302
      Am using AQ (8.1.6). Looking for information on how to implement the callback functionality in VB 6.0...Documentation says that this possible but have found few examples...Have everything else working fine..

      Ron Music
        • 1. re:OO4O and AQ Callback - Help
          82532
          Have you exported the appropriate COM interface from your code? You may want to bump up to latest 8.1 version (8.1.7) as well. There was a bug in the callback code w/8.1.5, maybe fixed in 8.1.6, for sure fixed in 8.1.7.

          Mark Tomlinson
          • 2. re:OO4O and AQ Callback - Help
            192302
            Mark,
            Thanks for a prompt response. I guess this is part of the confusion. Is the callback client a COM object that I build or is it part of the Oracle set of objects? In addition, if I am creating an ActiveX dll, could it be part of that or does it have to be separate? Sorry if these questions seem simplistic. This is my first attempt with VB and AQ. Your help and advice is greatly appreciated.

            Ron Music
            • 3. re:OO4O and AQ Callback - Help
              82532
              You have to implement a COM interface in your application (or your own OLE object) that exposes the NotifyMe interface as described in the docs. You then use the MonitorStart method to have the object called asynchronously. If memory serves, the interface was:

              void NotifyMe(LPDISPATCH)

              and the LPDISPATCH pointer was a reference to an OraAQMsg object which contained the message payload.

              Suppose you created your own COM object that exposed this interface and called it MyNotify. You then do something like this:

              Dim MyQ as OraAQ
              Dim Notifier as MyNotify
              Dim DB as OraDatabase
              Dim OraS as Object
              .
              . 'Connect to the RDBMS and init the session (code ommitted for brevity)
              .
              Set MyQ = DB.CreateAQ("TEST")
              Set Notifier = new MyNotify

              MyQ.MonitorStart(Notifer)


              Then your object will have the NotifyMe method invoked as messages are dequeued.