CORBA valuetype considerations

The Java language to Interface Definition Language (IDL) specification maps Java serializables to CORBA valuetypes (pass-by-value objects). Therefore, every Java serializable object that is passed between a client and server (for example, by a CORBA client as a parameter or return value for an enterprise bean) must be reimplemented in the language of the client. (The implementation for the valuetype must be defined and provided in the language run time for both the client and the server.) Implementation of Java serializable objects as valuetypes in C++ or another language can be a significant development effort.

Valuetypes were introduced by the CORBA 2.3 specification and many other Object Request Brokers (ORBs) do not implement the specification or do not implement it fully.

To aid application development, WebSphere Application Server provides a valuetype library that contains the C++ valuetype implementation for some commonly used Java classes in the java.lang, java.io, and java.util packages (for example, Integer, Float, Vector, Exception, OutputStream, and so on). For more information about the valuetype library provided with WebSphere Application Server, see "CORBA valuetype library for C++".

Java language to IDL specification

An enterprise bean is implemented in the Java language with no hint of the CORBA architecture in its programming model. The enterprise bean specification requires that the server implementation be restricted to using those Java language constructs defined as the RMI/IDL subset by the Java language to IDL specification.

By following the Java language to IDL specification, you can create CORBA clients implemented in any programming language for which there is a defined mapping and for which ORB supporting valuetypes are available.

When valuetypes are not supported

For languages other than Java, such as C++, the CORBA architecture is often the only viable option for accessing enterprise beans.

For session bean interfaces that only use primitive data types, you can use generated IDL files to access the enterprise beans even if the client ORB does not support valuetypes. However, the IDL generated from such an enterprise bean still can include valuetype declarations for exceptions or other entities.

If you decide that the features supported by valuetypes are not needed, consider using the strategies outlined in "Resolving unsupported CORBA data types".


Related concepts
CORBA programming model
CORBA valuetype library for C++
Resolving unsupported CORBA data types
Related tasks
Creating your own C++ valuetypes



Searchable topic ID:   ccor_iovalu
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/corba/concepts/ccor_iovalu.html

Library | Support | Terms of Use | Feedback