> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Aaron
> Mulder
> Sent: Wednesday, June 20, 2001 8:33 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [JBoss-dev] Is findByPrimaryKey optimized enough in
> JAWS/CMP, even BMP?
>
>
> On Tue, 19 Jun 2001, Bill Burke wrote:
> > The optimization would still work within the same transaction.
>
>       But it would be somewhat less useful.  I mean, how often do you do
> a findByPrimaryKey on an object that you've already accessed within the
> same transaction?

Actually in our application, there's about a 20% chance.  We process a lot
of batched isolated events in one transaction and I'm trying desparately to
reduce DB hits while trying to keep some semblance of elegant code.

>       As well, I'm still a bit concerned with using this in commit
> options B and C.  Say, for example, you read from a bean in the beginning
> of your transaction -- I don't think that would necesessarily lock the row
> in the DB.  So then another process deletes the row (and commits its
> action).  Now later in the transaction, you do a findByPrimaryKey on the
> bean.  Any work you try to do may subsequently fail.

You could turn this on and off with a flag, but maybe(probably) this isn't
worth cluttering the JBoss code base for an optimization that would benefit
almost nobody.

>       I think this optimization within a transaction would intoduce a
> lot of dependence on the DB locking and isolation strategies, for pretty
> minimal gain.
>

Why is it so bad to be dependent on the DB for locking and isolation?  In
fact, any scaled app running multiple instances of JBoss(ours for example)
absolutely depends on it for synching.

Thanks for discussing this.

Bill



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to