  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | - The method destroy is called twice | - The method destroy is called twice 2007-08-13 - By deved
Back Hi all. I have this: TableModel.java
| @(protected)("tableModel") | @(protected) | @(protected)(ScopeType.CONVERSATION) | public class TableModel { | | @(protected) | private EntityManager em; | | private List data; | | @(protected) | public void begin(Class entityClass) { | data = query(entityClass); | } | | @(protected) | public void clean() { | data.clear(); | data = null; | } | | public List getData() { | return data; | } | | private List query(Class entityClass) { | .... | } | } | MenuManager.java
| @(protected)("menuManager") | @(protected)(ScopeType.SESSION) | public class MenuManager{ | | private TableModel tableModel; | | public String redirect() { | if(tableModel != null) { | tableModel.clean(); | } | tableModel = (TableModel) Component.getInstance("tableModel", ScopeType.CONVERSATION); | tabelModel.begin(SomeEntity.class); | } | } | When I call "tableModel.clean()" the field "data" on TableModel is null. Then when the session is ended or the conversation timeout expire the method is called again, this is right? Any help, thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic &p=4073742#4073742
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode =reply&p=4073742 __ ____ ____ ____ ____ ____ ____ ____ ____ ____ jboss-user mailing list jboss-user@(protected) https://lists.jboss.org/mailman/listinfo/jboss-user
|
|
 |