[jacorb-developer] Handling invalid object_key

Marius Cosma marius.cosma at computaris.com
Tue Mar 10 13:31:57 CET 2015


Thanks a lot Nick.

Yes, indeed, this solves my problem.
I was trying to use the ObjectKeyMap, but I was missing the
"CorbaLoc.parseKey()" from the picture.

Thanks again for looking at this!
Marius

-----Original Message-----
From:
jacorb-developer-bounces~marius.cosma=computaris.com at lists.spline.inf.fu-ber
lin.de
[mailto:jacorb-developer-bounces~marius.cosma=computaris.com at lists.spline.in
f.fu-berlin.de] On Behalf Of Nick Cross
Sent: Tuesday, March 10, 2015 1:51 PM
To: Discussions concerning CORBA development with JacORB
Subject: Re: [jacorb-developer] Handling invalid object_key



Hi,

It might be possible to get this working via the object key mapping
functionality (Section 3.2.5 in the ProgrammingGuide).

Taking the corbaloc demo I changed

-        ((org.jacorb.orb.ORB)orb).addObjectKey ("VeryShortKey", 
orb.object_to_string (objP));
+        String target = new String (
org.jacorb.orb.util.CorbaLoc.parseKey ("%ffmy%20poa%00ppbServer"));
+        System.out.println("Target " + target);
+        ((org.jacorb.orb.ORB)orb).addObjectKey (target,
orb.object_to_string (objP));

and was then able to make a call in client using

-      org.omg.CORBA.Object obj = 
orb.string_to_object("corbaloc:iiop:127.0.0.1:6969/VeryShortKey");
+      org.omg.CORBA.Object obj = 
orb.string_to_object("corbaloc:iiop:127.0.0.1:6969/%ffmy%20poa%00ppbServer")
;


Does this satisfy your use case ?

Thanks

Nick


On 10/03/15 09:26, Marius Cosma wrote:
> Hello guys,
>
>
>
> We have an omniORB C++ Corba server running in production that we would
like
> to replace with a Java Corba server, using JacORB.
>
>
>
> The old server can be accessed directly (no NameService used) using an URL
> similar to:
>
>                  corbaloc::1.1@<ip>:<port>/%ffmy%20poa%00ppbServer
>
> while JacORB uses a much nicer object key
>
>                  corbaloc::1.1@<ip>:<port>/myImpl/my%20poa/ppbServer
>
>
>
> The problem is that we need to preserve the old URL, so that the server
> change will be transparent for all our Corba clients.
>
>
>
>  From what I have checked, I was not able to find a solution to this.
>
> Do you know if this is possible? If yes, can you please share some hints?
>
>
>
> Thanks
>
>
>
>
> <http://www.computaris.com/events/>
> *Meet Computaris at MWC Barcelona, Hall 5, Booth 5K12*
>
> This email is subject to Computaris email terms of use:
http://www.computaris.com/email_terms
> _______________________________________________
> jacorb-developer maillist  -
jacorb-developer at lists.spline.inf.fu-berlin.de
> https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer
>

_______________________________________________
jacorb-developer maillist  -  jacorb-developer at lists.spline.inf.fu-berlin.de
https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer


<http://www.computaris.com/events/>
*Meet Computaris at MWC Barcelona, Hall 5, Booth 5K12*

This email is subject to Computaris email terms of use: http://www.computaris.com/email_terms


More information about the jacorb-developer mailing list