I want to access a non-transactional DB via JDBC.
Actually, the JDBC driver is somekind of a wrapper
to the DB objects. It doesn't support transactions
(commits, so we can't have rollbacks).
Should I use EJBs in this case? Can a EJB help me
here in dealing with transactions?
Thanks in advance.
It is very much clear that EJB container takes help of DB for transaction. If your DB does not supprt transaction , then the driver for that database can also not support transaction. In a transaction many parties are involved
1- ur Componant
3- DB Driver
If any of these party does not support transaction then u can not use transaction.
Weblogic supports three concurrency strategies on Entity EJBs. Exclusive, Database and ReadOnly.
The default behavour up to 5.1 was exclusive. This locked people out of the Entity Bean until the transaction completed. For a non transaction DB and a stand alone server this would work.
For 6.1 onwards Weblogic defaults to Database. This passes the locking request onto the database.
The solution could be having a batch read from this non-transactional data source and storing it in a normal database.