[omniORB] strange INV_OBJREF

Rob Cecil rceci@master.adams.com
Fri, 19 Nov 1999 13:08:33 -0500


--------------4291CBCBCA0E1BC2F973D11B
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello,

I have a shutdown() method as part of a server implementation:

void
MyServer_impl::shutdown()
{
   rootGroup_->_dispose();
   ...
}

which also invokes impl_shutdown() on the Boa using a separate thread, per David Riddoch's
method suggestion.

However, the client that is invoking the shutdown request gets a INV_OBJREF exception upon
invoking this method.
Funny thing is, if I change

rootGroup_->dispose();

to

delete rootGroup_;

It works fine.  Now, this goes against the rule that server object implementations that
are created with "new" should be _dispose()'d, and not deleted.  So I am not comfortable
with this solution.
It seems that the obj reference is OK in this context, because the client was able to
issue a method call to the server a previous to the shutdown() using the same reference,
without problems.

Thanks

Rob

--
| Rob Cecil          | Senior Development Engineer                 |
| rceci@adams.com    | Product Development                         |
| (734) 913-9351     | Mechanical Dynamics, Inc. (www.adams.com)   |
--------------------------------------------------------------------
 Modern Quantum Physics has found that the universe is composed of
 25% protons, 15% electrons, 15% neutrons, and 45% morons.



--------------4291CBCBCA0E1BC2F973D11B
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello,
<p>I have a shutdown()&nbsp;method as part of a server implementation:
<p>void
<br>MyServer_impl::shutdown()<br>
{
<br>&nbsp;&nbsp; rootGroup_->_dispose();
<br>&nbsp;&nbsp; ...
<br>}
<p>which also invokes impl_shutdown()&nbsp;on the Boa using a separate
thread, per David Riddoch's method suggestion.
<p>However, the client that is invoking the shutdown request gets a INV_OBJREF&nbsp;exception
upon invoking this method.
<br>Funny thing is, if I&nbsp;change
<p>rootGroup_->dispose();
<p>to
<p>delete rootGroup_;
<p>It works fine.&nbsp; Now, this goes against the rule that server object
implementations that are created with "new"&nbsp;should be _dispose()'d,
and not deleted.&nbsp; So I&nbsp;am not comfortable with this solution.
<br>It seems that the obj reference is OK&nbsp;in this context, because
the client was able to issue a method call to the server a previous to
the shutdown()&nbsp;using the same reference, without problems.
<p>Thanks
<p>Rob
<pre>--&nbsp;
| Rob Cecil&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Senior Development Engineer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
| rceci@adams.com&nbsp;&nbsp;&nbsp; | Product Development&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
| (734) 913-9351&nbsp;&nbsp;&nbsp;&nbsp; | Mechanical Dynamics, Inc. (www.adams.com)&nbsp;&nbsp; |
--------------------------------------------------------------------
&nbsp;Modern Quantum Physics has found that the universe is composed of
&nbsp;25% protons, 15% electrons, 15% neutrons, and 45% morons.</pre>
&nbsp;</html>

--------------4291CBCBCA0E1BC2F973D11B--