RMI-IIOP Example with oc4j 10.1.3.x

Posted by Steve Racanovic | Posted in , | Posted on 3:03 PM

0

I have been trying to follow the rmi-iiop how to:

http://www.oracle.com/technology/tech/java/oc4j/htdocs/how-to-rmi-iiop.html

with oc4j 1013x. I experienced some issues and noticed some changes in the documentation compared to the previous versions.

http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13975/rmi.htm#CHDBDEII

So I recreated the example to run with the latest oc4j and noted the following additional requirements:

1. The client stub generation command has changed.

http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13975/rmi.htm#i1084457

You need to specified the '-iiopClientJar stub_jar_filename' parameter during deployment.

First start oc4j with command:

java -DGenerateIIOP=true -jar oc4j.jar

Then deploy the application to generate the client stub as follows:

java -jar $J2EE_HOME/admin.jar
ormi://localhost admin welcome
-deploy -file filename
-deployment_name application_name
-iiopClientJar stub_jar_filename

2. The client must have the ejb_sec.properties defined.

http://download.oracle.com/docs/cd/E14101_01/doc.1013/e13977/csiv2.htm#i1014488

In the example, the ejb_sec.properties contains the following properties:

oc4j.iiop.trustedServers=*
client.sendpassword=true
nameservice.useSSL=false

3. The client requires the following 2 system properties:

-Djavax.rmi.CORBA.PortableRemoteObjectClass=com.sun.corba.ee.impl.javax.rmi.PortableRemoteObject
-Dcom.oracle.CORBA.OrbManager=com.oracle.corba.ee.impl.orb.ORBManagerIm

4. The client requires jazn.jar to be included in the classpath.

You can download the example from here. Follow the steps in the readme.txt to run it.

Comments (0)