title: Using Hibernate in a distributed system
body: <p>I am a newbie to web development and am planning to build a scalable web app on AWS. I have an architecture level doubt on using Hibernate on AWS.
  Basically on AWS multiple EC2's will be running in different parts of the world, Now 
  1) Should they all be using Hibernate locally to connect to a central MySQL server?
  2) Or there will be a single Hibernate machine and all EC2's will push DataBase related queries to him?</p>
  
  <p>If its the 1) approach the, Does Hibernate support transaction management in such a distributed system? I believe caching would also be a major problem with 1) because 1 EC2 might not know that another one has updated a table in DB. 
  How is ORM handled in such distributed systems in general?</p>
  
  <p>Thanks in advance</p>