Hi I
am Sandhya working for Austco Communication Systems. We
are using XmlBlaster for Client-Server Communication using Jacorb and the
Naming Service.. But we are facing a problem with CORBA connection. Problem
Description: We
are running several server instances and our clients are connecting to the
correct server instance using the Jacorb naming service and the parameters
mentioned in xmlBlaster.properties. Parameters in XmlBlaster.Properties file protocol=IOR NameService.node.id=ashton NameService.node.kind=ALARM_HANDLER ORBInitRef.NameService=http://192.168.1.223:3412/nsref/ns.ior bootstrapPort=0 Suppose
there is only one server instance active, when a request is made for an
inactive server instance. Ideally it should throw an exception saying
‘unable to connect’. But it automatically connects to the only
available server instance. For
e.g., I
would like it to tell me that he cannot connect to B instead. And stop there. I
already checked xmlBlaster implementation and found the following code that is not
corresponding to my need. Code: Name: CorbaConnection.java Project: xmlBlaster.org Package: org.xmlBlaster.client.protocol.corba if (this.authServer == null) {
if
(authServerFirst != null) {
if(countServerFound
> 1){ //If there is only one server instance active, then it will not
throw an exception. Instead it chooses the only available one
String str = "Can't choose one of " + countServerFound +
"
avalailable server in CORBA NameService: " + serverNameList +
".
Please choose one with e.g. -NameService.node.id " + tmpId;
log.severe(str);
throw new Exception(str);
}
log.info("Choosing only available server '" +
firstServerName + "' in CORBA NameService -ORBInitRef NameService=" +
System.getProperty("ORBInitRef"));
this.authServer =
authServerFirst;
return
authServerFirst;
}
else {
throw new Exception("No
xmlBlaster server found in NameService");
}
}
log.info("Accessing xmlBlaster using a naming service '" +
nameXmlBlaster[0].id + "." + nameXmlBlaster[0].kind + "/" +
nameNode[0].id + "." + nameNode[0].kind + "' on " +
System.getProperty("ORBInitRef"));
return this.authServer; } Is
there a way I can catch this exception or change this default behaviour? Is
it possible to fix this bug for us? Thanks
& Regards Sandhya
Devisetty Software Engineer Austco Communication Systems Pty Ltd Phone: +61 8 9346
8634 | Fax: +61 8 9244 4727 | Web: www.austco.com |