Server configuration

Dropwizard 0.7.1 is used to start and configure Jetty and to parse and validate the command line and configuration file. This is only mentioned here as the Dropwizard Configuration Reference lists and explains the base settings that can be used in the configuration file.

Unfortunately the database properties are absent from the 0.7.1 reference. Have a look at the 0.8 reference instead. However, the validationQueryTimeout property is new in 0.8 and is not supported in 0.7.1.

Environment variables

Environment variables can be used in the YAML configuration file.

For example:

database:
  driverClass: org.postgresql.Driver
  url: jdbc:postgresql://${DATABASE_HOST}/${DATABASE_NAME}
  user: ${DATABASE_USER}
  password: ${DATABASE_PASSWORD}

Additional settings

In addition, the following properties are supported:

broker

Configures how to connect to ActiveMQ.

  • user: The user to authenticate as.
  • password: The password to authenticate using.
  • url: Default is “tcp://localhost:61616”.
  • embeddedBroker: The broker URI to use to start an embedded broker. For example “broker:(tcp://localhost:61616)”. Default is “” (no embedded broker).

Note

If you are using embedded ActiveMQ with KahanDB, the KahanDB journal log could keep growing if there are expired messages in the queue “ActiveMQ.DLQ”.

To fix this, you will need to enable jmx in the broker URI , and purge the queue manually using activemq-admin.

embeddedBroker: broker:(tcp://localhost:61616)?usekahadb=true&kahadb.directory=/path/to/db/&persistent=true&useJmx=true
./activemq-admin -Dactivemq.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi purge ActiveMQ.DLQ

Or setup a standalone ActiveMQ instance, and set processExpired=”false”

http://activemq.apache.org/message-redelivery-and-dlq-handling.html

ejbPool

These settings configures the stateless container in OpenEJB. They are explained in more detail at http://tomee.apache.org/containers-and-resources.html.

  • maxSize: The maximum number of beans in the stateless bean pool. Default is 10.
  • idleTimeout:
  • strictPooling: If the pool may NOT grow larger then maxSize. Default is false.

cluster

  • bindAddress: The address to bind on, as an IP address or hostname. Default is 127.0.0.1.
  • bindPort: The port to bind on. Default is 7800.
  • bindPortRange: The range of ports to try in case bindPort is taken. Default is 30.
  • externalAddress: The address to publish to members in the cluster. Default is bindAddress.
  • externalPort: The port to publish to members in the cluster. Default is the port that was bound on.