Are you really sure that your detachablemodels are being used all over?
Java Programmer wrote:
On Wed, Apr 2, 2008 at 11:15 AM, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote:
from JPA experience, eager loading of List of Entities is part of what hogs
memory. I have profiles an application before that the memory usage just
kept growing each time my page reference a particular entity that eager
loads other collection of entities. As soon as I removed the eager load
annotation, my memory usage became quite stable.
Thanks but we tried also with LAZY
@Entity
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Category implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
private String name;
private String description;
@Enumerated(value = EnumType.STRING)
private CategoryStatus categoryStatus;
@ManyToOne(fetch=FetchType.LAZY)
@JoinColumn(name="parent_id", insertable=false, updatable=false,
nullable=true)
@Cascade(org.hibernate.annotations.CascadeType.ALL)
@Fetch(value=FetchMode.SELECT)
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
private Category parent;
@OneToMany(fetch=FetchType.LAZY)
@JoinColumn(name="parent_id")
@Cascade(org.hibernate.annotations.CascadeType.ALL)
@IndexColumn(name="list_id")
@Fetch(value=FetchMode.SELECT)
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
private List<Category> children = new ArrayList<Category> ();
@Index(name = "categoryPathIndex")
private String categoryPath = "";
....
}
and OpenSessionInView in webxml:
<filter>
<filter-name>OpenSessionInViewFilter</filter-name>
<filter-class>com.test.CarPartsOpenSessionInViewFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>OpenSessionInViewFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
but the results were quite same - large sesion file each request took
about 100kB more in size, I tried also versioning compontent to false:
categoryTreePanel = new CategoryTreePanel(CATEGORIES,
categoryDAO.getRootCategories(), category);
categoryTreePanel.setVersioned(false);
nothing happens ... we are quite afraid of this behaviour ...
Regards,
Adr
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]