What is the need exactly ? Beeing able to scope a component to a Session?
If so it is now possible to define a scope to a component thanks to
https://jira.exoplatform.org/browse/KER-258. Out of the box, the kernel
supports the scope Singleton, ApplicationScoped and Dependent. By adding
some configuration you can extend the list to SessionScoped and
RequestScoped. Here is the configuration to add if you want both:
<component>
<key>org.exoplatform.container.context.ContextManager</key>
<type>org.exoplatform.container.context.ContextManagerImpl</type>
<component-plugins>
<component-plugin>
<name>main-scopes</name>
<set-method>addContexts</set-method>
<type>org.exoplatform.container.context.ContextPlugin</type>
<init-params>
<object-param>
<name>request-scope</name>
<object type="org.exoplatform.container.context.RequestContext"/>
</object-param>
<object-param>
<name>session-scope</name>
<object type="org.exoplatform.container.context.SessionContext"/>
</object-param>
</init-params>
</component-plugin>
</component-plugins>
</component>
Please note that the components that you want to scope to SessionScoped or
RequestScoped must be proxyable as they are normal scopes (which means that
you will access to the methods through a proxy and you must not access to
the fields directly), moreover components that you want to scope to
SessionScoped must be Serializable as SessionScoped is a passivating scope.
Please also note that thanks to KER-252 you can use the annotations defined
in JSR 330 such as Inject
On Thu, Nov 28, 2013 at 3:36 PM, Lucas Ponce <lponce(a)redhat.com> wrote:
Hello,
There is a issue in current master that is impacting to REST management
services in GateIn.
https://issues.jboss.org/browse/GTNPORTAL-3308
Investigating it looks like that issue appears since migration to
2.6.0-Alpha3 core.
Main symptom is a NPE in POMSessionManager class:
https://github.com/gatein/gatein-portal/blob/428874e25ee9e6dada3fd1a54a4a...
One of the changes of 2.6.0-Alpha3 is to drop the SessionManagerContainer
interface from PortalContainer.
Is there a workaround to access to same functionality in order to fix this
issue ?
Thanks in advance,
Lucas
_______________________________________________
gatein-dev mailing list
gatein-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/gatein-dev