1 //---------------------------------------------------------------------------
2 // To be able to handle CORBA requests an application usually calls orb->run().
3 // To integrate this into VCL applications we will run the orb in a separate
4 // thread. The ability to run the orb in a thread other than the main thread is
5 // a non-standard extension to CORBA provided by TAO. If you would rather use
6 // strictly standard CORBA calls, you need to add the code:
8 // if (orb->work_pending())
9 // orb->perform_work();
11 // somewhere into your application's event loop.
13 // Note that a "pure" client application (one that does not handle requests
14 // from any other application) need not do either of these things.
15 //---------------------------------------------------------------------------
18 #include "ORBThread.h"
19 //---------------------------------------------------------------------------
20 __fastcall
TORBThread::TORBThread (CORBA::ORB_ptr orb
)
22 orb_ (CORBA::ORB::_duplicate (orb
))
26 //---------------------------------------------------------------------------
27 __fastcall
TORBThread::~TORBThread ()
31 orb_
->shutdown (false);
33 catch (const CORBA::Exception
&)
39 //---------------------------------------------------------------------------
40 void __fastcall
TORBThread::Execute ()
46 catch (const CORBA::Exception
& e
)
48 ShowMessage (e
._rep_id ());
49 Application
->Terminate ();
52 //---------------------------------------------------------------------------