AW: [omniORB] Synchronization between omniNames service & Services

evgeni.rojkov at durr.com evgeni.rojkov at durr.com
Mon Aug 4 15:14:06 BST 2008


Which exception you get?
Is it CosNaming::NamingContext::AlreadyBound?
If the case, try rebind().
Kind Regards, Evgeni
 
CORBA::Object_var obj = orb->resolve_initial_references("NameService");
CosNaming::NamingContext_var = CosNaming::NamingContext::_narrow(obj);
.....
 
try {
  rootContext->bind(objectName, objref);
}
catch(CosNaming::NamingContext::AlreadyBound& ex) {
  rootContext->rebind(objectName, objref);
}
....

	-----Ursprüngliche Nachricht-----
	Von: omniorb-list-bounces at omniorb-support.com
[mailto:omniorb-list-bounces at omniorb-support.com] Im Auftrag von R. P. Janaka
	Gesendet: Montag, 4. August 2008 13:33
	An: omniorb-list at omniorb-support.com
	Betreff: [omniORB] Synchronization between omniNames service & Services
	
	
	Hi all,
	
	I am writing a simple Fault tolerant server which can handle client
request without any service interruption..Using C++ & omniORB
	
	In my system there are two servers as Master & Slave..
	
	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.
	
	All are working properly..But still have a simple problem which I was
unable to solve. It is as follows.
	
	

	*	When both Master & Slave are running.... 
	*	Manually kill the Slave 
	*	Start the Slave again.

	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.
	This happens only randomly, but occurring frequency is pretty high. (at
least 30% of the time it will happen)
	
	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.
	
	
	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.
	
	Please can anyone guess any other reason for this problem.....?
	
	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 .....?
	
	
	-- 
	Regards,
	R. P. Janaka
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20080804/2bc21fae/attachment-0001.htm


More information about the omniORB-list mailing list