1 Reply Latest reply on Feb 9, 2011 6:49 AM by M P

    Issue when using seam 2.2.1 in Tomcats shared.loader

    Christoph Brill Newbie


      I've been using Seam 2.2.1 on a Tomcat 6. I placed the jars in a folder referenced in the shared.loader in catalina.properties. This works fine as long as I'm only running a single web-application using Seam on this Tomcat instance. Now I was bitten by the problem that I want to host a second seam-based application on the same instance. Both applications have a bean with the same name (e.g. '@Name(Action123)) but share nothing but the name and have completely different implementations. Now Seam seems to get confused and starts to inject the bean of application A to application B!

      In my case I can reproduce this behavior by deploying 2 seam applications and hot deploying one of them. This results in the quartz based scheduler of the second one to get the jobs injected of the first application (and this of course results in an exception).

      It looks like putting seam in the shared loader causes the find bean by name-registry to be global for all seam applications. I also happened to see the issue described in https://issues.jboss.org/browse/JBSEAM-4577 which might be caused by the same problem.

      Anyone else seeing this problem?


        • 1. Re: Issue when using seam 2.2.1 in Tomcats shared.loader
          M P Newbie

          Same here.

          During application startup, a component named scheduleController starts the jobs by calling an @Asynchronous method on component c1.
          The other application uses another component named c1 for completely different purposes, it even isn't a job.
          Now after redeploying the second application when Quartz want's to start the job of the first application, we get a NoSuchMethodException as the c1 of the second app is injected in the scheduler of the first app.
          There seems to be some serious flaws either in our design or in seam or in tomcat in conjunction with seam...
          Any help would be appreciated.