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:
I appreciate any kind of help!
Greetings
Felix