I am using the OJB 1.0.3 PB with MySql 5.0. I have a series of processes that work off of a common table. This common table is refreshed regularly. During this refresh, I would like to do to the affect of: 1. Begin a transaction. 2. Lock the entire table. 3. Delete entire table. 4. Unlock entire table. 5. End transaction.
While a single process on a single server does this, it would be great if the other read only processes seeking to use it were to fail fast with exception. Can anybody give me an example on how to do this? So far I have to the affect of: Query query = new QueryByCriteria(objectClass, null); broker.beginTransaction(); broker.deleteByQuery(query); broker.commitTransaction(); I am not sure how to do the fail fast table level locking. I feel I am missing other things as well. I can use some help filling in the gaps. If you have a better idea on how to implement, I am open. I was thinking I could just put a locking record in another table, but thought this might be better. Thanks for any help. JohnE -- View this message in context: http://www.nabble.com/Locking-entire-table-tp15035646p15035646.html Sent from the Apache DB - ObjectRelationalBridge Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]