JBoss.orgCommunity Documentation
The wiki contains the latest instructions for running BlackTie, the relevant article can be found here: http://community.jboss.org/wiki/DeployingBlacktie
The docs for the ImR are locted at
http://www.dre.vanderbilt.edu/Doxygen/Stable/tao/implrepo_service/usersguide.html
and
http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/TAO/docs/implrepo/index.html
The build instructions on the WIKI includes a step on building the TAO Implementation repository (it is essentially cd $ACE_ROOT/ACEXML && make; cd $TAO_ROOT/orbsvcs/ImplRepo_Service; make)
Make sure the ImR executable is on your path:
export PATH=$PATH:$TAO_ROOT/orbsvcs/ImplRepo_Service
ImplRepo_Service -o locator.ior -d -x
locator.ior is the name of the file that the ImR uses to store server records.
Servers that create persistent IORs embed the location of the ImR into the IORs it creates. On each host where we need to run a server we need to start an 'activator' which in turn knows how to contact the ImR:
ImR_Activator ImplRepoService=file://locator.ior &
(Question: if the ImR_Activator and ImplRepo_Service are running on different hosts which startup option do we need to use to enable the activator to find the ImR?)
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"><</span><span class="xml_tag_name">ENV_VARIABLE</span><span class="xml_tag_symbols">></span><span class="xml_plain"></span><br /> <span class="xml_plain"> </span><span class="xml_tag_symbols"><</span><span class="xml_tag_name">NAME</span><span class="xml_tag_symbols">></span><span class="xml_plain">ORBOPT</span><span class="xml_tag_symbols"></</span><span class="xml_tag_name">NAME</span><span class="xml_tag_symbols">></span><span class="xml_plain"></span><br /> <span class="xml_plain"> </span><span class="xml_tag_symbols"><</span><span class="xml_tag_name">VALUE</span><span class="xml_tag_symbols">></span><span class="xml_plain">-ORBUseImR 1 -ORBInitRef</span><br /> <span class="xml_plain"> NameService=corbaloc::localhost:3528/NameService</span><span class="xml_tag_symbols"></</span><span class="xml_tag_name">VALUE</span><span class="xml_tag_symbols">></span><span class="xml_plain"></span><br /> <span class="xml_tag_symbols"></</span><span class="xml_tag_name">ENV_VARIABLE</span><span class="xml_tag_symbols">></span><span class="xml_plain"></span><br />
We can run multiple ImRs. I/We still need to investigate how this works. Here's a quote from the TAO docs:
"One or more Implementation Repositories will be stored in additional profiles in the IOR. Other Implementation Repositories can also be located by multicasting (on a default multicast group) the server name of the Persistent Object the client is interested in. The default multicast group and default port of the Implementation Repository can be overridden through command line options or environment variables.
In most cases, one Implementation Repository will be enough. For redundancy, several Implementation Repositories can be specified."
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.
update Name Service running in JBoss AS
edit JBOSS_HOME/server/all/conf/jacorb.properties chanage ORBInitRef.NameService=corbaloc::localhost:3528/JBoss/Naming/root to ORBInitRef.NameService=corbaloc::YOUR_HOST_IPADDR:3528/JBoss/Naming/root
uncomment #OAIAddr, and add OAIAddr=YOUR_HOST_IPADDR
Note: I tried to use 0.0.0.0, but it does not work. JBoss runs OK, but both blacktie server and client are running errors with CORBA::TRANSIENT.
update btconfig.xml to use corbaloc::YOUR_HOST_IPADDR:3528/NameService
Make sure firewall doesn't block the packages
run.sh | bat -c all on linux or windows as usual.
run server on linux and run client on windows