2 Replies Latest reply on May 6, 2010 1:52 PM by Uros Majeric

    Seam 2.x components in Weld

    Uros Majeric Newbie

      How to get those behaviours in Weld:


      Component.getInstance(clazz, ScopeType.SESSION)

      What about for example in Theme.java (Seam 2.2)

          public static ThemeSelector instance() {
              //beanManager has to be static!
              if (!Contexts.isSessionContextActive()) {
                  throw new IllegalStateException("No active session context");
              return (ThemeSelector) Component.getInstance(ThemeSelector.class, ScopeType.SESSION);

      is it possible to inject static BeanManager:

      @Inject static BeanManager beanManager;

      Thanks, Uros