In a CDI Passivation Capable bean, is it possible to have non-passivation capable dependencies be re-injected rather than passivated?
Consider this code:
@SessionScoped
public class UserData implements Serializable {
@Inject
private Logger log;
private String data;
}
@ApplicationScoped
public class LoggerFactory {
@Produces
public Logger getLogger(){
...
}
}
public class Logger {
...
}
So Logger
is not Serializable
, but I really don't care. When UserData
is deserialized, is it possible to have the producer for Logger
called again somehow?
EDIT
The original discussion started here:
http://www.cdi-spec.org/news/2015/07/03/CDI-2_0-EDR1-released/#comment-2119769909
Hoping the CDI Expert group comes up with a better way than @Instance