0 Replies Latest reply on Oct 15, 2003 8:49 AM by dankane

    External CORBA server and JacORB

    dankane

      Hello colleagues.

      What I need is to start a RMI/IIOP server on PC other than JBoss , register this server using JBoss JNDI, and access it using JBoss ORB (JacORB), first externally and later from session beans.

      I found no tutorials/examples for this task, and also have no success in my own attempts.

      Firstly , as I understood, JBoss should be started in "all" configuration to provide JacORB - is it correct ?

      Let's consider standard RMI/IIOP tutorial from Sun (Hello) . In this tutorial, Sun's ORB "orbd.exe" is used , and I quickly got this example working (all three components of different PCs) .

      Is it possible to make the same client and server working over JacORB instead of orbd.exe ?

      I tried to use jndi.properties with the same parameters as I used to access bean interfaces :

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://192.168.2.16:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

      Also I tried to put following properties to this file :

      java.security.policy=./client.policy
      org.omg.CORBA.ORBClass=org.jacorb.orb.ORB
      org.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton
      org.omg.CORBA.ORBInitialHost=192.168.2.16
      org.omg.CORBA.ORBInitialPort=3528

      client.policy is
      grant {
      permission java.security.AllPermission;
      };

      It seems that server registers successfully in JNDI
      (context.rebind... )
      But client is unable to obtain a reference to server. On context.lookup client program raises the following exception:

      Exception javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: HelloImpl (no security manager: RMI class loader disabled)].

      Again : same client ad server works fine, when I start
      orbd.exe on the same PC where JBoss running. In this case, it is enough to have only following couple of lines in jndi.properties :

      java.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
      java.naming.provider.url=iiop://192.168.2.16:1051

      (1051 is prot which i used in orbd.exe)

      Any advices, examples or references would be greatly appreciated !

      TIA,
      Daniel