• Post Reply Bookmark Topic Watch Topic
  • New Topic

which driver

 
Kalpesh Soni
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we are using mssql server and weblogic 7.0 with some stateless session beans
we are finding that there is some problem in transactions
we use microsoft's mssql driver
I am not sure whether this driver supports ejb transacations (or whether all drivers are supposed to support ejb transactions implicitely)
Also let me know wheter i can use oracle's driver for ejb transactions (classes12.zip)
and why does weblogic have its own drivers ??
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
It is the container which takes care of all transactions.
Can u paste what error are u getting?
 
Kalpesh Soni
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not getting any error actually
just that even if i throw application exceptions, transaction rollback should undo my db changes
Can you please tell me how container knows, what connection object to roll back transaction on?
If i do not use java.sql.DataSource etc then how will container manage everything ?
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Application Exceptions will not cause the container to rollback your transaction.

Section 17.3.4.2 from EJB 2.0 Specification
Typically an enterprise bean marks a transaction for rollback to protect data integrity before throwing an application exception, because application exceptions do not automatically cause the Container to rollback the transaction.

See section 18.1.1 Application Exceptions for more details.
 
Kalpesh Soni
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
we tried to use container managed transactions
transaction type Required
on exception
we say
sessionContext.setRollbackOnly()
is it enough ?
can somebody tell me about drivers support of ejb transactions ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!