[jboss-user] [JBoss Seam] - Exceptions ending conversations
alessandrolt
do-not-reply at jboss.com
Tue Jan 15 08:36:56 EST 2008
Hi !
I'm using exception handling (by annotation and / or pages.xml) of Seam, but when an exception is launched, the classes that are in long-running conversation are discarded.
Why this happens?
|
| /*
| * Exception class
| */
| @Redirect(viewId="/module/anypage.xhtml", message="Unexpected error")
| public class NoSelectionException extends RuntimeException{
|
|
| private static final String MESSAGE = "Nenhum dado foi selecionado";
| private String keyDefault = "error.nenhumDadoSelecionado";
|
| private ArrayList keys = new ArrayList();
|
|
| public NoSelectionException ()
| {
| super(MESSAGE);
|
| }
|
| //more codes
| ....
|
|
|
| /*
| * Service class
| */
|
| @Name("paService")
| @AutoCreate
| public class PaService {
|
| public String delete(List<Pa> pasSelecteds) {
|
| if (pasSelecteds == null || pasSelecteds.size() == 0)
| throw new NoSelectionException();
|
| paRepository.removePas(pasSelecteds);
|
| return "exibir";
| }
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4120074#4120074
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4120074
More information about the jboss-user
mailing list