[
https://issues.jboss.org/browse/CDI-616?page=com.atlassian.jira.plugin.sy...
]
Mark Struberg commented on CDI-616:
-----------------------------------
Do nothing but add clarification in the spec : Injection in transient
field is not supported.
We probably are talking about thesame thing, but the wording is not quite as discussed on
the ML as far as I interpret it.
Why should the injection itself not be supported? I think what we agreed on is that we
just don't do anything for RE-injecting it in case of deserialisation.
At least that was I understood during our discussion. Not sure we need to clarify anything
as this is standard Java behaviour: the developer is responsible to get back any transient
fields himself by default.
Injection point declared as transient is not useful
---------------------------------------------------
Key: CDI-616
URL:
https://issues.jboss.org/browse/CDI-616
Project: CDI Specification Issues
Issue Type: Clarification
Components: Concepts
Affects Versions: 1.2.Final
Environment: n/a
Reporter: Emily Jiang
Priority: Minor
Fix For: 2.0 .Final
An injection point declared as 'transient' is not useful, due to the fact of
after bean's passivation, the transient field will not be reinjected and its value
will be lost. This causes confusion. See Weld forum discussion [link
title|https://developer.jboss.org/thread/179486]. In the section 5.5.7, how about to make
the following changes?
The isTransient() method returns true if the injection point is a transient field, and
false otherwise. If the injection point represents a dynamically obtained instance then
the
isTransient() method returns true if the Instance injection point is a transient field,
and
false otherwise.
=>
The isTransient() method returns true if the injection point is a transient field, and
false otherwise. If the injection point represents a dynamically obtained instance then
the
isTransient() method returns true if the Instance injection point is a transient field,
and
false otherwise. If this injection point is declared as transient, after bean's
passivation, the value will not be restored. Instance injection point is the preferred
approach.
Any other better suggestions?
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)