#992 - Use HQL instead of JDBC to manage order locks