2 Replies Latest reply on Jun 8, 2009 7:53 PM by Norman Richards

    How does Seam scan for its components?

    Sean Wu Newbie

      Hi all,


        I hope to write some customized components to be shared by all of my Seam projects and make them as built-in components. Say, I package them as a customized-seam.jar. In my other Seam projects(EAR jar) I reference this jar file.




      myproject.ear
                |_ lib
                     |_ customized-seam.jar
                |_ jboss-seam.jar
                |_ myprojectejb.jar
                |_ myprojectweb.war





      But this design does not work.


      The other ideas are:
      1. bundle the customized-seam.jar into jboss-seam.jar
      2. put it under myprojectweb/WEB-INF/lib
      3. put it under the myproject.ear like jboss-seam.jar and declare it as an EAR module


      My questions are:


      1. why does Seam not scan the .ear/lib directory? I check the Seam's Initialization class and find warClassDirectory, warLibDirectory, hotDeployDirectory, warRoot, etc except earLibDiretory


      2. Is it possible to let Seam scan components under .ear/lib directory and how?
      3. What is the best practice for this situation? BTW, I found a Seam extension project called XSeam and users have to put its jar under WEB-INF/lib directory but I hope I can put it under ear project's lib directory.


      Thanks a lot!