XmlBlaster Logo

REQUIREMENT

protocol.corba.NameService

XmlBlaster Logo


Type NEW
Priority HIGH
Status CLOSED
Topic Multiple xmlBlaster server instances can register themselves in a CORBA NameService
Des
cription

Clients can lookup an xmlBlaster server with a CORBA NameService. The xmlBlaster servers register themselves in a hierarchical manner in the NameService as shown in the following illustration:

XmlBlaster NameService entries

In this example there are three xmlBlaster server running which have registered themselves under their cluster.node.id names heron, avalon and frodo.

Clients can query the root context xmlBlaster.MOM to choose a server they want to connect to.

When a server shuts down it removes its NameService entry. If a server crashes (e.g. by kill -9) it can't remove the NameService entry, but on startup it will overwrite the previous setting.

Example
JAVA

Here we show an example which plays with NameService entries, please start all instances in a separate DOS-box or xterm.

We assume that you have started a NameService and the IOR of the NameService is dumped to /tmp/ns.ior, here are examples how to start the JacORB NameService (delivered with the xmlBlaster distribution) or the ORBIX NameService (see http://www.iona.com):

# Start the JacORB NameService
# (the port 7608 is looked for automatically by xmlBlaster server):
jaco -DOAPort=7608  org.jacorb.naming.NameServer /tmp/ns.ior
# The ORBIX NameService:
/opt/orbix/etc/bin> start_XX_services

# query the IOR (for ORBIX only)
itadmin
% ns resolve
IOR:010000002800000049...

# Put this IOR into /tmp/ns.ior

Now we are ready to start some servers and a client. We have set -trace[corba] true to get more logging output from the CORBA plugin, further we have set -bootstrapPort 0 to suppress internal IOR download (as we want to test the NameService). We choose another telnet access port for the second and third server with -admin.remoteconsole.port 270x to avoid a conflict and an ugly error output.

# Start heron:
java -DORBInitRef.NameService=file:///tmp/ns.ior 
     -jar lib/xmlBlaster.jar
     -trace[corba] true
     -bootstrapPort 0
     -cluster.node.id heron

# Start avalon:
java -DORBInitRef.NameService=file:///tmp/ns.ior 
     -jar lib/xmlBlaster.jar
     -trace[corba] true
     -bootstrapPort 0
     -admin.remoteconsole.port 2703
     -cluster.node.id avalon

# Start frodo:
java -DORBInitRef.NameService=file:///tmp/ns.ior 
     -jar lib/xmlBlaster.jar
     -trace[corba] true
     -bootstrapPort 0
     -admin.remoteconsole.port 2704
     -cluster.node.id frodo

# If you use the ORBIX NameService you can check the entries:
% ns list
xmlBlaster.MOM  Context
% ns list xmlBlaster.MOM
frodo.MOM       Object
heron.MOM       Object
avalon.MOM      Object

# Now start a client:
java -DORBInitRef.NameService=file:///tmp/ns.ior -cp lib/xmlBlaster.jar HelloWorld2

# OOppps, you got an error as the client does not know which server to choose,
# we choose avalon
java -DORBInitRef.NameService=file:///tmp/ns.ior -cp lib/xmlBlaster.jar HelloWorld2
     -trace[CORBA] true
     -NameService.node.id avalon
   
Configure

These parameters allow to configure the NameService entries on server side and to specify the desired lookup on client side.

Property Default / Example Description Impl
plugin/ior/useNameService true If set to true, xmlBlaster tries to register itself in a NameService yes
NameService.context.id xmlBlaster The root context entry in the NameService, it defaults to xmlBlaster yes
NameService.context.kind MOM The kind of service is set to MOM yes
NameService.node.id [The xmlBlaster server name] This property is set as default to the name of the server instance (the value of -cluster.node.id). You can overwrite it by setting this property. yes
NameService.node.kind MOM The kind of service is set to MOM yes
java -DORBInitRef.NameService corbaloc:iiop:localhost:7608/StandardNS/NameServer-POA/_root XmlBlaster is configured to automatically lookup a NameService on port 7608 on localhost (see xmlBlaster/config/ jacorb.properties.template), here it is set as JVM property.
Note: You can set this property as command line argument as well like -ORBInitRef NameService=file:///tmp/ns.ior
yes

NOTE: Configuration parameters are specified on command line (-someValue 17) or in the xmlBlaster.properties file (someValue=17). See requirement "util.property" for details.
Columns named Impl tells you if the feature is implemented.
Columns named Hot tells you if the configuration is changeable in hot operation.

See REQ protocol
See REQ protocol.corba.JacORB
See CODE org.xmlBlaster.protocol.corba.CorbaDriver
See CODE org.xmlBlaster.client.protocol.corba.CorbaConnection

This page is generated from the requirement XML file xmlBlaster/doc/requirements/protocol.corba.NameService.xml

Back to overview