Need help with this code.
Billy Newport
bnewport@eps.agfa.be
Fri, 12 Dec 1997 09:16:07 +0100
You need to call obj_is_ready on the object. This lets the object receive
messages.
Billy Newport
-----Original Message-----
From: Bing Zhang <bzhang@sohar.com>
To: omniorb-list@orl.co.uk <omniorb-list@orl.co.uk>
Date: Friday, December 12, 1997 12:18 AM
Subject: Need help with this code.
>Hi,
>
>I am new to the omniOrb and I am trying to port the code from orbix to
>omniOrb, so please bear with me for this simple question:
>
>I have the following two interface:
>
>interface counter
>{
> void setCount(in long aValue);
> long getCount();
>
> void incCount();
> void decCount();
>};
>
>interface counterFactory
>{
> counter newCounter();
> void freeCounter(in counter aCounter);
>};
>
>In the implementation file counter_i.cc, I have:
>
>class counter_i : public virtual _sk_counter {
> omni_mutex mutex;
> CORBA::Long m_count;
>public:
> virtual void setCount(CORBA::Long aValue);
> virtual CORBA::Long getCount();
>
> virtual void incCount();
> virtual void decCount();
>
> counter_i() {};
> virtual ~counter_i();
>};
>
>class counterFactory_i : public virtual _sk_counterFactory {
>public:
> virtual counter_ptr newCounter();
> virtual void freeCounter(counter_ptr aCounter);
>};
>
>counter_ptr
>counterFactory_i::newCounter()
>{
>
> counter_ptr c = new counter_i();
> counter::_duplicate(c);
> return c;
>}
>
>........
>
>In the function newCounter(), when the code executes
>counter::_duplicate(c);, it throws out an system exception at client
>side.
>
>What is wrong?
>
>Thanks
>
>Bing
>