How could the container possibly now that your code is going to be calling n
number of setXXXX() methods vs calling m number of setXXXX() methods? It
would need to be able to know that in order to group multiple updates into
one update statement. In your example below, what if your code had only
done "customerBean.setName("Bob Tomato");"? If it was waiting until after
the setUrl() call to issue the single update, it would never issue the
update.
----- Original Message -----
From: "Dave King" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 08, 2001 6:33 PM
Subject: [JBoss-user] CMP Performance Question
> with jaws/cmp it seems that each set method issues an update statement to
> the DB. I'm wondering why this is. I'm guessing that it is easier this
way
> as the bean does not need to track what fields need to be updated.
>
> But that is a guess. I'm just curious as this behavior came as surprise
to
> me. I was expecting the bean to issue one update as a transaction
> completes.
>
> Here is what I am seeing.
>
> in a session bean a do something like
>
> customerBean.setName("Bob Tomato");
> customerBean.setUrl("www.bigidea.com");
>
> I see 2 sql statements with the SQL Server Profiler.
> update CustomerBean set name ='Bob Tomato"' where customerKey = 1
> update CustomerBean set url ='www.bigidea.com' where customerKey = 1
>
> I was expecting just one update statement for both.
>
> I have the session bean methods and CustomerBean methods set to Required
> for Transaction in ejb-jar.xml.
>
> I'm using
> MS SQL Server 7
> INET UNA driver (I know the Opta Driver is recommended but we have the UNA
> driver)
>
> So I'm curious about this behavior, and why it is that way. Would a BMP
> system have to have the same behavior? Is this some obvious setting that
> I've missed? Would this be worth changing? or is the overhead in tracking
> that some field needs to be updated higher than the cost of a update? If
> it's worth changing/investigating where do I sign up?
>
> -Peace
> Dave
>
>
>
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user