1 Reply Latest reply on Sep 30, 2010 11:07 AM by pushpak1981

    Seam Deployment Annotations

    pushpak1981 Novice

      Hi All,


      I wanted to configure my custom annotations in seam. I have made an entry into seam-deployment.properties for my annotation. But I am not able to get the count of the annotations.


      I tried with the method mentioned on the following link.
      http://docs.jboss.org/seam/2.2.0.GA/en-US/html/configuration.html (28.10. Deploying custom resources)


      I have placed my seam-deployment.properties in test.jar folder. Is this the correct path ?


      Any help would be highly appreciated.


      Thanks.

        • 1. Re: Seam Deployment Annotations
          pushpak1981 Novice

          Hi,


          I was able to load the my custom annotations by using the method mentioned in seam documentation. I have used the following class:




          @Name("fooStartup")
          @Scope(APPLICATION)
          @Startup
          public class FooStartup {
          
             @In("#{deploymentStrategy.annotatedClasses['com.acme.Foo']}")
             private Set<Class<Object>> fooClasses;
             
             @In("#{hotDeploymentStrategy.annotatedClasses['com.acme.Foo']}")
             private Set<Class<Object>> hotFooClasses;
          
             @Create
             public void create() {
                for (Class clazz : fooClasses) {
                   handleClass(clazz);
                }
                for (Class clazz : hotFooClasses) {
                   handleClass(clazz);
                }
             }
          
          }





          I have some queries:


          1. I have added one class with custom annotation during the hot deployment then will that new class be present into the List ?


          2. Does this component needs to loaded at startup or else i can access it from other component as well without the application scope ?


          Any help would be highly appreciated.


          Thanks.