Hi, You can't call the ejbCreate method directly as it is NOT exposed either by the home or the entity interface, what is exposed basically is the create(..) method which in turn calls the ejbCreate method. If you call your create(..) method basically what it does is it create 2 different entity bean with different primary key, and if you use findXXXX(...) method then it will refer to the existing bean that is already loaded with the searched data.
Hope that helps Cheers Nanik ----- Original Message ----- From: "Richard Martin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 01, 2002 11:36 PM Subject: two threads simultaneously creating the same entity > I know this is a dunce question but my brain has fallen out. > > I have two threads calling ejbCreate on the same entity at the same time and both are succeeding. Shouldn't the App Server defend against this case? How can I fix this? > > > > > ============================================================================ == > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. All information is the view of the individual and not necessarily the company. If you are not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication and its attachments is strictly prohibited. If you have received this email in error please notify: > [EMAIL PROTECTED] > > > ============================================================================ == > > =========================================================================== > 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". > =========================================================================== 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".
