5 Replies Latest reply: Feb 24, 2012 1:12 AM by Sudheendra-Oracle RSS

    Using C++ call Interface, but exception at registerSubscriptions

    919465
      Hi,
      I am using c++ call interface (occi) for Oracle in vc9, I am able to connect to server but the code is throwing exception at p_conn->registerSubscriptions(sub_vec);

      The code is as given below, plz let me know if I am doing something wrong or missing something.

      Environment* p_env = NULL;
      Subscription* p_sub = NULL;
      Connection* p_conn = NULL;
      vector<Subscription> sub_vec;

      p_env = Environment::createEnvironment(Environment::EVENTS);

      p_conn = p_env->createConnection(username, password, connstr);
                          
      Bytes *payload = new Bytes(p_env);
      p_sub = new Subscription(p_env);
      p_sub->setSubscriptionNamespace(oracle::occi::aq::Subscription::NS_AQ);
      p_sub->setProtocol(Subscription::PROTO_CBK);
      p_sub->setPayload(*payload);
           
      p_sub->setSubscriptionName("MyAlert");

      p_sub->setPresentation(oracle::occi::aq::Subscription::PRES_DEFAULT);
                
      p_sub->setNotifyCallback(&NotifyRegister::callback);
      p_sub->setCallbackContext((void*)this);

      p_env->enableSubscription(*p_sub);          
                
      sub_vec.push_back(*p_sub);
                
      p_conn->registerSubscriptions(sub_vec);


      Plz help me out...

      Edited by: 916462 on Feb 23, 2012 2:13 AM

      Edited by: 916462 on Feb 23, 2012 2:13 AM