The following code is working fine for me:
import java.io.Serializable;
import java.util.logging.Logger;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
@ManagedBean
@ViewScoped
public class ViewWatcher implements Serializable {
long serialVersionUID = 0L;
volatile Logger log = Logger.getLogger("viewwatcher");
String hello = "Hello";
@PostConstruct
public void init() {
log.severe("starting view");
}
@PreDestroy
public void finish() {
log.severe("finishing view");
}
}
With a series of pages that include #{viewWatcher.hello}
So - what ever is going on in your code, @PreDestroy is being called at the right time.
[Message sent by forum member 'driscoll' (jim.driscoll_at_sun.com)]
http://forums.java.net/jive/thread.jspa?messageID=367148