I m 编写 Java E申请,在玻璃鱼上运行:
- 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.
是否有任何模式、图书馆......可以帮助这里?