geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fredrik Jonson <fred...@myrealbox.com>
Subject Re: Accessing corba from geronimo [SOLVED]
Date Wed, 22 Oct 2008 12:53:45 GMT
Juergen Weber wrote:

>  Try to use an IOR first(object_to_string() and friends)

Thank you! I now have working code!

I used the legacy code - that uses the default sun ORB - to
retrieve the IOR of the object I needed. After that it was as
simple as replacing:

> >  org.omg.CORBA.Object ns =
> >  orb.resolve_initial_references("NameService");
> >  NamingContextExt namingContext =
> >    NamingContextExtHelper.narrow(ns);
> >  org.omg.CORBA.Object obj = namingContext.resolve_str(
> >         "org/example/FooService");

Whith these two lines:

	String ior = "IOR:000000000000003f4..."
        org.omg.CORBA.Object obj = orb.string_to_object(ior);

And now everything works in Geronimo too... Yay!

I must admit that it's still a bit magic to me, I mean why that
change made a difference in the first place. A bit of browsing
on the web suggests that using IOR is a more ORB-independent
way of getting hold of a service, but I'm not sure that's the 
whole story?

Anyway, thanks again Juergen!

-- 
Fredrik Jonson


Mime
View raw message