Suppose i have a database that is shared by multiple application.One Application uses ORM based approach(say hibernate) for persistence and another application uses sql for persistence.Both do write operations on the database.
How can we ensure concurrency control if we go for an optimistic locking option ? If the data is inserted using SQL, Will Hibernate automatically synchronize the persistent objects