Hi,
We use Hibernate 3.1.1 and configure it with an Oracle DB:
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="jdbc.batch_size">0</property>
<property name="connection.use_outer_join">false</property>
<property name="connection.datasource">jdbc.PDDB</property>
......
I have the following code to get the entity for update and like to specify the lock wait time so when the maximum waiting time is reached it will throw an Exception:
currOrder = (PDOrder) se.get(PDOrder.class, pdOrder.getComp_id(), LockMode.UPGRADE);
I do not want to use LockMode.UPGRADE_NOWAIT nor use LockMode.UPGRADE without the setting for maximum lock waiting time. But I have not found any solution to set the lock wait time for this. Also is there a way to specify the maximum lock time? If you have similar experience, please help! Any suggestion will be appreciated!
|