geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick McGuire <rick...@gmail.com>
Subject Re: Accessing corba from geronimo [SOLVED]
Date Wed, 22 Oct 2008 16:34:32 GMT
A better approach would be to use corbaname: URL format to look up the 
object.  This tells the ORB the location of the naming service providing 
the object reference and which one you want.  I believe the following 
would give you want you want:

    corbaname:10.11.12.13:4003/NameService#org/example/FooService

would do the lookup in on shot.  It appears that the original error is 
caused by Yoko not liking the format of the corbaloc: URL you gave it.  
You might try explicitly specifying the iiop level in the URL:

   corbaloc:iiop:1.2@10.11.12.13:4003/NameService

Rick


Fredrik Jonson 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?
>
> Anyway, thanks again Juergen!
>
>   


Mime
View raw message