I am sorry about PRF<br><br>TAO VERSION: 1.5.8<br>ACE VERSION: 5.5.8<br><br>HOST MACHINE:<br>any<br><br><div><span class="gmail_quote">On 6/13/07, <b class="gmail_sendername">Douglas C. Schmidt</b> <<a href="mailto:schmidt@dre.vanderbilt.edu">
schmidt@dre.vanderbilt.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Vikram,<br><br>As always, to ensure that we have proper version/platform/compiler
<br>information, please make sure you fill out the appropriate problem<br>report form (PRF), which is in<br><br>$ACE_ROOT/PROBLEM-REPORT-FORM<br>$TAO_ROOT/PROBLEM-REPORT-FORM<br><br>or in<br><br>$ACE_ROOT/BUG-REPORT-FORM<br>
$TAO_ROOT/BUG-REPORT-FORM<br><br>in older versions of ACE+TAO. Make sure to include this information<br>when asking any questions about ACE+TAO since otherwise we have to<br>"guess" what version/platform/compiler/options you've using, which is
<br>very error-prone and slows down our responsiveness. If you don't use<br>the PRF, therefore, it is less likely that someone from the core<br>ACE+TAO developer team will be able to answer your question.<br>Naturally, we encourage and appreciate other members of the ACE+TAO
<br>user community who can respond to questions that they have the answers<br>to.<br><br>> i have a sample application where in the "int main" mathod i am creating<br>>ORB by using ORB_init.<br><br>Ok.<br>
<br>> Now that variable is local to "int main", i don't want to make it<br>>global, but i want to get its reference in some other method say "int xyz".<br><br>Ok.<br><br>> In my previous ORB they were having CORBA::ORB::_duplicate () to return
<br>>reference to the global ORB.<br><br>That is non-standard behavior.<br><br>>But TAO does not have _duplicate with no<br>>parameters, means we have to pass ORB reference to be duplicated.<br><br>Right, that is standard behavior.
<br><br>> Is there any way to have this work?<br><br>Sure - either<br><br>. Pass the (duplicated) ORB as a parameter to int xyz()<br><br>. Create a singleton called MySingletonORB and use this everywhere.</blockquote>
<div><br>Ok thankx, let me add few more complications.<br>I am writing a template class who will create object reference. it has a URL private member witch has corbaloc of the remote object. now i want to use this template in my two different applications both of them use different orbs.
<br><br>template <class TRef, class TRef_var> void CliInfo<TRef, TRef_var>::createObjectRef ()<br>{<br> if (!CORBA::is_nil (m_objRef.in ())) {<br> return;<br> }<br><br> try {<br><br>//// In this next statement i need orb
<br>//// now i can not hard code orb as this name may change in different applications.<br><br> CORBA::Object_var obj = _orb -> string_to_object (m_url);<br> if (!CORBA::is_nil (obj)) {<br> m_objRef = TRef::_narrow (obj);
<br> } else {<br> // TBD: throw exception<br> }<br> } catch (...) {<br> // TBD: throw exception<br> }<br>}<br><br>One option is to pass orb parameter to this object through constructor means it will use _duplicate and store a reference to orb. different applications will pass different orb object through constructor.
<br>now my concern is, any application can have many such CliInfo objects, duplicating ORB reference in every such object will it increase memory utilisation? and if suppose i want to destory orb and recreate it i must tell all these objects to yield the reference and i again assign newly initiated ORB reference.
<br><br>what would be the other approach?<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">take care,<br><br> Doug<br>--<br>
Dr. Douglas C. Schmidt Professor and Associate Chair<br>Electrical Engineering and Computer Science TEL: (615) 343-8197<br>Vanderbilt University WEB: <a href="http://www.dre.vanderbilt.edu/~schmidt">
www.dre.vanderbilt.edu/~schmidt</a><br>Nashville, TN 37203 NET: <a href="mailto:d.schmidt@vanderbilt.edu">d.schmidt@vanderbilt.edu</a><br></blockquote></div><br><br clear="all"><br>-- <br>________________________________________________________________
<br>"Science is a wonderful thing if one does not have to earn one's living at it." -- Einstein.<br><br>- Vikram Karandikar