Reputation: 63
This is the first time I do a question and I ask this as I'm projecting my own architecture. What I've in mind is to do an integration between Stateful/Stateless EJB3 Session Beans + Hibernate, but considering scalability as an important issue. Thus, my thought is to concentrate the Hibernate ORM layer at some host and, considering a growing workload, to scale onto a load balancing approach.
As I understand, this approach is transparently managed with EJB 3 Entity Beans through JNDI lookup based on clustering capabilities within Glassfish, but, question here is I desire to take advantage onto the Hibernate capabilities that I consider can benefit my project.
So, what I want to know is:
I'm not expert in this approach so I can have faults in my focus, because that, I ask you for to get a better comprehension.
Upvotes: 2
Views: 951
Reputation: 692181
JPA/Hibernate doesn't have much to do with clustering. JPA entities are purely local, and can't be used remotely. The only thing you should care about regarding clustering with JPA is the second-level cache (if enabled) because another JVM might update entities that are in the cache.
Fail-over and load-balancing must be done at a higher-level : at the service layer, or at the presentation layer.
I'm not an expert in this area, but I find it much easier to have homogenous deployments, and to deploy the full app on several boxes with an HTTP load-balancer at the front.
Upvotes: 1