|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (10)
View Page History...
h1. Implementing RMI client interacting with a Petals SE RMI
Your RMI client will depend on the following Maven artifacts as RMI client libraries:
* {{org.ow2.petals:petals-rmi-proxyclient}},
* {{org.ow2.petals:petals-rmi-server:1.5.0}},
* {{org.ow2.petals:petals-rmi-common:1.4.1}}
that embed classes mentioned below.
* {{org.ow2.petals:petals-rmi-proxyclient}},
* {{org.ow2.petals:petals-rmi-server:1.5.0}},
* {{org.ow2.petals:petals-rmi-common:1.4.1}}
that embed classes mentioned below.
h2. Accessing the RMI registry
...
The instantiation of object of this class is presented below:
{code:java}
ComponentContextLocator ccl = new ComponentContextLocator("192.168.1.150", 1099, "RMIComponentContext");
{code}
{note}To avoid some errors, you must inserted this line code below at the beginning of the program
{code}
{note}To avoid some errors, you must inserted this line code below at the beginning of the program
{code:java}
System.setProperty("com.sun.xml.namespace.QName.useCompatibleSerialVersionUID", "1.0");
System.setProperty("com.sun.xml.namespace.QName.useCompatibleSerialVersionUID", "1.0");
{code}
System.setProperty( "com.sun.xml.namespace.QName.useCompatibleSerialVersionUID", "1.0" );
{code}
{code}
{note}
...
Once the object is instantiated, it is possible to access to remote component context.
{info}All objects handle in the code lines presented in the next sections are instantiated from all classes included in the jar artefact of the RMI component.{info}
h2. Getting the remote component context and activate/deactivate endpoints
h2. Getting the remote component context and activate/desactivate endpoints
The code lines presented below allows a client to access to the remote component context, to activate and desactivate an endpoint:
{code:java}
// Access to the remote component context from the ComponentContextLocator
// Access to the remote component context from the ComponentContextLocator
...
// Activation of an endpoint
ServiceEndpoint endpoint = rcc.activateEndpoint(new QName("http://petals.objectweb.org/", “RmiService”), “RmiEndpoint”); "RmiService"), "RmiEndpoint");
// Desactivation of the endpoint
rcc.deactivateEndpoint(endpoint);
{code}
{code}
...