Browse files

restapp-bootstrap: Added TODOs to the README

  • Loading branch information...
1 parent 7d972d8 commit 6bb4fea0caf1a394dc6e148b1eaf3071ef49b6cf Jakub Holy committed Nov 28, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 restapp-bootstrap/
@@ -5,6 +5,19 @@ A minimalistic REST application based on Cloudname/Base and an embedded Jetty.
To be used as a starting point for your REST applications.
+* Upgrade to Base 3.6, use its embedded Jetty (replace WebServer with its com.comoyo.jetty.JettyServer)
+* Move this to a standlone sample repo, e.g. "comoyo-sample-code" together with
+* Clarify clean way to shut down Base - see Markus' comment on the Base page (B. 3.5)
+* ...
+Bakksjø: I think the original implementors of base just added a shutdown() method so that you can do a clean shutdown of base. This is useful in tests, for instance.
+If your JVM is going down anyway, I don't think it's critical that base.shutdown() is called before exit.
+Also, shutdown hooks are not a good way to do a clean shutdown (IMO). It's sort of like Thread.stop(), which the Java language designers discovered was a bad idea. What you do want instead is to have code that explicitly takes things down controlled, in the right order - typically the opposite of the initialization order. You don't add "initialization hooks", so why should you add shutdown hooks?
+Markus: Calling Base.shutdown() is necessary to ensure that logs are flushed before the application stops.

0 comments on commit 6bb4fea

Please sign in to comment.