JBoss.orgCommunity Documentation
The RMIC extensions allow stubs and tie classes to be generated for transactional RMI-IIOP objects. A transactional object is one which wishes to receive transactional context when one of its methods is invoked. Without transactional object support an RMI-IIOP object won't have transactional context propagated to it when its methods are invoked.
The tool works in two ways: i) via the command line, ii) via ANTs RMIC compiler task. Examples of how to use the tool via these methods are covered in the following sections.
As this tool delegates compilation to the Sun RMIC tool it accepts the same command line parameters. So for more details please see it's documentation for details (http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html#rmi). The following is an example of how this can be used:
<!-- <br/> --><span class="java_plain">java com</span><!-- <br/> --><span class="java_separator">.</span><!-- <br/> --><span class="java_plain">arjuna</span><!-- <br/> --><span class="java_separator">.</span><!-- <br/> --><span class="java_plain">common</span><!-- <br/> --><span class="java_separator">.</span><!-- <br/> --><span class="java_plain">tools</span><!-- <br/> --><span class="java_separator">.</span><!-- <br/> --><span class="java_plain">rmictool</span><!-- <br/> --><span class="java_separator">.</span><!-- <br/> --><span class="java_type">RMICTool</span><!-- <br/> --><span class="java_plain"> </span><!-- <br/> --><span class="java_operator"><</span><!-- <br/> --><span class="java_plain">parameters</span><!-- <br/> --><span class="java_operator">></span>
The RMICTool also acts as a plug-in for the ANT RMIC task. To use the RMICTool simply specify the fully qualified classname as the compiler attribute, e.g.
Example 9.1.
Example ANT
rmic
declaration
<rmic compiler="com.arjuna.common.tools.rmictool.RMICTool" classname="RMIObjectImpl" base="build-dir"
verify="true" iiop="true" iiopopts="-poa" classpathref="build.classpath" />
The RMICTool JAR file must either be specified in your system classpath or it should be copied into the lib directory of your ANT distribution for it to be found.