[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster-devel] CORBA Connection - Bug report



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 have two server instances A & B.
    Only A is active for the moment.
    When I try to connect to B, it automatically connects to A (as it is the only available server instance)
   

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?
 
Log information:
 
 INFO: Trying to find a CORBA naming service ...
 Jun 29, 2009 11:25:29 AM org.xmlBlaster.client.protocol.corba.CorbaConnection getAuthenticationService
 INFO
: Choosing only available server 'xmlBlaster.MOM/limestone.ALARM_HANDLER' in CORBA NameService -ORBInitRef NameService=null
 Jun 29, 2009 11:25:29 AM org.xmlBlaster.util.dispatch.DispatchConnection handleTransition
 INFO: Connection 'IOR' transition UNDEF -> ALIVE: Success, DispatchConnection-connection:client/guest1246245928813  connected.
 Jun 29, 2009 11:25:29 AM org.xmlBlaster.util.dispatch.DispatchManager switchToSyncMode
 INFO: connection:client/guest1246245928813: Switched to synchronous message delivery
 Jun 29, 2009 11:25:29 AM org.xmlBlaster.client.protocol.corba.CorbaCallbackServer initialize
 INFO: Success, created CORBA callback server
 Jun 29, 2009 11:25:29 AM org.xmlBlaster.client.XmlBlasterAccess createDefaultCbServer
 INFO: client/guest: Callback settings: type=CACHE maxEntries=1000 type=IOR dispatcherActive=true burstMode.collectTime=0
 Jun 29, 2009 11:25:29 AM com.austco.client.xml.XmlConnector$1 reachedAlive
 INFO: Destroying 0 client side tailback messages
 Jun 29, 2009 11:25:29 AM org.xmlBlaster.client.XmlBlasterAccess connect
 INFO: 1.6.1 #exported: Successful IOR login as /node/limestone/client/guest/-20
 Jun 29, 2009 11:25:29 AM com.austco.client.xml.XmlConnector <init>
 INFO: Connected to xmlBlaster service.

 

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