JBoss.orgCommunity Documentation

Chapter 6. Advanced run instructions for BlackTie

6.1. Running the TAO implementation repository with BlackTie
6.1.1. Introduction
6.1.2. To start the ImR:
6.1.3. Adding a new server
6.1.4. Is the ImR a single point of failure?
6.2. Running BlackTie with a different host IP address

The wiki contains the latest instructions for running BlackTie, the relevant article can be found here: http://community.jboss.org/wiki/DeployingBlacktie

The ImR can start servers on demand - if a client has an IOR that embeds the ImR location then the ImR knows how to start the required server. You can add servers using the tao_imr executable by specifying the comand line to start server. (Note that there is also an option to start servers whenever the ImR is started).

For example, to start our examples:

tao_imr -ORBInitRef ImplRepoService=file://locator.ior add ATMI_RM_202 -c "./server -c linux" -w "/home/mmusgrov/blacktie/trunk/atmibroker-xatmi/src/example/txfooapp" -e LD_LIBRARY_PATH="/home/mmusgrov/blacktie/releases/blacktie-1.0-MR6-SNAPSHOT/lib:.:/usr/local/product/11.1.0/db_1/lib:/home/mmusgrov/blacktie/trunk/atmibroker-tx/target/cxx/test/lib:/home/mmusgrov/blacktie/util/ACE+TAO-5.7.1/ACE_wrappers/lib" -e BLACKTIE_SCHEMA_DIR="/home/mmusgrov/blacktie/releases/blacktie-1.0-MR6-SNAPSHOT/schemas/xsd"

(where ATMI_RM_202 is a unique name for the server) or we could supply shell or batch files to simplify the command.

The unique name for the server must correspond to the name of a POA running in the server (this is a limitation of the TAO orb).

I use a single POA for recovery (created in XAResourceManagerFactory::create_poa ) and use the environment variable BLACKTIE_SERVER_NAME for the name of this poa. We must use the same name when starting servers via the ImR.

The BLACKTIE_SERVER_NAME environment variable is defined by concatenating domain, server and serverid (see AtmiBrokerServer::serverinit ).

To manually start this server use tao_imr command providing it with the name of the server we just added:

tao_imr -ORBInitRef ImplRepoService=file://locator.ior start ATMI_RM_202

The server needs to know that is should use an ImR. To do this we need to update the btconfig.xml file and add:

-ORBUseImR 1 to the ORBOPT environment variable. For example:

<!-- XML : generated by JHighlight v1.0 (http://jhighlight.dev.java.net) -->
<span class="xml_tag_symbols">&lt;</span><span class="xml_tag_name">ENV_VARIABLE</span><span class="xml_tag_symbols">&gt;</span><span class="xml_plain"></span><br />
<span class="xml_plain">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="xml_tag_symbols">&lt;</span><span class="xml_tag_name">NAME</span><span class="xml_tag_symbols">&gt;</span><span class="xml_plain">ORBOPT</span><span class="xml_tag_symbols">&lt;/</span><span class="xml_tag_name">NAME</span><span class="xml_tag_symbols">&gt;</span><span class="xml_plain"></span><br />
<span class="xml_plain">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="xml_tag_symbols">&lt;</span><span class="xml_tag_name">VALUE</span><span class="xml_tag_symbols">&gt;</span><span class="xml_plain">-ORBUseImR&nbsp;1&nbsp;-ORBInitRef</span><br />
<span class="xml_plain">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NameService=corbaloc::localhost:3528/NameService</span><span class="xml_tag_symbols">&lt;/</span><span class="xml_tag_name">VALUE</span><span class="xml_tag_symbols">&gt;</span><span class="xml_plain"></span><br />
<span class="xml_tag_symbols">&lt;/</span><span class="xml_tag_name">ENV_VARIABLE</span><span class="xml_tag_symbols">&gt;</span><span class="xml_plain"></span><br />

If you want to run blacktie server and client on a different host, such as run blacktie server on linux and run blacktie client on windows.