views:

469

answers:

1

I have a corba releated question.

In my Java app I use typedef sequence Data;

Now I played around with this Data vector. If I am right with the Corba specification sequence will either be converted to xs:base64Binary or xs:hexBinary. It should be an Opaque type and so it should not use any marshalling.

I tried different idl styles:

void Get(out Data d);
Data Get();

but what I see is that moving the data using Corba is a lot slower than using a socket directly. I am fine with a little overhead but it looks for me like tha data is still marshalled.

Do I need to somehow configure my orb to suppress the marshalling or did I miss something.

+1  A: 

1) No, there is no need to configure something. 2) You haven't missed something.

As CORBA marshalles everything, an octet sequence is also marshalled. It's always marshalled just as it is (as byte sequence). Marshalling doesn't mean that it has to change in some way. The CDR encoding is used every time for object serialization. This process is called marshalling.

Btw do you use SUN's java orb or JacORB? As every ORB may have different or additional property settings. (But it shouldn't have...)

Octect definition re CORBA 3.0.3 spec: "Values for an octet constant outside the range 0 - 255 shall cause a compile-time error. [...] The octet type is an 8-bit quantity that is guaranteed not to undergo any conversion when transmitted by the communication system."

Edits in italics

tuergeist
Suns Java Orb. Does it matter?
Totonga
Is there a way to determine if base64 or hex is choosen.
Totonga
So, I asked the CORBA spec and it says that "Values for an octet constant outside the range 0 - 255 shall cause a compile-time error". So octect is alway a byte. Only for characters Base64/utf-8/-16 is possible. So an octect in every case has a size of one byte.
tuergeist
To encode the sequence, the ORB adds an unsigned long into the data stream just before the octets. This long is the length of the sequence.
tuergeist