There may be some performance advantage in not using the class. as this
class has to serializable. So to transfer this class across the wire java
uses serialization mechanism(or equivalent).


Regards
Ashwani Kalra
E-Commerce Group
NIIT Ltd. India


> ----------
> From:         vihs[SMTP:[EMAIL PROTECTED]]
> Reply To:     A mailing list for Enterprise JavaBeans development
> Sent:         Tuesday, August 01, 2000 1:24 PM
> To:   [EMAIL PROTECTED]
> Subject:      int as Primary Key
>
> Hi all
>
> I have only one column of datatype 'int' as the primary key for my entity
> bean.
> I have two options now :
>
>    * Define a new class called BeanPK and specify the class name in
>      <prim-key-class> element in ejb-jar.xml
>
>    * Define a container managed field of type java.lang.Integer in the
> bean
>      class. In ejb-jar.xml specify the following
>
>           <prim-key-class>java.lang.Integer</prim-key-class>
>           ..
>           <primkey-field>containerManagedFieldName</primkey-field>
>
>      This way I can save writing a new PK class.
>
> Any advantages/disadvantages following either type?
>
> TIA.
> --
> shiv
> [EMAIL PROTECTED]
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Talk to your friends online with Yahoo! Messenger.
> http://im.yahoo.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".
>
>
>
Visit http://www.NetVarsity.com for online learning

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