2 Replies Latest reply on Nov 16, 2007 5:34 AM by Patrick Madden

    RuleBasedIdentity vs CustomLdapIdentity - is it a bug

    Patrick Madden Newbie


      Rule based identity is defined as follows:

      @Install(precedence=FRAMEWORK, classDependencies="org.drools.WorkingMemory")
      public class RuleBasedIdentity extends Identity{...

      I want to define a new class as follows:

      // if com.foo.security.ldap.ActiveDirectorySupport is in the path
      // then we are using active directory. It should be a mini jar file put in
      // the path via the installer.
      public class ActiveDirectoryIdentity extends Identity{

      However, when I do so I get errors like this:

      jvm 1 | SEVERE: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      jvm 1 | java.lang.IllegalStateException: Two components with the same name and precedence: org.jboss.seam.security.identity
      jvm 1 | at org.jboss.seam.init.Initialization.addComponentDescriptor(Initialization.java:456)
      jvm 1 | at org.jboss.seam.init.Initialization.installScannedComponentAndRoles(Initialization.java:739)
      jvm 1 | at org.jboss.seam.init.Initialization.scanForComponents(Initialization.java:683)
      jvm 1 | at org.jboss.seam.init.Initialization.init(Initialization.java:536)
      jvm 1 | at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
      jvm 1 | at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
      jvm 1 | at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
      jvm 1 | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      jvm 1 | at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      jvm 1 | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      jvm 1 | at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      jvm 1 | at org.apache.catalina.startup.Embedded.start(Embedded.java:825)
      jvm 1 | at com.foo.bar.tomcat.EmbeddedTomcat.startTomcat(EmbeddedTomcat.java:238)

      Is this a bug or as designed?

      The reason I want to do this is because when I step in the debugger watching Microsoft Active Directory JAAS the roles are not that simple. I wanted to be able to catch and inspect them and possibly massage them.

      Either way, shouldn't the classDependencies be part of the unique key?

      Thanks in advance.