0 Replies Latest reply on Jul 31, 2009 11:49 AM by I need a real name

    JBoss Portal, Seam and PortletScope

    I need a real name Newbie

      Hey guys,


      I tried to define the @PortletScope(ScopeType.APPLICATION_SCOPE) to a component, but unfortunately everytime I access (page refresh) the bean from a jsf, a new object is created.


      DemoBean.java


      @Name("demo")
      @Scope(SESSION)
      @PortletScope(ScopeType.APPLICATION_SCOPE)
      public class DemoBean {
           
           @Logger
           private Log log; 
           
           @Create
           public void init() {
                log.info("new object"); 
           }
                
           public String getName() {
                return "some name";
           }
           
      }





      Console Output:



      ...
      11:35:52,361 INFO  [Component] Component: demo, scope: SESSION, type: JAVA_BEAN, class: com.whatever.beans.DemoBean
      ...
      11:36:05,533 INFO  [DemoBean] new object
      11:36:07,173 INFO  [DemoBean] new object
      ...
      



      Somebody got an idea why this happens? And when will be there injeciton support?


      Injection Example:
      @In(scope=PortletScopeType.APPLICATION_SCOPE)



      My setup:



      • JBoss Portal 2.7

      • Seam 2.1.2.CR1

      • PortletBridge 1.0.0.CR2

      • Richfaces 3.3.1.CR2




      I appreciate any kind of help!


      Greetings
      Felix