CORBA ORB question.
1 posts in topic
Flat View  Flat View

Posted By:   Jason_Huang
Posted On:   Friday, January 6, 2006 12:21 AM

I am using JBroker and JDK 1.3 ORBs, but am not able to have the two talk to each other. My server uses the JBroker POA and registers itself with the JBroker "nameserv" naming service. The client uses JDK1.3 ORB. I have compiled my IDL file with the JDK1.3 "idlj" compiler to create the stubs and moved the name service's IOR file to the client. But am not able to have the client connect to the server, I get a org.omg.CORBA.INV_OBJREF minor code: 1398079490.

Any help greatly appreciated.

Re: CORBA ORB question.

Posted By:   Anonymous  
Posted On:   Friday, January 6, 2006 11:30 AM

If you are using a naming service, you shouldn't need to copy an IOR file around, that's what the naming service is for. The trick is for the client to get the correct key for the naming service, and then use that to find the reference to the server. Here's an example from the JavaWorld, I prefer this over the Sun's 1.5 ORB doc, since Sun is now using some non-standard (Sun only) calls (as if their ORB implementation wasn't non-standard enough already). You should consider upgrading from 1.3, as at least 1.4 is better than 1.3, see the JavaWorld article for more details.

// Create and initialize the ORB

ORB orb = ORB.init(args, null);

// Get the root naming context

org.omg.CORBA.Object objRef =

// Use NamingContextExt instead of NamingContext.

This is
// part of the Interoperable Naming Service.

NamingContextExt ncRef = NamingContextExtHelper.narrow(objRef);

// Resolve the object reference in Naming

String name = "BankServer";


if(args.length == 5)

name = args[4];

Bank theBank = BankHelper.narrow(ncRef.resolve_str(name));

For more specific details, comp.object.corba is a great resource, especially for general questions like this, as this jguru forum gets very little traffic. CORBA is complex, partly because there are so many ways to do the same thing (BOA? POA? Event Service? Notification Service? IOR? Naming Service?). Also try comp.lang.java.corba, although if you phrase your question well enough, it would be better answered on the previous link.

About | Sitemap | Contact