Murali,
see
the thread "pedstore: storing the userid" on this mailing list. The outcome was
to get the primary key always by "context.getPrimaryKey()" and not store it as
an instance variable, because the bean instance will be reused for different
entities and therefore the primary key of the object will change, if you don't
want to track the swapping instances, you'll be better of getting it always from
the context.
Arno
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development [mailto:[EMAIL PROTECTED]]On Behalf Of Murali Krishna, Gadde
Sent: Tuesday, January 18, 2000 1:01 PM
To: [EMAIL PROTECTED]
Subject: Primary key field as instance variable in BMP entity beansHi,
Is it mandatory to have an instance variable for primary key field in a bean managed entity bean? If it is mandatory, do I need to set that instance variable to context.getPrimaryKey() in ejbActivate () method and set it to null in ejbPassivate()?
Thanks,
Murali.
