userTransaction or JDBC transaction
"tadta" <[email protected]> Tue, 02 Apr 2002 17:01:39 -0000
| Newsgroups | gmane.comp.java.ejb.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
please give suggestions...
We are using a application server with connection pooling
jsp and servlets are used in project
for transactions Is userTransaction is better or JDBC transaction is
better
userTransaction may be implemented like this
try
{
getUserTransaction
transaction.begin
execute queries
transaction.commit
}
catch()
{
transaction.setRollbackOnly
}
JDBC Transaction may be implemented like this
connection.autoCommit=false
try
{
execute queries
connection.commit
}
catch()
{
connection.rollback
}
which is better for scalability and performance when we have to use
transactins
in jsp/servlets
regards