[omniORB] Problems with FreeLibrary() and omniORB.

Mike Bendickson bendi003@tc.umn.edu
Wed, 27 Oct 1999 17:00:56 -0500


I'm working with 2.7.1.  It doesn't look like orb->NP_destroy() exists in
2.7.1.  Maybe I need to go to 2.8.

I'm doing these:

boa->impl_shutdown();
boa->destroy();

without success.

Here's my code:

// Globals
CORBA::ORB_ptr orb;
CORBA::BOA_ptr boa;
CORBA::Object_var obj;
ssCorba_var client;

int somecorbafunc()
{
.
.
.
  try {
   orb = CORBA::ORB_init(argc, argv, "omniORB2");
   boa = orb->BOA_init(argc, argv, "omniORB2_BOA");

   obj = orb->string_to_object(bvals[0]->bv_val);  // The IOR is in a LDAP
database.
   client = ssCorba::_narrow(obj);
  }
  catch(const CORBA::SystemException &e) {
   cerr << "Exception: " << e.minor() << ", " << e.completed() << endl;
   return_code = CORBA_ERROR;
  }
.
.
.
}

int mycleanupfunc()
{
.
.
.
 boa->impl_shutdown();
 boa->destroy();
.
.
.
}

Thanks,
-Mike

----- Original Message -----
From: Ken Feuerman <kfeuerma@Adobe.COM>
To: Bruce Visscher <visschb@rjrt.com>
Cc: Mike Bendickson <bendi003@tc.umn.edu>;
<omniorb-list@uk.research.att.com>
Sent: Wednesday, October 27, 1999 4:40 PM
Subject: Re: [omniORB] Problems with FreeLibrary() and omniORB.


> Searching for clarification.....
>
> If (in omniORB2.8.0) ORB initialization consists of:
>
> orb = CORBA::ORB_init(...);
> boa = orb->BOA_init(....);
> boa->impl_is_ready(0, 1);
>
> Should ORB finalization consist of:
>
> boa->impl_shutdown();
> boa->destroy();
> orb->NP_destroy();   /* omniORB specific */
>
> Is this correct?
>
> --Ken Feuerman
> Adobe Systems, Inc.
>
>
>
> At 05:14 PM 10/27/99 -0400, Bruce Visscher wrote:
> >Mike,
> >
> >Have you tried calling BOA::impl_shutdown() (assuming you've called
> >BOA::impl_is_ready)?
> >
> >Bruce
> >
> >Mike Bendickson wrote:
> >>
> >> I think my question is this:  How do I free all omniORB resources?
> >>
> >> I've got a client DLL with some functions using omniORB.  Programs
using
> >> this DLL are calling LoadLibrary() and FreeLibrary().  The problem is
that
> >> FreeLibrary() hangs if omniORB calls have been made.  It works fine if
only
> >> non-CORBA related DLL calls were made.
> >>
> >> Any suggestions?  I've tried calling CORBA::release(), but with no
success.
> >>
> >> Thanks.
> >> -Mike
> >
> >
> >
>
>