Damon,
The container-generated class (or equivalent code) that implements
the Home interface must do the conversion between key (returned
by the bean) and object reference (expected by the client), or
key collection (returned by the bean) and collection of object
references (expected by the client).
So in the case of the 'find' methods, it is the Home-object which
must have the capability of converting primary key values into
object references.
The discrepency in the spec is that one part is referring to 'find...'
methods on the Home interface, whereas the other is referring to
the inferred 'ejbFind...' methods on the bean class.
So this part is clear. However what seems to be underspecified is
how these collections should be marshalled over the wire for
interoperability, in the case where 'find...' method returns a
collection. Perhaps it is assumed that the 'find...' method on the
Home interface will return an instance of java.util.Enumeration
that implements java.io.Serializable. However EJBObjects are
not required to implement java.io.Serializable. So how are we
supposed to implement a serializable enumeration of non-serializable
objects, in such a way as to allow the promised interoperability
over IIOP? I am not clear on this. Perhaps someone could enlighten
me.
Damon Williams wrote:
> On page 71 of the Spec (1.0), in section 9.7.5: "The return type of a finder method
>must be the enterprise Bean's primary key type, or a collection of objects of the
>primary key type." On page 72 in section 9.7.8: "The return type for a finder method
>must be the enterprise Bean's remote interface type, or a collection thereof." I
>don't understand the discrepancy! Is this a typo? Also, let's say we define an
>ejbFindLargeAccounts(double amount) method, in the body of which we execute the SQL
>query and receive a ResultSet back with a selection of rows from the database. How
>then do we turn this data into a collection of Entity Bean remote interfaces, which
>is what section 9.7.8 requires us to return?
>---------------------------------------------------
> Damon Williams
> Simplified Telesys
> Sun Certified Java Programmer
> www.simpletel.com
===========================================================================
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".