geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juergen Weber <webe...@gmail.com>
Subject Re: Accessing corba from geronimo [SOLVED]
Date Wed, 22 Oct 2008 13:28:17 GMT



Fredrik Jonson-3 wrote:
> 
> 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?
> 
> 

Wait, this is only a start, basically you hard-wired the server address now.
The nameservice variant is much better, but you have to find out, how the
Geronimo naming service works.
You might try (I haven't) if this works:
http://www.ibm.com/developerworks/library/os-ag-corba1/index.html

Good luck,
Juergen

-- 
View this message in context: http://www.nabble.com/Accessing-corba-from-geronimo-tp20095314s134p20110713.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message