Question

I'm new to Dropwizard. In the newest documentation, it refers to "Service" as the main entry point of any application. But in the example code, it actually uses "Application". I'm assuming that "Application" is a new name for "Service", since I can't find "Service" in the new source code.

I also noticed that the namespace has changed from "com.yammer" to "com.codehaus" to "io.dropwizard". I'm assuming it reflects the evolution of the project itself. Just out of curiosity, can anyone add some context to how this came about?

Was it helpful?

Solution

Both the naming changes you cited are actually changes for the upcoming Version 0.7. The documentation isn't up-to-date yet (and is actually the main thing holding back the 0.7 release according to the mailing list).

The current release notes can be found in the master branch.

  • Upgraded to Java 7.
  • Moved to the io.dropwizard group ID and namespace.
  • Extracted out a number of reusable libraries: dropwizard-configuration, dropwizard-jackson, dropwizard-jersey, dropwizard-jetty, dropwizard-lifecycle, dropwizard-logging, dropwizard-servlets, dropwizard-util, dropwizard-validation.
  • Extracted out various elements of Environment to separate classes: JerseyEnvironment, LifecycleEnvironment, etc.
  • Extracted out dropwizard-views-freemarker and dropwizard-views-mustache. dropwizard-views just provides infrastructure now.
  • Renamed Service to Application.
  • Added dropwizard-forms, which provides support for multipart MIME entities.
  • Added dropwizard-spdy.
  • Added AppenderFactory, allowing for arbitrary logging appenders for application and request logs.
  • Added ConnectorFactory, allowing for arbitrary Jetty connectors.
  • Added ServerFactory, with multi- and single-connector implementations.
  • Added ReporterFactory, for metrics reporters, with Graphite and Ganglia implementations.
  • Added ConfigurationSourceProvider to allow loading configuration files from sources other than the filesystem.
  • Added setuid support. Configure the user/group to run as and soft/hard open file limits in the ServerFactory. To bind to privileged ports (e.g. 80), enable startAsRoot and set user and group, then start your application as the root user.
  • Added builders for managed executors.
  • Added a default check command, which loads and validates the service configuration.
  • Added support for the Jetty HTTP client to dropwizard-client.
  • Added Jackson Afterburner support.
  • Added support for deflate-encoded requests and responses.
  • Added support for HTTP Sessions. Add the annotated parameter to your resource method: @Session HttpSession session to have the session context injected.
  • Added support for a "flash" message to be propagated across requests. Add the annotated parameter to your resource method: @Session Flash message to have any existing flash message injected.
  • Added support for deserializing Java enums with fuzzy matching rules (i.e., whitespace stripping, -/_ equivalence, case insensitivity, etc.).
  • Added HibernateBundle#configure(Configuration) for customization of Hibernate configuration.
  • Added support for Joda Time DateTime arguments and results when using JDBI.
  • Added configuration option to include Exception stack-traces when logging to syslog. Stack traces are now excluded by default.
  • Added the application name and PID (if detectable) to the beginning of syslog messages, as is the convention.
  • Added --migrations-file command-line option to migrate command to supply the migrations file explicitly.
  • Validation errors are now returned as application/json responses.
  • Simplified AsyncRequestLog; now standardized on Jetty 9 NCSA format.
  • Renamed DatabaseConfiguration to DataSourceFactory, and ConfigurationStrategy to DatabaseConfiguration.
  • Changed logging to be asynchronous. Messages are now buffered and batched in-memory before being delivered to the configured appender(s).
  • Changed handling of runtime configuration errors. Will no longer display an Exception stack-trace and will present a more useful description of the problem, including suggestions when appropriate.
  • Changed error handling to depend more heavily on Jersey exception mapping.
  • Changed dropwizard-db to use tomcat-jdbc instead of tomcat-dbcp.
  • Changed default formatting when logging nested Exceptions to display the root-cause first.
  • Replaced ResourceTest with ResourceTestRule, a JUnit TestRule.
  • Dropped Scala support.
  • Dropped ManagedSessionFactory.
  • Dropped ObjectMapperFactory; use ObjectMapper instead.
  • Dropped Validator; use javax.validation.Validator instead.
  • Fixed a shutdown bug in dropwizard-migrations.
  • Fixed formatting of "Caused by" lines not being prefixed when logging nested Exceptions.
  • Fixed not all available Jersey endpoints were being logged at startup.
  • Upgraded to argparse4j 0.4.1.
  • Upgraded to Guava 15.
  • Upgraded to Hibernate Validator 5.0.1.
  • Upgraded to Jackson 2.2.3.
  • Upgraded to JDBI 2.50.
  • Upgraded to Jetty 9.0.5.
  • Upgraded to Liquibase 3.0.4.
  • Upgraded to Logback 1.0.13.
  • Upgraded to Metrics 3.0.1.
  • Upgraded to Mustache 0.8.13.
  • Upgraded to SLF4J 1.7.5.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top