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

Reply via email to