All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sdase.commons.server.weld.WeldBundle Maven / Gradle / Ivy

Go to download

A libraries to bootstrap services easily that follow the patterns and specifications promoted by the SDA SE

There is a newer version: 7.2.3
Show newest version
package org.sdase.commons.server.weld;

import io.dropwizard.core.Configuration;
import io.dropwizard.core.ConfiguredBundle;
import io.dropwizard.core.setup.Bootstrap;
import io.dropwizard.core.setup.Environment;
import org.jboss.weld.environment.servlet.Listener;

/**
 * Dropwizard Bundle that adds a listener for using Injection inside of servlets.
 *
 * 

The use of the Bundle is optional, but the use of the {@link DropwizardWeldHelper} is * required. * *

Example usage: * *

{@code
 * public void initialize(final Bootstrap bootstrap) {
 *   bootstrap.addBundle(new WeldBundle());
 * }
 * }
*/ public class WeldBundle implements ConfiguredBundle { @Override public void initialize(final Bootstrap bootstrap) { // not implemented } @Override public void run(final Configuration configuration, final Environment environment) { environment.getApplicationContext().addEventListener(new Listener()); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy