2 Replies Latest reply on Apr 21, 2010 5:07 PM by Alexandru Ioan Cucu

    bean instantiated every time, thow it has @Scope(ScopeType.APPLICATION)

    Alexandru  Ioan Cucu Newbie

      Hello,


      I have a bean that I want to use a singletone. I place it in application scope, but I notice that it gets instantiated over and over again.




      @Name("fileUploader")
      public class FileUploader {
      
              // TODO use Seam DI
              @In(scope=ScopeType.APPLICATION)
              private ResourceLocator resourceLocator = new ResourceLocatorImpl();
      }
      
      @Name("resourceLocator")
      @Scope(ScopeType.APPLICATION)
      public class ResourceLocatorImpl implements ResourceLocator {
      }



      So, in the previous example, resourceLocator is instantiated each time :)


      Thank you in advance