Search in sources :

Example 11 with Meecrowave

use of org.apache.meecrowave.Meecrowave in project meecrowave by apache.

the class MeecrowaveContainer method start.

@Override
public void start() throws LifecycleException {
    this.container = new Meecrowave(this.configuration);
    this.container.start();
}
Also used : Meecrowave(org.apache.meecrowave.Meecrowave)

Example 12 with Meecrowave

use of org.apache.meecrowave.Meecrowave in project meecrowave by apache.

the class OWBAutoSetup method onStartup.

@Override
public void onStartup(final Set<Class<?>> c, final ServletContext ctx) throws ServletException {
    final Meecrowave.Builder builder = Meecrowave.Builder.class.cast(ctx.getAttribute("meecrowave.configuration"));
    final Meecrowave instance = Meecrowave.class.cast(ctx.getAttribute("meecrowave.instance"));
    if (builder.isCdiConversation()) {
        final FilterRegistration.Dynamic filter = ctx.addFilter("owb-conversation", WebConversationFilter.class);
        filter.addMappingForUrlPatterns(EnumSet.allOf(DispatcherType.class), false, "/*");
    }
    // eager boot to let injections work in listeners
    final EagerBootListener bootListener = new EagerBootListener(instance);
    bootListener.doContextInitialized(new ServletContextEvent(ctx));
    ctx.addListener(bootListener);
}
Also used : DispatcherType(javax.servlet.DispatcherType) Meecrowave(org.apache.meecrowave.Meecrowave) ServletContextEvent(javax.servlet.ServletContextEvent) FilterRegistration(javax.servlet.FilterRegistration)

Aggregations

Meecrowave (org.apache.meecrowave.Meecrowave)12 File (java.io.File)5 Field (java.lang.reflect.Field)3 ClientBuilder (javax.ws.rs.client.ClientBuilder)3 Test (org.junit.Test)3 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 Scanner (java.util.Scanner)2 Client (javax.ws.rs.client.Client)2 Orient (com.orientechnologies.orient.core.Orient)1 StringReader (java.io.StringReader)1 Method (java.lang.reflect.Method)1 MalformedURLException (java.net.MalformedURLException)1 URL (java.net.URL)1 URLClassLoader (java.net.URLClassLoader)1 ClosedWatchServiceException (java.nio.file.ClosedWatchServiceException)1 Path (java.nio.file.Path)1 ENTRY_CREATE (java.nio.file.StandardWatchEventKinds.ENTRY_CREATE)1 ENTRY_DELETE (java.nio.file.StandardWatchEventKinds.ENTRY_DELETE)1 ENTRY_MODIFY (java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY)1