[jacorb-developer] Handling invalid object_key

Nick Cross jacorb at goots.org
Tue Mar 10 12:50:40 CET 2015



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
>



More information about the jacorb-developer mailing list