On 21 Apr 00, at 13:47, Jonathan K. Weedon wrote:

>
> <vendor>
> Our product supports either "int" or "Integer" as a PK type,
> as well as all other primitive or primitive wrapper types.
> </vendor>
>
> It is not clear to me if this is compliant or not with the
> EJB 1.1 specification.  Should only primitive wrappers be
> allowed.  And if so, is this sensible, given again that
> "int", in Java, means essentially "non-null Integer", which
> is a pretty reasonable type for a primary key field.
>

Hi Jonathan,

I believe that using primitive types such as int for a primary key is
non-conformant.  What I'm really curious about, though, is how you
manage to support it.

For instance, how do you support the remove( Object primaryKey )
function in EJBHome?  Or what do you return from finders with
more than one result, since neither java.util.Enumeration nor
java.util.Collection supports primitive types?  Or what do you return
from EJBObject's getPrimaryKey?

Do you just wrap the primitive type all over the place?  Or do you
have some other strategy?

Thanks,

-Dan

===========================================================================
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".

Reply via email to