Posts

Showing posts from May, 2018

Two Phase Commit (2PC)

Image
  Two-Phase Commit (2PC) A special object, known as a coordinator, is required in a distributed transaction. As its name implies, the coordinator arranges activities and synchronization between distributed servers. The two-phase commit is implemented as follows: Phase 1 - Each server that needs to commit data writes its data records to the log. If a server is unsuccessful, it responds with a failure message. If successful, the server replies with an OK message. Phase 2 - This phase begins after all participants respond OK. Then, the coordinator sends a signal to each server with commit instructions. After committing, each writes the commit as part of its log record for reference and sends the coordinator a message that its commit has been successfully implemented. If a server fails, the coordinator sends instructions to all servers to roll back the transaction. After the servers roll back, each sends feedback that this has been completed.

Maven

Maven is a  build tool for ex. ant Common Problems and activities Multiple jars Spring framework and hibernate framework What are jar are required for spring and hibernate. Multiple jars Dependencies jars and versions need to close. - Matching the right version. Project Structure Building, publishing and deploying. http://maven.apache.org/ Recent release is 3.5.3 as on 2018-03-08. It requires minimum Java 7 Set the SYSTEM PROPERTIES  M2_HOME=D:\XXX\Software\apache-maven-3.0.5  // ADD THE MAVEN FOLDER LOCATION. PATH=D:\XXX\Software\apache-maven-3.0.5\bin; //ADD THE MAVIN BIN FOLDER c:\> mvn -version - create project structure, download the jar dependencies and build the s/w    Respository - maven talk to respository and get the information.  machine needs to connect to internet and talk to respository. mkdir myapp cd myapp/ mvn archetype:generate download the all the required plug-ins 1. enter the number project jar needs to download : 106 2.