<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Nachricht</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3268" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff><SPAN class=062250512-04082008>Which
exception you get?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=062250512-04082008>Is it
CosNaming::NamingContext::AlreadyBound?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=062250512-04082008>If the case,
try rebind().</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN class=062250512-04082008>Kind Regards,
Evgeni</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff>CORBA::Object_var obj<SPAN
class=062250512-04082008> =</SPAN>
orb->resolve_initial_references("NameService");</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff>CosNaming::NamingContext_var =
CosNaming::NamingContext::_narrow(obj);<BR></FONT><FONT face=Arial
color=#0000ff><SPAN class=062250512-04082008>.....</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff><SPAN
class=062250512-04082008></SPAN></FONT> </DIV>
<DIV><FONT><FONT face=Arial><FONT color=#0000ff>try {<BR><SPAN
class=062250512-04082008> </SPAN>rootContext->bind(objectName,
objref);<BR>}<BR>catch(CosNaming::NamingContext::AlreadyBound& ex)
{<BR><SPAN
class=062250512-04082008> </SPAN>rootContext->rebind(objectName,
objref);<BR>}<BR><SPAN
class=062250512-04082008>....</SPAN></FONT></FONT></DIV></FONT>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left><FONT face=Tahoma
size=2>-----Ursprüngliche Nachricht-----<BR><B>Von:</B>
omniorb-list-bounces@omniorb-support.com
[mailto:omniorb-list-bounces@omniorb-support.com] <B>Im Auftrag von </B>R. P.
Janaka<BR><B>Gesendet:</B> Montag, 4. August 2008 13:33<BR><B>An:</B>
omniorb-list@omniorb-support.com<BR><B>Betreff:</B> [omniORB] Synchronization
between omniNames service & Services<BR><BR></FONT></DIV>
<DIV dir=ltr>Hi all,<BR><BR>I am writing a simple Fault tolerant server which
can handle client request without any service interruption..Using C++ &
omniORB<BR><BR>In my system there are two servers as Master &
Slave..<BR><BR>When they starts they get registered with the name service as
usual. Normally the first one will be the Master and the next one is the
slave.<BR><BR>All are working properly..But still have a simple problem which
I was unable to solve. It is as follows.<BR><BR>
<UL>
<LI>When both Master & Slave are running....
<LI>Manually kill the Slave
<LI>Start the Slave again.</LI></UL>In some situation this Slave restart does
not work properly.. it gives an exception. This exception is my own exception
and It says that Slave already exist.<BR><SPAN class=description>This happens
only randomly, but occurring frequency is pretty high. (at least 30% of the
time it will happen)<BR><BR>If I retry several times I could get success.
Because If I call start method within the catch block I can really reduce the
occurring frequency of this exception.<BR></SPAN><BR><BR>So I guess the
problem is with the name service. Because when I just kill the Slave, the name
service does not know anything about this killing. So it is still keep
registering details of the Slave. Because of that it gives and exception when
I am going to register the Slave again.<BR><BR>Please can anyone guess any
other reason for this problem.....?<BR><BR>If my guess is correct...Please can
anyone help me to solve this problem.. Is there a continues synchronization
between the name service and the service itself .....?<BR><BR clear=all><BR>--
<BR>Regards,<BR>R. P. Janaka<BR></DIV></BLOCKQUOTE></BODY></HTML>