JPA in distributed Java EE configuration

Posted by sof on Stack Overflow See other posts from Stack Overflow or by sof
Published on 2010-06-10T16:08:58Z Indexed on 2010/06/10 17:02 UTC
Read the original article Hit count: 195

Filed under:
|
|
|

Hello,

I'm developing a JEE application to run on Glassfish:

  • Database (javaDB, MS SQL, MySQL or Oracle)
  • EJB layer with JPA (Toplink essentials - from Glassfish) for database access
  • JSF/Icefaces based web UI accessing the EJB layer

The application will have a lot of concurrent web client, so I want to run it on different physical servers and use a load-balancer. My problem is now how to keep the applications synchronized. I intend to set up multiple servers, each running Glassfish with my EAR app installed. Whenever on one of the servers data is added to or removed from the database (via JPA, no direct SQL queries), this change should be reflected in the JPA layer on the other servers. I've been looking around for solutions to this, but couldn't find anything I really like (the full Toplink from Oracle claims to have a solution, but don't know). Doing a refresh before every access to a JPA entity could work, but is far from efficient.

Are there any patterns, libraries, ... that could help here?

Thanks a lot!

© Stack Overflow or respective owner

Related posts about java

Related posts about jpa