Hi Julien,
Thanks for responding so quickly.
Comments inline.
Ken
----- Original Message -----
From: "Julien Viet" <julien(a)julienviet.com>
To: "Ken Finnigan" <kfinniga(a)redhat.com>
Cc: gatein-dev(a)lists.jboss.org
Sent: Tuesday, February 26, 2013 5:34:44 AM
Subject: Re: [gatein-dev] CDI Support in GateIn
1/ @PortletLifecycleScoped and @PortletRedisplayScoped :
It seems similar with the
javax.portlet.actionScopedRequestAttributes
container runtime options, i.e a portlet using @SessionScoped and
enabling the scoped request attributes would provide a similar
behavior.
Why should add a non spec compliant feature to do something similar ?
I may be mistaken, but from looking at the code of gatein-pc, if I was to
set javax.portlet.actionScopedRequestAttributes to true in portlet.xml then
any CDI beans that I intended to work as @SessionScoped would no longer behave
that way, as they would be removed at the start of a new ActionRequest.
2/ managed object eventing :
In the proposal the event is sent by the portlet container impl
between the portlet instance creation and the initialization of the
portlet.
Such event should instead be managed by the context around the
portlet container impl (i.e the LifeCycle object).
This is due to the fact that there is only one step in the current
life cycle.
To better solve this problem, we need to break down the life cycle
into two phases : create/start and stop/destroy with a new event
sent.
So you are suggesting modifying PortletContainerObject to have a create() in
addition to start()?
And then PortletContainerLifeCycle.invokeStart() is modified to call
portletContainer.create() and then portletContainer.start()? With a call
to fire an event in between?
That can work, I didn't think of that as I was seeing if ManagedObject needed
to have managedStart() split, but I couldn't see how that would work.
Would the event I created as part of the spec be sufficient?
This way the CDI listener can properly operate on the portlet
instance between the created and the started phase.
On Feb 22, 2013, at 10:23 PM, Ken Finnigan < kfinniga(a)redhat.com
>
wrote:
> All,
> I've put together a specification on adding support for CDI
in non
> JSF portlets in GateIn, and for adding some new CDI scopes catered
> to portlet lifecyles ->
>
https://community.jboss.org/wiki/CDISupportInGateInPC
> Feedback and comments welcome.
> Regards
> Ken
> ========================
> Senior Software Engineer / JBoss Enterprise Middleware Red Hat,
> Inc.
> _______________________________________________
> gatein-dev mailing list
> gatein-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/gatein-dev