Hi

It seems to be the behavior is different between container implementations.

I tested it on jetty and two @PreDestroy are sent. I think it is more a
design flaw
due to inconsistent behavior between different container implementations of
servlet spec.

What do to in this case? At first view, I think we require a specific SPI
interface
that deals with this stuff, just like LifecycleProvider implementation, that
checks
between different container.

Suggestions are welcome.

regards,

Leonardo Uribe

2011/4/4 Curtiss Howard <[email protected]>

> Hi,
>
> I'm having a hard time following the rationale behind MYFACES-3040.  I
> think someone was concerned about @PreDestroy getting called twice if
> the session was invalidated?
>
> The solution, however, was to eliminate invoking @PreDestroy when the
> session is destroyed ALTOGETHER.  This is an entirely incorrect
> solution to the problem.  Just make a simple session-scoped bean and
> observe how @PreDestroy doesn't get invoked _at all_ when the app is
> stopped!  Running the same test in Glassfish would quickly show the
> MyFaces behavior to be incorrect.  I think the change needs to be
> reverted and some other solution to the original problem should be
> devised.  Thoughts?
>
> Thanks,
>
>
> Curtiss Howard
>

Reply via email to