I understand what you are saying in the first possible solution. However, in this case the user is clicking on the same link. There are multiple requests which are being fired off at the same time. The access is the same, since it's the same link that is being pressed.
The second solution would work at the cost of having to maintain duplicate code. The navigation relationships and security management are quite difficult, thus I would have to duplicate a lot of complicated code. I am wondering if this is a bug on the application server. -AP_ -----Original Message----- From: A mailing list for Enterprise JavaBeans development [mailto:[EMAIL PROTECTED]]On Behalf Of Mike Bresnahan Sent: Sunday, May 05, 2002 10:52 AM To: [EMAIL PROTECTED] Subject: Re: The problem with deadlocking transactions... > When we wrap a transaction around our read operations the > container does not > have to ejbLoad/ejbStore for every call into the entity bean, however, we > noticed that users clicking on the same link in the browser in rapid > succession create multiple requests which all promptly deadlock on each > other. First possible solution: Analyze your data access paths and see if you can ensure that users always access data in the same order. For example, given entities X and Y, make sure that users always lock X and then Y. If you can do this, you can eliminate the possibility of a deadlock. Second possible solution: Use a lightweight mechanism for read-only data. I.e. don't use EJBs for data that you are only reading, use a Data Access Object instead. Mike Bresnahan =========================================================================== 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".
