Package org.jboss.weld.environment.se

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


        Assert.assertEquals(2, foo2.getValue());

        weld1.shutdown();

        Assert.assertEquals(2, foo2.getValue());
        weld2.shutdown();
    }
}
View Full Code Here


        try {
            WeldContainer wc = weld.initialize();
            Assert.assertNotNull(wc.instance().select(KPT.class).select(new KPQLiteral()).get());
            Assert.assertNotNull(wc.instance().select(KPT.class, new KPQLiteral()).get());
        } finally {
            weld.shutdown();
        }
    }
}
View Full Code Here

      WeldContainer weldContainer = weld.initialize();
      weldContainer.instance().select(Tree.class).get();
      assertTrue(Plant.postConstructCalled);

    } finally {
      weld.shutdown();
    }
  }

}
View Full Code Here

                        addon.setStatus(AddonStatus.LOADED);
                        if (operation != null)
                           operation.cancel(true);
                     }

                     weld.shutdown();
                     return null;
                  }
               };

               postStartupTask = new Callable<Void>()
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

               BeanManager manager = container.getBeanManager();
               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

        ParametersTestBean paramsBean = mainTestBean.getParametersTestBean();
        assertNotNull(paramsBean);
        assertNotNull(paramsBean.getParameters());

        weld.shutdown();
    }

    /**
     * Test the firing of observers using the alternate API for booting WeldContainer from an SE app.
     */
 
View Full Code Here

        // moved as per WELD-949
        assertTrue(ObserverTestBean.isInitObserved());
        assertTrue(InitObserverTestBean.isInitObserved());

        weld.shutdown();
        assertTrue(ObserverTestBean.isDestroyedObserved());
    }

}
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

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.