Hi Evan,
The EJB-to-CORBA mapping will work for valuetypes because
OBV is designed with abstract and subclassable valuetypes in mind.
> Let's suppose for example you write a finder method on an EJB entity bean
> that returns a java.util.List (a JDK 1.2 collection type). Now if you apply
> the RMI-to-IDL mapping from OMG document 98-03-08.pdf, you will end up
> having the IDL operation for the finder method returning the valuetype
> that is generated from java.util.List, assuming that any can be generated
> as java.util.List is an interface, not a class. (EJB methods that return
> collections will frequently have an 'interface' return type, rather than
> a concrete implementation such as java.util.LinkedList). The trouble
> with the valuetype for java.util.List is that it has no fields! Oh well, so
> our CORBA 2.3 C++ client with OBV support that just took us six months to
> implement can't talk to an entity bean. Never mind! (We didn't implement this,
> I am just being sarcastic).
Valuetype marshaling/unmarshaling is designed to use run-time information
about the actual type of the value object. It is not necessary
that the concrete valuetype be specified in IDL. In your example above,
the Enumeration/Collection in the finder's signature would probably be mapped
to an abstract valuetype in IDL. At runtime, the concrete object
returned by the EJB finder will be marshaled by the EJB server's
ORB into the reply IIOP message, along with sufficient information (such
as RepositoryId) to allow the client to determine the type of the value
object which it needs to instantiate during unmarshaling. Obviously
your C++ client needs to have the libraries for the value types available
in its environment. For server-specific value types (as in this case),
your EJB server vendor will probably need to provide the client library,
while application-specific value type libraries would be created by
the developer.
The exact runtime details might differ from language to language,
you can get them from the relevant OMG mapping specs.
-Sanjeev Krishnan
Java Enterprise Technologies,
Sun Microsystems Inc.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".