Hello!
You cannot use ORBInitialHost / ORBInitialPort to specify some ORB's
naming service, since it's a mechanism only supported by, to my
knowledge, omniORB, JavaIDL and Orber. Requires support for the
alternative INS (Interoperable Naming Service) that wasn't chosen.
Perhaps this link can help you:
http://members.tripod.com/ChannuKambalyal/CompareCorbaProducts.html
Cheers,
Nick
Jaroslaw Staszak wrote:
> Hallo
>
[quoted text clipped - 12 lines]
>
> What schould I do to run my ORB?
Rob Ratcliff - 22 Nov 2003 19:40 GMT
Jaroslaw,
Assuming that you have a naming service running from the command line like:
orbd -ORBInitialPort 1050 -ORBInitialHost yourHostname
You should be able to specify the parameters:
-ORBInitialHost yourhost -ORBInitialPort 1050
in the Properties/Execution/Arguments field corresponding to your
program from within
NetBeans. (Just right click on the program node in the "Explorer" tree
to locate
the Properties dialog.) Also, make sure all your jar files are mounted
in the Explorer.
(Do you have an error message from your run?)
Here's a sample program that worked fine for me from within NetBeans
using JDK 1.4.2:
import java.util.Properties;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextExtHelper;
public class Test {
public static void main(String[] args) {
try {
Properties props = System.getProperties();
//props.put("org.omg.CORBA.ORBInitialPort","1050");
//props.put("org.omg.CORBA.ORBInitialHost","yourhost");
final ORB orb = ORB.init(args,props);
String[] services = orb.list_initial_services();
for (int i = 0; i < services.length; i++) {
System.out.println(services[i]);
}
Object obj =
//orb.string_to_object("corbaloc:iiop:yourhost:1050/NameService");
//orb.string_to_object("corbaloc:iiop:1.0@yourMicoHost:9001/NameService");
// locate Mico NameService
orb.resolve_initial_references("NameService");
System.out.println(" naming object = " + obj);
if (obj != null ) {
NamingContext rootContext =
NamingContextExtHelper.narrow(obj);
System.out.println(" naming object = " + rootContext);
System.out.println(rootContext._non_existent());
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
> Jaroslaw Staszak wrote:
>
[quoted text clipped - 15 lines]
>>
>> What schould I do to run my ORB?
Rob Ratcliff - 22 Nov 2003 19:45 GMT
Jaroslaw,
Assuming that you have a naming service running from the command line like:
orbd -ORBInitialPort 1050 -ORBInitialHost yourHostname
You should be able to specify the parameters:
-ORBInitialHost yourhost -ORBInitialPort 1050
in the Properties/Execution/Arguments field corresponding to your
program from within
NetBeans. (Just right click on the program node in the "Explorer" tree
to locate
the Properties dialog.) Also, make sure all your jar files are mounted
in the Explorer.
(Do you have an error message from your run?)
Here's a sample program that worked fine for me from within NetBeans
using JDK 1.4.2:
import java.util.Properties;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
import org.omg.CosNaming.NamingContext;
import org.omg.CosNaming.NamingContextExtHelper;
public class Test {
public static void main(String[] args) {
try {
Properties props = System.getProperties();
//props.put("org.omg.CORBA.ORBInitialPort","1050");
//props.put("org.omg.CORBA.ORBInitialHost","yourhost");
final ORB orb = ORB.init(args,props);
String[] services = orb.list_initial_services();
for (int i = 0; i < services.length; i++) {
System.out.println(services[i]);
}
Object obj =
//orb.string_to_object("corbaloc:iiop:yourhost:1050/NameService");
//orb.string_to_object("corbaloc:iiop:1.0@yourMicoHost:9001/NameService");
// locate Mico NameService
orb.resolve_initial_references("NameService");
System.out.println(" naming object = " + obj);
if (obj != null ) {
NamingContext rootContext =
NamingContextExtHelper.narrow(obj);
System.out.println(" naming object = " + rootContext);
System.out.println(rootContext._non_existent());
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
> Jaroslaw Staszak wrote:
>
[quoted text clipped - 15 lines]
>>
>> What schould I do to run my ORB?