Questions tagged [dropwizard]

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services.

Developed by Yammer to power their JVM-based backend services, Dropwizard pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package that lets you focus on getting things done.

Dropwizard has out-of-the-box support for sophisticated configuration, application metrics, logging, operational tools, and much more, allowing you and your team to ship a production-quality HTTP+JSON web service in the shortest time possible.

Integration with many well-established libraries, frameworks and technologies is provided with additional official modules and community supported modules.

2009 questions
93
votes
1 answer

Advice deploying war files vs executable jar with embedded container

There seems to be a current trend in java space to move away from deploying java web applications to a java servlet container (or application server) in the form of a war file (or ear file) and instead package the application as an executable jar…
Brice Roncace
  • 10,110
  • 9
  • 60
  • 69
76
votes
1 answer

DropWizard Metrics Meters vs Timers

I am learning the DropWizard Metrics library (formerly Coda Hale metrics) and I am confused as to when I should be using Meters vs Timers. According to the docs: Meter: A meter measures the rate at which a set of events occur and: Timer: A timer…
smeeb
  • 27,777
  • 57
  • 250
  • 447
49
votes
11 answers

Change Dropwizard default ports

I have a Dropwizard based Jersey REST service running on the default ports 8080(service) and 8081(admin), I need to change the default ports to something that is less commonly used, I am not able to find any information to do so , can someone please…
user1965449
  • 2,849
  • 6
  • 34
  • 51
45
votes
2 answers

SIGTERM not received by java process using 'docker stop' and the official java image

I am running a dropwizard Java application in a Docker container using the image java:7u79 based on debian/jessie. My Java application handles the SIGTERM signal to shutdown gracefully. The SIGTERM handling works perfect when I run the application…
Sunil Kumar
  • 1,631
  • 2
  • 19
  • 33
45
votes
6 answers

Spring - Programmatically generate a set of beans

I have a Dropwizard application that needs to generate a dozen or so beans for each of the configs in a configuration list. Things like health checks, quartz schedulers, etc. Something like this: @Component class MyModule { @Inject private…
noah
  • 21,289
  • 17
  • 64
  • 88
34
votes
4 answers

How to create a one-to-many relationship with JDBI SQL object API?

I'm creating a simple REST application with dropwizard using JDBI. The next step is to integrate a new resource that has a one-to-many relationship with another one. Until now I couldn't figure out how to create a method in my DAO that retrieves a…
Tilman
  • 925
  • 1
  • 8
  • 18
29
votes
1 answer

DropWizard Bootstrap vs Configuration vs Environment

A typical DropWizard application specifies an Application subclass, and override its initialize method like so: class MyApplication extends Application { static void main(String[] args) { new MyApplication().run(args) …
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
26
votes
3 answers

When to use DropWizard bundles?

I am curious about an elusive - but potentially very powerful - DropWizard feature called Bundles. According to the docs: A Dropwizard bundle is a reusable group of functionality, used to define blocks of an application’s behavior. Given that…
smeeb
  • 27,777
  • 57
  • 250
  • 447
25
votes
2 answers

jdbi return autogenerated value on inserts

I am playing with dropwizard and I want to build a REST application that has various foreign-key relations in the entities. For example given the following 3 tables: -- table persons CREATE TABLE PUBLIC.PERSONS( ID BIGINT DEFAULT NOT NULL…
Alexander Köb
  • 944
  • 1
  • 9
  • 19
24
votes
4 answers

Enabling cors in dropwizard not working

I'm working on a dropwizard application and js ui to interacte with the api. I need to load json data to update views but I have to enable cors in dropwizard before that. I did some staff but it seems not working because dropwizard returns allways…
naslami
  • 345
  • 2
  • 4
  • 12
23
votes
2 answers

No session currently bound to execution context

I got below exception when I used session.getCurrentSession(). I have mentioned hibernate.current_session_context_class: managed org.hibernate.HibernateException: No session currently bound to execution context at…
Srinivas
  • 231
  • 1
  • 2
  • 5
23
votes
3 answers

Dropwizard file upload

I have to upload a file from my site yet cnt seem to get it working with drop wizard. Here is the form from my site.
Ernie
  • 567
  • 2
  • 6
  • 23
21
votes
1 answer

DropWizard Auth by Example

I'm trying to understand how authentication and authorization work in DropWizard. I've read their auth guide as well as the dropwizard-security project on GitHub, but feel like I'm still missing a few important concepts. public class…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
21
votes
2 answers

Overriding server connector config with env variables with dropwizard

I have posted this question on dw mailing list but didnt get an answer. Can I assume the YML format below doesnt work for DW 0.7.0 anymore? (The use of @ char to insert env var) server: applicationConnectors: - type: http bindHost:…
StephenNYC
  • 1,234
  • 3
  • 12
  • 29
19
votes
2 answers

IllegalStateException within method with Response paramether

I wrote a simple class to test response reading entity method (if it works as I expect). But it didn't worked well. When I launch my class I get following error at response.readEntity(): Exception in thread "main" java.lang.IllegalStateException:…
VanDavv
  • 836
  • 2
  • 13
  • 38
1
2 3
99 100