3 Replies Latest reply on Dec 4, 2008 4:39 AM by matt.drees

    Does extended Identity allow injection?

    mrauls.mrauls.akimeka.com

      I have a seam application that includes an class that extends Identity. I know this identity is working in that is instantiated correctly and is available. However for some reason I can't seem to inject a couple of objects into the extended identity -- they are both always null. One of the objects is an application scoped bean, the other is a stateless session bean. I have been able to successfully inject both objects into other objects.


      My core question is are you allowed to inject seam objects into an identity?



      @Name("org.jboss.seam.security.identity")
      @Scope(ScopeType.SESSION)
      @Install(precedence = Install.APPLICATION)
      @BypassInterceptors
      @Startup
      public class MsatIdentity extends Identity{
           @In(create=true)
           INavigation navBo;
           
           @In
           NavItemCache navItemCache;
      ...}
      
      ...
      
      @Name("navItemCache")
      @Startup
      @Scope(ScopeType.APPLICATION)
      public class NavItemCache {...}
      
      ...
      
      @Stateless
      @Name("navBo")
      public class NavigationBo implements INavigation {...}