0 Replies Latest reply on Aug 18, 2009 5:25 PM by Robert Shanahan

    utility jars and seam component overrides

    Robert Shanahan Newbie

      JDK 1.6,
      JBoss 5.1.0,
      Seam 2.2.0

      I have an ear project, currently with a single war. I have a utility module/jar with a class that overrides the Spring context loader as follows:

      @Install(precedence = Install.APPLICATION)
      public class SeamContextLoader

      I have the following in my components.xml:


      If the custom context loader is deployed within my utility jar it never supersedes the built in, regardless of whether the utility jar is deployed to EAR/lib or WAR/WEB-INF/lib. The only way it works is if I move the custom context loader class to the WAR project and hence deploy it to WAR/WEB-INF/classes. Furthermore, adding class specification to spring:context-loader has the effect of skipping Spring context loading.

      <spring:context-loader class='com.xyz.web.util.SeamContextLoader">

      Obviously I'd prefer not to replicate my custom context loader for every webapp. Does this require special classloader config? Would appreciate some insight on how best to manage overriding components.