• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CORBA restriction?

 
Alexander Yanuar Koentjara
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all..
In one of the study guide, I read that CORBA object can only be passed by reference, but in other book (I forgot which one), CORBA can only be passed by value. Which one is right?
I learned that in Java we can use Stringified to pass object by reference in CORBA (object_to_string and string_to_object), so it uses pass by reference?
In other hand, when we use IDL (by converting idl to java using idlj), the returned object or argument object is converted to final class by ORB internally, and it implements java.io.Serialization. So, does it use pass by value, or pass by reference (the stub which is passed is actually a proxy object in client)?
Question:
1. For CORBA object which is bound to naming server, was it retrieved by java using pass by reference or pass by value? (RMI use pass by reference in this case).
2. When passing parameter or receiving method result from CORBA object, does it use pass by value or pass by reference?
3. When using java to call CORBA object, what kind restrictions applied?
4. What is the relationship between PortableRemoteObject.narrow() with org.omg.CORBA.ORB.string_to_object()?
 
Mon Mayor
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good thinking.
Originally posted by Alexander Yanuar Koentjara:
Hi all..
In one of the study guide, I read that CORBA object can only be passed by reference, but in other book (I forgot which one), CORBA can only be passed by value. Which one is right?
--------IN parameters can be passed by value. OUT/INOUT need to be passed by reference.

I learned that in Java we can use Stringified to pass object by reference in CORBA (object_to_string and string_to_object), so it uses pass by reference?
-------I guess this would be a remote reference represented by the stub. The orb instantiates a stub locally correspondig to the object.
In other hand, when we use IDL (by converting idl to java using idlj), the returned object or argument object is converted to final class by ORB internally, and it implements java.io.Serialization. So, does it use pass by value, or pass by reference (the stub which is passed is actually a proxy object in client)?
------The idl compiler generates holder class which implements corba streamable interface only for those objects which are passed as OUT or INOUT(so by reference). Again returned objects are like IN by value.


Question:
1. For CORBA object which is bound to naming server, was it retrieved by java using pass by reference or pass by value? (RMI use pass by reference in this case).
------only the string (IOR) is retrieved and not the object.
2. When passing parameter or receiving method result from CORBA object, does it use pass by value or pass by reference?
----Can be both.
3. When using java to call CORBA object, what kind restrictions applied?
4. What is the relationship between PortableRemoteObject.narrow() with org.omg.CORBA.ORB.string_to_object()?

-----When using rmi/iiop they are similar. For PortableRemoteObject the class name is specified whereas that info is buried inside the IOR string.
Hope this helps.
Thanks
-MM (SCEA)
 
Alexander Yanuar Koentjara
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks very much Mayor!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic