Re: [Wicket-user] list view sorting consuming all heap space

2005-09-26 Thread Phil Kulak
Are you using a model now and doing the lookup there? If you just
downloaded the new code and didn't change you code to use the new API,
nothing will change. I made it all backwards compatible.


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] list view sorting consuming all heap space

2005-09-26 Thread Nathan Hamblen
Everyone, thanks for the help. I finally found the problem by debugging 
into componentModelChanging as several people had urged me to do. The 
memory hog was an object I had in the data provider, which was a member 
class of my Page class. I wasn't using the page in it, but it still had 
compiler generated references to the page object. Therefore, it was huge.


Seems like a pretty easy trap to fall into; if a view object sneaks into 
a model somehow, your session is headed for disaster. Wouldn't that mean 
you can never have an anonymous subclass of Model in any kind of 
Component? I feel like I've seen that all over the place.


Nathan

Phil Kulak wrote:

Are you using a model now and doing the lookup there? If you just
downloaded the new code and didn't change you code to use the new API,
nothing will change. I made it all backwards compatible.


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


  



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] list view sorting consuming all heap space

2005-09-26 Thread Johan Compagner
I had this discussion with jonathan also, Just to warn you all:
BEWARE if you use non static innerclasses you ALWAYS have a reference to the outerclass.
Anonymous .are always non static so you always have a reference to youre parent class.


johanOn 9/27/05, Nathan Hamblen [EMAIL PROTECTED] wrote:
Everyone, thanks for the help. I finally found the problem by debugginginto componentModelChanging as several people had urged me to do. Thememory hog was an object I had in the data provider, which was a member
class of my Page class. I wasn't using the page in it, but it still hadcompiler generated references to the page object. Therefore, it was huge.Seems like a pretty easy trap to fall into; if a view object sneaks into
a model somehow, your session is headed for disaster. Wouldn't that meanyou can never have an anonymous subclass of Model in any kind ofComponent? I feel like I've seen that all over the place.Nathan
Phil Kulak wrote: Are you using a model now and doing the lookup there? If you just downloaded the new code and didn't change you code to use the new API, nothing will change. I made it all backwards compatible.
 --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php ___ Wicket-user mailing list
 Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] list view sorting consuming all heap space

2005-09-26 Thread Phil Kulak
I guess if you subclass model, you have to make sure you turn of
versioning on the component. I neverthought of that before. That's a
tricky one.

On 9/26/05, Johan Compagner [EMAIL PROTECTED] wrote:
 I had this  discussion with jonathan also, Just to warn you all:
  BEWARE if you use non static innerclasses you ALWAYS have a reference to
 the outerclass.
  Anonymous .are always non static so you always have a reference to youre
 parent class.


  johan


 On 9/27/05, Nathan Hamblen [EMAIL PROTECTED] wrote:
  Everyone, thanks for the help. I finally found the problem by debugging
  into componentModelChanging as several people had urged me to do. The
  memory hog was an object I had in the data provider, which was a member
  class of my Page class. I wasn't using the page in it, but it still had
  compiler generated references to the page object. Therefore, it was huge.
 
  Seems like a pretty easy trap to fall into; if a view object sneaks into
  a model somehow, your session is headed for disaster. Wouldn't that mean
  you can never have an anonymous subclass of Model in any kind of
  Component? I feel like I've seen that all over the place.
 
  Nathan
 
  Phil Kulak wrote:
   Are you using a model now and doing the lookup there? If you just
   downloaded the new code and didn't change you code to use the new API,
   nothing will change. I made it all backwards compatible.
  
  
   ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server.
 Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] list view sorting consuming all heap space

2005-09-22 Thread Nathan Hamblen




I did eventually update to the detaching HibernateDataProvider, but
still ran out of heap space. That one object wouldn't have amounted to
enough memory anyway. Somewhere, something recursive is broken.
Clicking through the sort header, response times get noticeably slower
with each request until it crashes. I'm sorry that I won't be able work
on it anymore this week. 

If no one has confirmed that DataView sorting works properly and
indefinitely with HibernateDataProvider, it would be a good project.
Wicket can't really take off until there's an easy, standard way to
view and sort hibernate query results.

Nathan

Igor Vaynberg wrote:

  
  


  
  
  
  Need to wait
for sf.net to sync the
developer cvs with the public cvs. Sometimes takes up to 6 hours.
  -Igor
   
   
  
  
  
  
  From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Nathan Hamblen
  Sent: Tuesday,
September 20, 2005
11:35 AM
  To: wicket-user@lists.sourceforge.net
  Subject: Re:
[Wicket-user] list
view sorting consuming all heap space
  
   
  Ok, that change is going into
cvs? I don't see any new
constructors yet.
  
(I titled my first message "list view" because I had the same problem
with contrib.data's OrderedPageableList. No one's talking about that
one
though.)
  
Nathan
  
Phil Kulak wrote: 
  Sorry about that. I totally spaced this thread because it was called
  "list view". Anyway, I added constructors to HibernateDataProvider and
  HibernateModel that take IModels for the IHibernateDao for the case
  when you want to do a lookup. For example:
   
  IModel lookup = new Model() {
     public Object getObject(Component component) {
    // Do some Spring lookup stuff here and get an IHibernateDao...
     }
  }
   
  new HibernateDataProvider(lookup) {
     // Define abstract methods...
  }
   
  
  





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] list view sorting consuming all heap space

2005-09-22 Thread Igor Vaynberg








Doesnt the CDApp example do this already?

-igor















From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nathan Hamblen
Sent: Thursday, September 22, 2005
8:55 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] list
view sorting consuming all heap space





I did eventually update to the detaching
HibernateDataProvider, but still ran out of heap space. That one object
wouldn't have amounted to enough memory anyway. Somewhere, something recursive
is broken. Clicking through the sort header, response times get noticeably
slower with each request until it crashes. I'm sorry that I won't be able work
on it anymore this week. 

If no one has confirmed that DataView sorting works properly and indefinitely
with HibernateDataProvider, it would be a good project. Wicket can't really
take off until there's an easy, standard way to view and sort hibernate query
results.

Nathan

Igor Vaynberg wrote: 

Need to wait for sf.net to sync the
developer cvs with the public cvs. Sometimes takes up to 6 hours.

-Igor















From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Nathan Hamblen
Sent: Tuesday, September 20, 2005
11:35 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] list
view sorting consuming all heap space







Ok, that change is going into cvs? I don't see any new
constructors yet.

(I titled my first message list view because I had the same problem
with contrib.data's OrderedPageableList. No one's talking about that one
though.)

Nathan

Phil Kulak wrote: 

Sorry about that. I totally spaced this thread because it was calledlist view. Anyway, I added constructors to HibernateDataProvider andHibernateModel that take IModels for the IHibernateDao for the casewhen you want to do a lookup. For example:IModel lookup = new Model() { public Object getObject(Component component) { // Do some Spring lookup stuff here and get an IHibernateDao... }}new HibernateDataProvider(lookup) { // Define abstract methods...}








---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Re: [Wicket-user] list view sorting consuming all heap space

2005-09-20 Thread Johan Compagner
if that getDelegate() method is a bit heavy
then you could store that one in a transient field
And also set that field to null on detach.
On 9/20/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
Quick fix to your problem follows, try it and tell us if that solves it:IDataProvider dp=new IDataProvider() {Private IDataProvider getDelegate() {Return((AdminApplication)Application.getApplication()).getSpringContext().getBean(
adminComp onentDao)); }Public iterator() { getDelegate().iterator(...) }Public size() { return getDelegate().size(); }Public model(...) { return getDelegate().model(...); }
}DataView articles = new ArticleDataView(articles, dp);-Igor -Original Message- From: [EMAIL PROTECTED]
 [mailto:wicket-user- [EMAIL PROTECTED]] On Behalf Of Nathan Hamblen Sent: Monday, September 19, 2005 1:46 PM
 To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] list view sorting consuming all heap space This is it: ---
 DataView articles = new ArticleDataView(articles, (IHibernateDao) ((AdminApplication)getApplication()).getSpringContext().getBean(adminComp onentDao)); add(articles);
 add(new OrderByBorder(orderByName, subtitle, articles)); add(new OrderByBorder(orderByMailDate, schedule.sendTime, articles)); add(new PagingNavigator(navigator, articles));
 --- Nathan Igor Vaynberg wrote:   Is it possible you are creating a link by referencing a final variable  inside the sorting header? Are you using by OrderByLink or
 OrderByBorder? -Igor   
   *From:* [EMAIL PROTECTED]  [mailto:[EMAIL PROTECTED]
] *On Behalf Of *Nathan  Hamblen  *Sent:* Monday, September 19, 2005 10:05 AM  *To:* wicket-user@lists.sourceforge.net  *Subject:* Re: [Wicket-user] list view sorting consuming all heap space
 When I turn off page versioning, the problem goes away. I'm not  holding on to any big objects though, as far as I can tell. There are  some ExternalLink components in the list which aren't detachable, but
  I don't see that using all my java heap space.   There are other controls on the page which affect the query. I can  toggle them up through version 33 without any problem; it's only the
  sorting that gobbles up memory until it crashes.   Nathan   Johan Compagner wrote:   In this case are you sure that a model detaches right?
  (all objects are cleared and only the query string/sort params) are  stored?  Because if could be that all previous attempts where recorded by the  versioning managment for the back button
  If you do page.setVersioned(false)   does it happen then?   On 9/19/05, *Dipu* [EMAIL PROTECTED] mailto:
[EMAIL PROTECTED]  wrote:   I have come across this problem with the sorting header some time back.  - Original Message -  From: Nathan Hamblen 
[EMAIL PROTECTED]  mailto:[EMAIL PROTECTED]  To:  
wicket-user@lists.sourceforge.net  mailto:wicket-user@lists.sourceforge.net  Sent: Monday, September 19, 2005 1:00 AM  Subject: [Wicket-user] list view sorting consuming all heap space
I wonder if anyone else has had a problem running out of heap space   using contrib data and dataview. When I hook up a sorting header for   my hib3 result set, if I keep clicking the header repeatedly (as my
   boss is sure to do!) the page will take longer and longer to display,   until after about 10 clicks I get an out of memory error. The result   set is not large, about 30 rows, and in both data and dataview I
   tried to do things as prescribed. (I'm pretty sure my models are   detaching.) The code was very different for each one, so I was not   expecting to find the same problem both times.
 Most likely, I'm doing something wrong. No, I can't post the code   right this minute. But having looked through the archives and not   found anything, I just have to ask: is everyone else resorting their
   dataviews (or data driven listviews) 10 times straight without issue? Nathan---
  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.  Download  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php  ___  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net  mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user --- 
SF.Net email  is sponsored by: Tame your development challenges with Apache's  Geronimo App Server. Download it for free - -and be entered to win a  42 plasma tv or your very own Sony(tm)PSP. Click here to play:
  http://sourceforge.net/geronimo.php  ___ Wicket-user mailing  list 
Wicket-user@lists.sourceforge.net  https://lists.sourceforge.net/lists/listinfo/wicket-user

Re: [Wicket-user] list view sorting consuming all heap space

2005-09-20 Thread Nathan Hamblen




I don't see how that code would work, as my bean isn't an instance of
IDataProvider; it's an IHibernateDao. Is there an example somewhere of
how DataView works with hibernate in such a way that the data provider
isn't entirely serialized? At the moment I'm trying to wrap my
HibernateDataProvider in a detachable model, which is harder than it
seems like this should be. Perhaps I'm not even supposed to be using a
HibernateDataProvider.

Nathan

Igor Vaynberg wrote:

  Quick fix to your problem follows, try it and tell us if that solves it:

IDataProvider dp=new IDataProvider() {
  Private IDataProvider getDelegate() {
Return
((AdminApplication)Application.getApplication()).getSpringContext().getBean(
"adminComp
  
  
onentDao")); }

  
  
  Public iterator() { getDelegate().iterator(...) }
  Public size() { return getDelegate().size(); }
  Public model(...) { return getDelegate().model(...); }
}

DataView articles = new ArticleDataView("articles", dp);

-Igor


  
  
-Original Message-
From: [EMAIL PROTECTED] [mailto:wicket-user-
[EMAIL PROTECTED]] On Behalf Of Nathan Hamblen
Sent: Monday, September 19, 2005 1:46 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] list view sorting consuming all heap space

This is it:
---
DataView articles = new ArticleDataView("articles", (IHibernateDao)

((AdminApplication)getApplication()).getSpringContext().getBean("adminComp
onentDao"));

add(articles);
add(new OrderByBorder("orderByName", "subtitle", articles));
add(new OrderByBorder("orderByMailDate", "schedule.sendTime", articles));
add(new PagingNavigator("navigator", articles));
---

Nathan

Igor Vaynberg wrote:


  Is it possible you are creating a link by referencing a final variable
inside the sorting header? Are you using by OrderByLink or
  

OrderByBorder?


  

-Igor







*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] *On Behalf Of *Nathan
Hamblen
*Sent:* Monday, September 19, 2005 10:05 AM
*To:* wicket-user@lists.sourceforge.net
*Subject:* Re: [Wicket-user] list view sorting consuming all heap space



When I turn off page versioning, the problem goes away. I'm not
holding on to any big objects though, as far as I can tell. There are
some ExternalLink components in the list which aren't detachable, but
I don't see that using all my java heap space.

There are other controls on the page which affect the query. I can
toggle them up through version 33 without any problem; it's only the
sorting that gobbles up memory until it crashes.

Nathan

Johan Compagner wrote:

In this case are you sure that a model detaches right?
(all objects are cleared and only the query string/sort params) are
stored?
Because if could be that all previous attempts where recorded by the
versioning managment for the back button
If you do page.setVersioned(false)

does it happen then?

On 9/19/05, *Dipu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:

I have come across this problem with the sorting header some time back.
- Original Message -
From: "Nathan Hamblen" [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
To:  wicket-user@lists.sourceforge.net
mailto:wicket-user@lists.sourceforge.net
Sent: Monday, September 19, 2005 1:00 AM
Subject: [Wicket-user] list view sorting consuming all heap space


  
  
I wonder if anyone else has had a problem running out of heap space
using contrib data and dataview. When I hook up a sorting header for
my hib3 result set, if I keep clicking the header repeatedly (as my
boss is sure to do!) the page will take longer and longer to display,
until after about 10 clicks I get an out of memory error. The result
set is not large, about 30 rows, and in both data and dataview I
tried to do things as prescribed. (I'm pretty sure my models are
detaching.) The code was very different for each one, so I was not
expecting to find the same problem both times.

Most likely, I'm doing something wrong. No, I can't post the code
right this minute. But having looked through the archives and not
found anything, I just have to ask: is everyone else resorting their
dataviews (or data driven listviews) 10 times straight without issue?

Nathan

  
  
---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



--- S

RE: [Wicket-user] list view sorting consuming all heap space

2005-09-20 Thread Igor Vaynberg








Ahh, I see. Didnt notice you were using
a subclass of the dataview. Either way, though, the exact same problem remains
because the HibernateDataProvider stores the instance of ihibernatedao you
retrieve  very bad! The HibernateDataProvider should be using the same
kind of decoration that I provided below for the IDataProvider  where the
location logic for locating the underlying dao is moved into the decorator.



-Igor















From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nathan Hamblen
Sent: Tuesday, September 20, 2005
8:23 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] list
view sorting consuming all heap space





I don't see how that code would work, as my bean isn't
an instance of IDataProvider; it's an IHibernateDao. Is there an example
somewhere of how DataView works with hibernate in such a way that the data
provider isn't entirely serialized? At the moment I'm trying to wrap my
HibernateDataProvider in a detachable model, which is harder than it seems like
this should be. Perhaps I'm not even supposed to be using a
HibernateDataProvider.

Nathan

Igor Vaynberg wrote: 

Quick fix to your problem follows, try it and tell us if that solves it:IDataProvider dp=new IDataProvider() { Private IDataProvider getDelegate() { Return((AdminApplication)Application.getApplication()).getSpringContext().getBean(adminComp 

onentDao)); } 

 Public iterator() { getDelegate().iterator(...) } Public size() { return getDelegate().size(); } Public model(...) { return getDelegate().model(...); }}DataView articles = new ArticleDataView(articles, dp);-Igor 

-Original Message-From: [EMAIL PROTECTED] [mailto:wicket-user-[EMAIL PROTECTED]] On Behalf Of Nathan HamblenSent: Monday, September 19, 2005 1:46 PMTo: wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] list view sorting consuming all heap spaceThis is it:---DataView articles = new ArticleDataView(articles, (IHibernateDao)((AdminApplication)getApplication()).getSpringContext().getBean(adminComponentDao));add(articles);add(new OrderByBorder(orderByName, subtitle, articles));add(new OrderByBorder(orderByMailDate, schedule.sendTime, articles));add(new PagingNavigator(navigator, articles));---NathanIgor Vaynberg wrote: 

Is it possible you are creating a link by referencing a final variableinside the sorting header? Are you using by OrderByLink or 

OrderByBorder? 

-Igor*From:* [EMAIL PROTECTED][mailto:[EMAIL PROTECTED]] *On Behalf Of *NathanHamblen*Sent:* Monday, September 19, 2005 10:05 AM*To:* wicket-user@lists.sourceforge.net*Subject:* Re: [Wicket-user] list view sorting consuming all heap spaceWhen I turn off page versioning, the problem goes away. I'm notholding on to any big objects though, as far as I can tell. There aresome ExternalLink components in the list which aren't detachable, butI don't see that using all my java heap space.There are other controls on the page which affect the query. I cantoggle them up through version 33 without any problem; it's only thesorting that gobbles up memory until it crashes.NathanJohan Compagner wrote:In this case are you sure that a model detaches right?(all objects are cleared and only the query string/sort params) arestored?Because if could be that all previous attempts where recorded by theversioning managment for the back buttonIf you do page.setVersioned(false)does it happen then?On 9/19/05, *Dipu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]wrote:I have come across this problem with the sorting header some time back.- Original Message -From: Nathan Hamblen [EMAIL PROTECTED]mailto:[EMAIL PROTECTED]To:  wicket-user@lists.sourceforge.netmailto:wicket-user@lists.sourceforge.netSent: Monday, September 19, 2005 1:00 AMSubject: [Wicket-user] list view sorting consuming all heap space 

I wonder if anyone else has had a problem running out of heap spaceusing contrib data and dataview. When I hook up a sorting header formy hib3 result set, if I keep clicking the header repeatedly (as myboss is sure to do!) the page will take longer and longer to display,until after about 10 clicks I get an out of memory error. The resultset is not large, about 30 rows, and in both data and dataview Itried to do things as prescribed. (I'm pretty sure my models aredetaching.) The code was very different for each one, so I was notexpecting to find the same problem both times.Most likely, I'm doing something wrong. No, I can't post the coderight this minute. But having looked through the archives and notfound anything, I just have to ask: is everyone else resorting theirdataviews (or data driven listviews) 10 times straight without issue?Nathan 

---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server.Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP. Click

Re: [Wicket-user] list view sorting consuming all heap space

2005-09-20 Thread Phil Kulak
Sorry about that. I totally spaced this thread because it was called
list view. Anyway, I added constructors to HibernateDataProvider and
HibernateModel that take IModels for the IHibernateDao for the case
when you want to do a lookup. For example:

IModel lookup = new Model() {
   public Object getObject(Component component) {
  // Do some Spring lookup stuff here and get an IHibernateDao...
   }
}

new HibernateDataProvider(lookup) {
   // Define abstract methods...
}

On 9/20/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
  
  
 
 Ahh, I see. Didn't notice you were using a subclass of the dataview. Either
 way, though, the exact same problem remains because the
 HibernateDataProvider stores the instance of ihibernatedao you retrieve –
 very bad! The HibernateDataProvider should be using the same kind of
 decoration that I provided below for the IDataProvider – where the location
 logic for locating the underlying dao is moved into the decorator. 
 
   
 
 -Igor 
 
   
 
   
  
  
  
  
 
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Nathan Hamblen
  Sent: Tuesday, September 20, 2005 8:23 AM
 
  To: wicket-user@lists.sourceforge.net
  Subject: Re: [Wicket-user] list view sorting consuming all heap space 
  
 
   
 
 I don't see how that code would work, as my bean isn't an instance of
 IDataProvider; it's an IHibernateDao. Is there an example somewhere of how
 DataView works with hibernate in such a way that the data provider isn't
 entirely serialized? At the moment I'm trying to wrap my
 HibernateDataProvider in a detachable model, which is harder than it seems
 like this should be. Perhaps I'm not even supposed to be using a
 HibernateDataProvider.
  
  Nathan
  
  Igor Vaynberg wrote: Quick fix to your problem follows, try it and tell us
 if that solves it:
  
 IDataProvider dp=new IDataProvider() {
   Private IDataProvider getDelegate() {
 Return
 ((AdminApplication)Application.getApplication()).getSpringContext().getBean(
 adminComp
   
  
 onentDao)); }
 
   
   Public iterator() { getDelegate().iterator(...) }
   Public size() { return getDelegate().size(); }
   Public model(...) { return getDelegate().model(...); }
 }
  
 DataView articles = new ArticleDataView(articles, dp);
  
 -Igor
  
  
   
  
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:wicket-user-
 [EMAIL PROTECTED] On Behalf Of Nathan Hamblen
 Sent: Monday, September 19, 2005 1:46 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] list view sorting consuming all heap space
  
 This is it:
 ---
 DataView articles = new ArticleDataView(articles, (IHibernateDao)
  
 ((AdminApplication)getApplication()).getSpringContext().getBean(adminComp
 onentDao));
  
 add(articles);
 add(new OrderByBorder(orderByName, subtitle, articles));
 add(new OrderByBorder(orderByMailDate,
 schedule.sendTime, articles));
 add(new PagingNavigator(navigator, articles));
 ---
  
 Nathan
  
 Igor Vaynberg wrote:
 
  
 Is it possible you are creating a link by referencing a final variable
 inside the sorting header? Are you using by OrderByLink or
   
  OrderByBorder?
 
  
  
  
 -Igor
  
  
  
  
  
 
  
 *From:* [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] *On Behalf
 Of *Nathan
 Hamblen
 *Sent:* Monday, September 19, 2005 10:05 AM
 *To:* wicket-user@lists.sourceforge.net
 *Subject:* Re: [Wicket-user] list view sorting consuming all heap space
  
  
  
 When I turn off page versioning, the problem goes away. I'm not
 holding on to any big objects though, as far as I can tell. There are
 some ExternalLink components in the list which aren't detachable, but
 I don't see that using all my java heap space.
  
 There are other controls on the page which affect the query. I can
 toggle them up through version 33 without any problem; it's only the
 sorting that gobbles up memory until it crashes.
  
 Nathan
  
 Johan Compagner wrote:
  
 In this case are you sure that a model detaches right?
 (all objects are cleared and only the query string/sort params) are
 stored?
 Because if could be that all previous attempts where recorded by the
 versioning managment for the back button
 If you do page.setVersioned(false)
  
 does it happen then?
  
 On 9/19/05, *Dipu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 wrote:
  
 I have come across this problem with the sorting header some time back.
 - Original Message -
 From: Nathan Hamblen [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 To:  wicket-user@lists.sourceforge.net
 mailto:wicket-user@lists.sourceforge.net
 Sent: Monday, September 19, 2005 1:00 AM
 Subject: [Wicket-user] list view sorting consuming all heap space
  
  
   
  
 I wonder if anyone else has had a problem running out of heap space
 using contrib data and dataview. When I hook up a sorting header for
 my hib3 result set, if I keep clicking the header repeatedly

Re: [Wicket-user] list view sorting consuming all heap space

2005-09-20 Thread Nathan Hamblen




Ok, that change is going into cvs? I don't see any new constructors yet.

(I titled my first message "list view" because I had the same problem
with contrib.data's OrderedPageableList. No one's talking about that
one though.)

Nathan

Phil Kulak wrote:

  Sorry about that. I totally spaced this thread because it was called
"list view". Anyway, I added constructors to HibernateDataProvider and
HibernateModel that take IModels for the IHibernateDao for the case
when you want to do a lookup. For example:

IModel lookup = new Model() {
   public Object getObject(Component component) {
  // Do some Spring lookup stuff here and get an IHibernateDao...
   }
}

new HibernateDataProvider(lookup) {
   // Define abstract methods...
}

On 9/20/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
  
  
 
 

Ahh, I see. Didn't notice you were using a subclass of the dataview. Either
way, though, the exact same problem remains because the
HibernateDataProvider stores the instance of ihibernatedao you retrieve –
very bad! The HibernateDataProvider should be using the same kind of
decoration that I provided below for the IDataProvider – where the location
logic for locating the underlying dao is moved into the decorator. 

  

-Igor 

  

  
 
 
 
 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf
Of Nathan Hamblen
 Sent: Tuesday, September 20, 2005 8:23 AM

 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] list view sorting consuming all heap space 
 

  

I don't see how that code would work, as my bean isn't an instance of
IDataProvider; it's an IHibernateDao. Is there an example somewhere of how
DataView works with hibernate in such a way that the data provider isn't
entirely serialized? At the moment I'm trying to wrap my
HibernateDataProvider in a detachable model, which is harder than it seems
like this should be. Perhaps I'm not even supposed to be using a
HibernateDataProvider.
 
 Nathan
 
 Igor Vaynberg wrote: Quick fix to your problem follows, try it and tell us
if that solves it:
 
IDataProvider dp=new IDataProvider() {
  Private IDataProvider getDelegate() {
Return
((AdminApplication)Application.getApplication()).getSpringContext().getBean(
"adminComp
  
 
onentDao")); }

  
  Public iterator() { getDelegate().iterator(...) }
  Public size() { return getDelegate().size(); }
  Public model(...) { return getDelegate().model(...); }
}
 
DataView articles = new ArticleDataView("articles", dp);
 
-Igor
 
 
  
 
-Original Message-
From: [EMAIL PROTECTED]
[mailto:wicket-user-
[EMAIL PROTECTED]] On Behalf Of Nathan Hamblen
Sent: Monday, September 19, 2005 1:46 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] list view sorting consuming all heap space
 
This is it:
---
DataView articles = new ArticleDataView("articles", (IHibernateDao)
 
((AdminApplication)getApplication()).getSpringContext().getBean("adminComp
onentDao"));
 
add(articles);
add(new OrderByBorder("orderByName", "subtitle", articles));
add(new OrderByBorder("orderByMailDate",
"schedule.sendTime", articles));
add(new PagingNavigator("navigator", articles));
---
 
Nathan
 
Igor Vaynberg wrote:

 
Is it possible you are creating a link by referencing a final variable
inside the sorting header? Are you using by OrderByLink or
  
 OrderByBorder?

 
 
 
-Igor
 
 
 
 
 

 
*From:* [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] *On Behalf
Of *Nathan
Hamblen
*Sent:* Monday, September 19, 2005 10:05 AM
*To:* wicket-user@lists.sourceforge.net
*Subject:* Re: [Wicket-user] list view sorting consuming all heap space
 
 
 
When I turn off page versioning, the problem goes away. I'm not
holding on to any big objects though, as far as I can tell. There are
some ExternalLink components in the list which aren't detachable, but
I don't see that using all my java heap space.
 
There are other controls on the page which affect the query. I can
toggle them up through version 33 without any problem; it's only the
sorting that gobbles up memory until it crashes.
 
Nathan
 
Johan Compagner wrote:
 
In this case are you sure that a model detaches right?
(all objects are cleared and only the query string/sort params) are
stored?
Because if could be that all previous attempts where recorded by the
versioning managment for the back button
If you do page.setVersioned(false)
 
does it happen then?
 
On 9/19/05, *Dipu* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
wrote:
 
I have come across this problem with the sorting header some time back.
- Original Message -
From: "Nathan Hamblen" [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
To:  wicket-user@lists.sourceforge.net
mailto:wicket-user@lists.sourceforge.net
Sent: Monday, September 19, 2005 1:00 AM
Subject: [Wicket-user] lis

Re: [Wicket-user] list view sorting consuming all heap space

2005-09-19 Thread Dipu

I have come across this problem with the sorting header some time back.
- Original Message - 
From: Nathan Hamblen [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Monday, September 19, 2005 1:00 AM
Subject: [Wicket-user] list view sorting consuming all heap space


I wonder if anyone else has had a problem running out of heap space  
using contrib data and dataview. When I hook up a sorting header for  
my hib3 result set, if I keep clicking the header repeatedly (as my  
boss is sure to do!) the page will take longer and longer to display,  
until after about 10 clicks I get an out of memory error. The result  
set is not large, about 30 rows, and in both data and dataview I  
tried to do things as prescribed. (I'm pretty sure my models are  
detaching.) The code was very different for each one, so I was not  
expecting to find the same problem both times.


Most likely, I'm doing something wrong. No, I can't post the code  
right this minute. But having looked through the archives and not  
found anything, I just have to ask: is everyone else resorting their  
dataviews (or data driven listviews) 10 times straight without issue?


Nathan



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] list view sorting consuming all heap space

2005-09-19 Thread Johan Compagner
In this case are you sure that a model detaches right?
(all objects are cleared and only the query string/sort params) are stored?
Because if could be that all previous attempts where recorded by the versioning managment for the back button
If you do page.setVersioned(false)

does it happen then?
On 9/19/05, Dipu [EMAIL PROTECTED] wrote:
I have come across this problem with the sorting header some time back.- Original Message -From: Nathan Hamblen [EMAIL PROTECTED]To: 
wicket-user@lists.sourceforge.netSent: Monday, September 19, 2005 1:00 AMSubject: [Wicket-user] list view sorting consuming all heap spaceI wonder if anyone else has had a problem running out of heap space
 using contrib data and dataview. When I hook up a sorting header for my hib3 result set, if I keep clicking the header repeatedly (as my boss is sure to do!) the page will take longer and longer to display,
 until after about 10 clicks I get an out of memory error. The result set is not large, about 30 rows, and in both data and dataview I tried to do things as prescribed. (I'm pretty sure my models are
 detaching.) The code was very different for each one, so I was not expecting to find the same problem both times. Most likely, I'm doing something wrong. No, I can't post the code right this minute. But having looked through the archives and not
 found anything, I just have to ask: is everyone else resorting their dataviews (or data driven listviews) 10 times straight without issue? Nathan---
SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] list view sorting consuming all heap space

2005-09-19 Thread Igor Vaynberg








Is it possible you are creating a link by
referencing a final variable inside the sorting header? Are you using by
OrderByLink or OrderByBorder?



-Igor















From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nathan Hamblen
Sent: Monday, September 19, 2005
10:05 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] list
view sorting consuming all heap space





When I turn off page versioning, the problem goes
away. I'm not holding on to any big objects though, as far as I can tell. There
are some ExternalLink components in the list which aren't detachable, but I
don't see that using all my java heap space.

There are other controls on the page which affect the query. I can toggle them
up through version 33 without any problem; it's only the sorting that gobbles
up memory until it crashes. 

Nathan

Johan Compagner wrote: 

In this case are you sure
that a model detaches right?
(all objects are cleared and only the query string/sort params) are stored?
Because if could be that all previous attempts where recorded by the versioning
managment for the back button
If you do page.setVersioned(false)

does it happen then?





On 9/19/05, Dipu [EMAIL PROTECTED] wrote:


I have come across this problem with the sorting
header some time back.
- Original Message -
From: Nathan Hamblen [EMAIL PROTECTED]
To:  wicket-user@lists.sourceforge.net
Sent: Monday, September 19, 2005 1:00 AM
Subject: [Wicket-user] list view sorting consuming all heap space


I wonder if anyone else has had a problem running out of heap space 
 using contrib data and dataview. When I hook up a sorting header for
 my hib3 result set, if I keep clicking the header repeatedly (as my
 boss is sure to do!) the page will take longer and longer to display, 
 until after about 10 clicks I get an out of memory error. The result
 set is not large, about 30 rows, and in both data and dataview I
 tried to do things as prescribed. (I'm pretty sure my models are 
 detaching.) The code was very different for each one, so I was not
 expecting to find the same problem both times.

 Most likely, I'm doing something wrong. No, I can't post the code
 right this minute. But having looked through the archives and not 
 found anything, I just have to ask: is everyone else resorting their
 dataviews (or data driven listviews) 10 times straight without issue?

 Nathan


--- 
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user












---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Re: [Wicket-user] list view sorting consuming all heap space

2005-09-19 Thread Johan Compagner
if you enabled versioning can you debug into Page.componentModelChanging(final Component component) ?
And see what is serialized of the model?

Something must be versioned that is pretty large.
On 9/19/05, Nathan Hamblen [EMAIL PROTECTED] wrote:
This is it:---DataView articles = new ArticleDataView(articles, (IHibernateDao)((AdminApplication)getApplication()).getSpringContext().getBean(adminComponentDao));add(articles);
add(new OrderByBorder(orderByName, subtitle, articles));add(new OrderByBorder(orderByMailDate, schedule.sendTime, articles));add(new PagingNavigator(navigator, articles));
---NathanIgor Vaynberg wrote: Is it possible you are creating a link by referencing a final variable inside the sorting header? Are you using by OrderByLink or OrderByBorder?
 -Igor  *From:* 
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] *On Behalf Of *Nathan Hamblen *Sent:* Monday, September 19, 2005 10:05 AM
 *To:* wicket-user@lists.sourceforge.net *Subject:* Re: [Wicket-user] list view sorting consuming all heap space When I turn off page versioning, the problem goes away. I'm not
 holding on to any big objects though, as far as I can tell. There are some ExternalLink components in the list which aren't detachable, but I don't see that using all my java heap space.
 There are other controls on the page which affect the query. I can toggle them up through version 33 without any problem; it's only the sorting that gobbles up memory until it crashes. Nathan
 Johan Compagner wrote: In this case are you sure that a model detaches right? (all objects are cleared and only the query string/sort params) are stored? Because if could be that all previous attempts where recorded by the
 versioning managment for the back button If you do page.setVersioned(false) does it happen then? On 9/19/05, *Dipu* [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote: I have come across this problem with the sorting header some time back. - Original Message -
 From: Nathan Hamblen [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] To:  
wicket-user@lists.sourceforge.net mailto:wicket-user@lists.sourceforge.net Sent: Monday, September 19, 2005 1:00 AM
 Subject: [Wicket-user] list view sorting consuming all heap space I wonder if anyone else has had a problem running out of heap space  using contrib data and dataview. When I hook up a sorting header for
  my hib3 result set, if I keep clicking the header repeatedly (as my  boss is sure to do!) the page will take longer and longer to display,  until after about 10 clicks I get an out of memory error. The result
  set is not large, about 30 rows, and in both data and dataview I  tried to do things as prescribed. (I'm pretty sure my models are  detaching.) The code was very different for each one, so I was not
  expecting to find the same problem both times.   Most likely, I'm doing something wrong. No, I can't post the code  right this minute. But having looked through the archives and not
  found anything, I just have to ask: is everyone else resorting their  dataviews (or data driven listviews) 10 times straight without issue?   Nathan ---
 SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net mailto:Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user --- SF.Net email is sponsored by: Tame your development challenges with Apache's
 Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



[Wicket-user] list view sorting consuming all heap space

2005-09-18 Thread Nathan Hamblen
I wonder if anyone else has had a problem running out of heap space  
using contrib data and dataview. When I hook up a sorting header for  
my hib3 result set, if I keep clicking the header repeatedly (as my  
boss is sure to do!) the page will take longer and longer to display,  
until after about 10 clicks I get an out of memory error. The result  
set is not large, about 30 rows, and in both data and dataview I  
tried to do things as prescribed. (I'm pretty sure my models are  
detaching.) The code was very different for each one, so I was not  
expecting to find the same problem both times.


Most likely, I'm doing something wrong. No, I can't post the code  
right this minute. But having looked through the archives and not  
found anything, I just have to ask: is everyone else resorting their  
dataviews (or data driven listviews) 10 times straight without issue?


Nathan

smime.p7s
Description: S/MIME cryptographic signature


RE: [Wicket-user] list view sorting consuming all heap space

2005-09-18 Thread Igor Vaynberg
Are you seeing the same behavior when running dataview-examples package? I
just tried it in examples and didn't see any heap or performance problems.

-Igor


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:wicket-user-
 [EMAIL PROTECTED] On Behalf Of Nathan Hamblen
 Sent: Sunday, September 18, 2005 5:01 PM
 To: wicket-user@lists.sourceforge.net
 Subject: [Wicket-user] list view sorting consuming all heap space
 
 I wonder if anyone else has had a problem running out of heap space
 using contrib data and dataview. When I hook up a sorting header for
 my hib3 result set, if I keep clicking the header repeatedly (as my
 boss is sure to do!) the page will take longer and longer to display,
 until after about 10 clicks I get an out of memory error. The result
 set is not large, about 30 rows, and in both data and dataview I
 tried to do things as prescribed. (I'm pretty sure my models are
 detaching.) The code was very different for each one, so I was not
 expecting to find the same problem both times.
 
 Most likely, I'm doing something wrong. No, I can't post the code
 right this minute. But having looked through the archives and not
 found anything, I just have to ask: is everyone else resorting their
 dataviews (or data driven listviews) 10 times straight without issue?
 
 Nathan




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user