[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() method as part of a server implementation:
<p>void
<br>MyServer_impl::shutdown()<br>
{
<br> rootGroup_->_dispose();
<br> ...
<br>}
<p>which also invokes impl_shutdown() 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 exception
upon invoking this method.
<br>Funny thing is, if I change
<p>rootGroup_->dispose();
<p>to
<p>delete rootGroup_;
<p>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.
<br>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.
<p>Thanks
<p>Rob
<pre>--
| 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.</pre>
</html>
--------------4291CBCBCA0E1BC2F973D11B--