Package org.jboss.weld.environment.se

Examples of org.jboss.weld.environment.se.Weld.shutdown()


               catch (Throwable t)
               {
                  System.out.println("Error during AcceptUserInput event");
                  t.printStackTrace();
               }
               weld.shutdown();
            }
         });

         currentShell.start();
         try
View Full Code Here


        WeldContainer wc = w.initialize();

        CDIBean bean = wc.instance().select(CDIBean.class).get();
        bean.test(env);

        w.shutdown();
    }

    public static class CDIBean {
        @Inject @KBase("cdiexample")
        KieBase kBase;
View Full Code Here

        WeldContainer wc = w.initialize();
        CDIInstanceExample bean = wc.instance().select(CDIInstanceExample.class).get();
        bean.go(System.out);

        w.shutdown();
    }

}
View Full Code Here

        String expected = "" +
                          "Dave: Hello, HAL. Do you read me, HAL?\n" +
                          "HAL: Dave. I read you.\n";
        assertEquals(expected, actual);

        w.shutdown();
    }
}
View Full Code Here

        String expected = "" +
                          "Dave: Hello, HAL. Do you read me, HAL?\n" +
                          "HAL: Dave. I read you.\n";
        assertEquals(expected, actual);

        w.shutdown();
    }
}
View Full Code Here

               // from its own classloaders before plugins are loaded and pollute the classpath.
               // We can work around it by loading weld before we load plugins, then restarting weld, but this is SLOW.
               try {
                  WeldContainer container = weld.initialize();
                  manager = container.getBeanManager();
                  weld.shutdown();
               }
               catch (Exception e) {}

               try {
                  // TODO verify plugin API versions. only activate compatible plugins.
View Full Code Here

               manager.fireEvent(new PreStartup());
               manager.fireEvent(new Startup(workingDir, restarting));
               manager.fireEvent(new PostStartup());
               manager.fireEvent(new AcceptUserInput());
               weld.shutdown();
            }
         });

         currentShell.start();
         try
View Full Code Here

               // We can work around it by loading weld before we load plugins, then restarting weld, but this is SLOW.
               try
               {
                  WeldContainer container = weld.initialize();
                  manager = container.getBeanManager();
                  weld.shutdown();
               }
               catch (Exception e)
               {
               }
View Full Code Here

               catch (Throwable t)
               {
                  System.out.println("Error during AcceptUserInput event");
                  t.printStackTrace();
               }
               weld.shutdown();
            }
         });

         currentShell.start();
         try
View Full Code Here

        WeldContainer wc = w.initialize();
        CDIExampleWithInclusion bean = wc.instance().select(CDIExampleWithInclusion.class).get();
        bean.go(System.out);

        w.shutdown();
    }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.