Skip to content
Browse files

Merge pull request #104 from jakubholynet/master

restapp-bootstrap: Added TODOs to the README
  • Loading branch information...
2 parents 85258d2 + 6bb4fea commit ad22fe68657c7c67a11e5b4e1375f41edf9bbb26 @acidmoose acidmoose committed
Showing with 13 additions and 0 deletions.
  1. +13 −0 restapp-bootstrap/
13 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 ad22fe6

Please sign in to comment.
Something went wrong with that request. Please try again.