The presentation tier will contain 2 web modules (serving different purposes and based on different technologies), the middle tier will be Spring beans without EJBs and the persistence tier will be JPA on Hibernate. I am wondering what would be the best project setup in this case. The IDE I am planning to use is MyEclipse 8.5. Thanks.
The presentation tier will contain 2 web modules (serving different purposes and based on
Share
One Java project for the common stuff that’s packaged as a JAR file.
Two web projects, each packaged in their own WAR file, that accept the common JAR file as a 3rd party dependency.
You can do that if you’re using a Java EE app server like WebLogic, JBOSS, Glassfish, Geronimo, or WebSphere. An EAR won’t be an option if you’re using a servlet/JSP engine like Tomcat or Jetty to deploy.
Three projects will have the advantage of looser coupling. Your two web apps are coupled at the common JAR and database levels, but from a deployment point of view you can alter the rest for one and not affect the other.
Everything that’s shared except for the web tier stuff.
That has to do with isolation, table locking, and the design of the application.