Rahul Aras wrote:

> Hi All ,
>
> In my application ,I am using stateless session beans with bean managed
> transactions with MS SQL Server 2000 as my database. Presently I am not
> calling the UserTransaction object explicitly.I am instead relying on the
> begin(),commit(),setAutoCommit() of the java.sql.Connection object to
> perform inserts/updates/deletes. Now I understand that it is good practice
> not to group too many statements in one transaction when auto-commit is set
> to OFF on the Connection object because the database can experience problems
> due to lack of memory. I have 2 questions relating to this
>
> 1. Does anybody have a performance benchmark as to how many statements can
> be grouped into one transaction ?

i think maybe you have a few things mixed up here.  databases
cannot truncate their xact log beyond the oldest active xact.
so if you have long running xacts you'll need a big log.  it
has nothing to do with the number of statements per se.
the issue is the ammount of data that changes between xact
begin and commit (including changes by other database connections).

>
>
> 2. At the database level , if some triggers have been set which are supposed
> to fire upon a insert/delete/update , would they       be part of a bean
> managed transaction if
> a) UserTransaction object is used explicitly
> b) UserTransaction object is not used , only java.sql.Connection methods are
> relied upon for transaction management?

triggers are usually statement based (i don't believe sql server has xact
triggers, few databases do).  so your triggers will fire when the your
statements that modify the trigger taget tables execute.
it has nothing to do with how the xact is committed at all.


>
>
> - Rahul
>
> ===========================================================================
> 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".

Reply via email to