olve wrote:
As far as I understand, Hibernate can keep track of the transactions using JTA, but only within the web-application that started it. Also lock information are only kept in the cache (oposed to using the native db-vendors locking mechanism)?
JTA is completly delegated to you JTA TM, so Hibernate is only limited to it.
Hibernate *do not ever* put pessimistic lock information in the middle tier.
Only optimistic locking is send through layers, but there is no relationship.
Quote:
If rows are locked by a transaction in webappA, and another user uses webappB trying to change the same rows, how can I make hibernate react to that situation?
Read the optimistic locking chapter, it is not related to Db Transaction
Quote:
Can I do this by deploying the hibernate DAO and Managers by itself, and have webappA and B lookup up the specific managers through JNDI? Maybe using the Spring framework. Perhaps putting only the session object in the JNDI database?
I can't really understand what you've in mind. Can you do that with a plain old JDBC DAO ? If yes, you can do it with Hibernate.
Quote:
Maybe using a clustered cache? I hope for a simpler solution, as the webapps will be located on the same physical machine.. I am starting to think that I should rethink the architecture of this webapp..
You"re mixing differents issues. Yes, you should reconsider your architecture AFAIK