0

I'm interested in hearing out what's out there in terms of tips and tricks on deploying and maintaining a Java web application whilst keeping agile. I'm running solo on a startup project I'd like to maintain.

My tech stack is fairly simple:

  • Spring MVC
  • Spring Core for IOC (Inversion of Control)
  • JPA/Hibernate for transctional processing

all of this using a single instance of Tomcat as a container and MySQL to keep my states.

So my questions are:

  • How is it usually structured? I currently have three JAR/WAR projects:

    • the delegate [JAR] - containing my interfaces,
    • the implementation [JAR] - implementing my interfaces (above), and
    • the web application [WAR] - which is my Spring MVC web application depending on just the implementation

    These are then wrapped into a WAR file which is then deployed to my Tomcat container. Is this recommended?

  • Is there a way to hot deploy? I've seen what Heroku does by making your project self-runnable (by including Jetty/Tomcat within the project itself), pulling the update via a git repository and reruns the project for you. I thought the usual modus operandi is running mvn package and move it to the container (which is already switched on).

  • recommended reading: Why is asking a question on “best practice” a bad thing? – gnat Oct 7 '14 at 6:52
  • I can relate and understand the 'reading' you mentioned, which I appreciate to be perfectly clear. And yet I can't help but realize how such a recommended reading gives room to the plethora of geniune questions which are asked get shot down because someone innocently used the phrase 'best practices'. If you look closely to my question it shows I have thought on how to get things done to the point I am capable of understanding. What I am looking for is just a verification or an improvement (based on the context which I have clearly explained) I may be overlooking in my field, from fellow peers. – Matthew Cachia Oct 7 '14 at 7:21
  • as indicated by your own edit in rev 2, questions that are good at core, can go well without referring beaten cliches like "best practices" – gnat Oct 7 '14 at 7:28
1

I would suggest you to take a look at Spring Boot. It can save you a lot of configuration. They have a lot of archtypes with different technology stack combinations out of the box. Such app lightweight can be deployed anywhere. You can still switch from embedded Tomcat/Jetty to hosted alternative at later stage.

It is new opinionated way to build Spring based apps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.