Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clustering of EJB/App Server - What Really Do?

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question about the implications of clustering of an EJB appserver. When you cluster an app server, does that automatically cluster the databases (assuming that's your data storage backing the EJBs)they "represent", assuming you only interact with the data through the app server? In other words, if I have the following:


Would clustering those EJB App servers cause them to stay in synch and as a result cause their databases to be kept in synch? Also, would clustering them also allow transactions to protect the data properly between the two? So if I am editing on EJB App Serve 1 and someone tries to edit the same data on EJB App Server 2, they cannot, correct?
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally, clustered application servers would share the same database.
Kyle
 
Sergiu Truta
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a clustered environment you use several application servers but the database server is the same. Also a clustered environment should work as if it were a single application server and a mechanism must be implemented so that no two users can edit the same record in the same time. If the cluster is not working as if it were a single application server than something is wrong with it.
 
Tonny Tssagovic
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, usually your app servers access the same DB server to make sure you have a consistent state. The database servers can themselves be clustered to deal with high load. In case you are using one DB server, and it starts showing performance problems (and you need a cheap/free solution) then I would suggest you to take a look at Clustered-JDBC.
Clus. JDBC
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic