how to embed one wicket app into another

2009-09-09 Thread Quan Zhou
Hi.I've developed my simple forum with Wicket(we call it A), and I want to
embed it into another website (B) developed by Wicket.
like, the left panel and the navigator panel are both from B, and the right
panel is from A,
I dont want to use Frame because my page will be complicated.

Does anyone have this kind of experience?

Thanks in advance and I hope you understand my question.


Re: how to embed one wicket app into another

2009-09-09 Thread Quan Zhou
sorry, i forget to say  this two apps are installed in different servers.each
is a single standalone app.
so i think i can't embed panelB into PageA.

On Thu, Sep 10, 2009 at 11:58 AM, Jeremy Thomerson 
jer...@wickettraining.com wrote:

 If you have created good self-contained components, you should be able to
 just embed PanelB into PageA

 --
 Jeremy Thomerson
 http://www.wickettraining.com



 On Wed, Sep 9, 2009 at 10:54 PM, Quan Zhou betoget...@gmail.com wrote:

  Hi.I've developed my simple forum with Wicket(we call it A), and I want
 to
  embed it into another website (B) developed by Wicket.
  like, the left panel and the navigator panel are both from B, and the
 right
  panel is from A,
  I dont want to use Frame because my page will be complicated.
 
  Does anyone have this kind of experience?
 
  Thanks in advance and I hope you understand my question.
 



update ModalWindow content by another link?

2009-05-01 Thread Quan Zhou
Hi,
My application's built with WIcket 1.3, and I use ModalWindow to implement
most of my functions.
I really do some modification to meet my needs. but there's a problem i
cannot find any idea to solve that.
My scenario is that:
There're 2 links (Link A, Link B) in the index Page.
Clicking each link will be shown a ModalWindow.
I fill the Window with one of my other pages, NOT A PANEL.
(windows.setPageCreator(XXX);
I can alternatively click and close each link. It works well.
Now my requirement is:
What am I going to do is  clicking Link A first, and then clicking Link B
without close the show up ModalWindow. and I want the content in ModalWindow
would be updated by Clicking B.
I've tried many ways to achieve that,but failed.

Is there anyone can give me any hints?

Thanks.


Re: update ModalWindow content by another link?

2009-05-01 Thread Quan Zhou
 yes.
 In fact, I add a script to prevent the mask of the window
Wicket.Window.Mask.prototype.show = function(){}

then I can click some other link on the page while modalwindow is shown.

I must admit this requirement is weird. Because I'm developing on an
existing system which is designed without any ajax.
I've re-organized the function tree, and plan to embed some existing page
into a reusable modalwindow, as to click some left links and update the
content of the window.

Thanks.

On Sat, May 2, 2009 at 12:05 AM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 the whole idea of a *modal* window is that once it is shown you cannot
 click on anything that is not inside the modal window...

 i would rethink your requirements or start thinking about how to make
 the window nonmodal.

 -igor

 On Fri, May 1, 2009 at 8:46 AM, Quan Zhou betoget...@gmail.com wrote:
  Hi,
  My application's built with WIcket 1.3, and I use ModalWindow to
 implement
  most of my functions.
  I really do some modification to meet my needs. but there's a problem i
  cannot find any idea to solve that.
  My scenario is that:
  There're 2 links (Link A, Link B) in the index Page.
  Clicking each link will be shown a ModalWindow.
  I fill the Window with one of my other pages, NOT A PANEL.
  (windows.setPageCreator(XXX);
  I can alternatively click and close each link. It works well.
  Now my requirement is:
  What am I going to do is  clicking Link A first, and then clicking Link B
  without close the show up ModalWindow. and I want the content in
 ModalWindow
  would be updated by Clicking B.
  I've tried many ways to achieve that,but failed.
 
  Is there anyone can give me any hints?
 
  Thanks.
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




how to remove jsessionid parameters in the url at the first time ppl visit the site?

2009-01-06 Thread Quan Zhou
Firstly, i should say i have already read about those past threads which are
concerned with the jsessionid appending in url problem. My experiment proved
the conclusion: the first time people visit the site, the application server
(tomcat) would append the jsessionid into the url no matter whether
your browser has enabled cookie.  then if you continue clicking other links
on the page ,or if you close the windows in your Firefox and reopen it
again, the jsessionid parameters would disappear because the cookie has been
set.
Now here is my scenario. My program should be integrated with other forums
or portal sites. Those sites send their account profiles to my server by
HTTP request with encrypted parameters.(but not HTTPS). Meanwhile, my
program mount a url (like loginx) for such requests which does
some authentication and throws new RestartResponseAtInterceptPageException
to  Home page if success.
Unfortunately, my Home page is constructed with some Frame Pages which means
users would NOT get browser url changing when they click links or submit
forms in the page. so the origin jsessionid set by tomcat like we mentioned
above remains forever.What's the worse, users would get into others account
if they could receive the url existing in the browser address bar by some
way. That's terrible for my system.

BTW, I'm using mod_proxy of Lighttpd to proxy the dynamic request to
the back end Tomcat server which does NOT have any load balance setting or
other cluster usage.

I've tried several methods which turn out to be useless
1) find out some configuration settings which may force the tomcat use
cookie rather than both set the cookie and rewrite the url at the first
time.
2) mount another page as a proxy connecting with my loginx page and Home
page, use setResponsePage at its constructor method.

So my question is : how could I avoid appending jsessionid parameters in the
url permanently even at the first time people visit my site?

Thanks in advance. Appreciate if any advices.


Re: how to remove jsessionid parameters in the url at the first time ppl visit the site?

2009-01-06 Thread Quan Zhou
 Thanks for your reply.  This morning I create a new class extends
BufferedWebResponse and override encodeURL method as you mentioned.
 The result remains the same. I do print out the origin url passing in , It
has already contains the substring of ;jsessionid=, so it won't help
if I justreturn the url. so I intend to cut the url whenever it contains
jsessionid parameter, but I still get this appear even when I do erase it
in my method body
 and the return of it indeed doesNOT have that parmater anymore. It drives
me crazy.
  Here it is what I do in the final.

@Override
public CharSequence encodeURL(CharSequence url) {
final CharSequence encodeURL = super.encodeURL(url);
String s = encodeURL.toString();
int i = 0;
if (s.indexOf(jsessionid=) = 0) {
i = s.indexOf(?);
if (i = 0) {
return encodeURL.subSequence(i, encodeURL.length());
} else {
return encodeURL;
}
} else {
return encodeURL;
}
}

   the encodeURL doesNOT have sessionid parameter, but my url in browser
address bar is still like
   
http://192.168.1.164:8080/test/do/;jsessionid=6oghp91zh4es?x=1e7mGct0E7Evt3ol1co31g



I'm not sure about where I have made a mistake. Please help me, thanks very
much.

On Wed, Jan 7, 2009 at 1:24 AM, Johan Compagner jcompag...@gmail.comwrote:

 create your own BufferedWebResponse
 and overwrite this method:

 public CharSequence encodeURL(CharSequence url)

 and do nothing, just return the url

 johan


 On Tue, Jan 6, 2009 at 18:14, Quan Zhou betoget...@gmail.com wrote:

  Firstly, i should say i have already read about those past threads which
  are
  concerned with the jsessionid appending in url problem. My experiment
  proved
  the conclusion: the first time people visit the site, the application
  server
  (tomcat) would append the jsessionid into the url no matter whether
  your browser has enabled cookie.  then if you continue clicking other
 links
  on the page ,or if you close the windows in your Firefox and reopen it
  again, the jsessionid parameters would disappear because the cookie has
  been
  set.
  Now here is my scenario. My program should be integrated with other
 forums
  or portal sites. Those sites send their account profiles to my server by
  HTTP request with encrypted parameters.(but not HTTPS). Meanwhile, my
  program mount a url (like loginx) for such requests which does
  some authentication and throws new
 RestartResponseAtInterceptPageException
  to  Home page if success.
  Unfortunately, my Home page is constructed with some Frame Pages which
  means
  users would NOT get browser url changing when they click links or submit
  forms in the page. so the origin jsessionid set by tomcat like we
 mentioned
  above remains forever.What's the worse, users would get into others
 account
  if they could receive the url existing in the browser address bar by some
  way. That's terrible for my system.
 
  BTW, I'm using mod_proxy of Lighttpd to proxy the dynamic request to
  the back end Tomcat server which does NOT have any load balance setting
 or
  other cluster usage.
 
  I've tried several methods which turn out to be useless
  1) find out some configuration settings which may force the tomcat use
  cookie rather than both set the cookie and rewrite the url at the first
  time.
  2) mount another page as a proxy connecting with my loginx page and Home
  page, use setResponsePage at its constructor method.
 
  So my question is : how could I avoid appending jsessionid parameters in
  the
  url permanently even at the first time people visit my site?
 
  Thanks in advance. Appreciate if any advices.
 



Re: how to remove jsessionid parameters in the url at the first time ppl visit the site?

2009-01-06 Thread Quan Zhou
I tried to override void redirect(String url) method, and also strip out the
jsessionid in it. My problem solved.
But I'm not sure whether it would do something harmful to performance or
other functions. I would let you know after my fully test.
Thank you Johan. It's so kind of you!

On Wed, Jan 7, 2009 at 10:45 AM, Quan Zhou betoget...@gmail.com wrote:

  Thanks for your reply.  This morning I create a new class extends
 BufferedWebResponse and override encodeURL method as you mentioned.
  The result remains the same. I do print out the origin url passing in , It
 has already contains the substring of ;jsessionid=, so it won't help
 if I justreturn the url. so I intend to cut the url whenever it contains
 jsessionid parameter, but I still get this appear even when I do erase it
 in my method body
  and the return of it indeed doesNOT have that parmater anymore. It drives
 me crazy.
   Here it is what I do in the final.

 @Override
 public CharSequence encodeURL(CharSequence url) {
 final CharSequence encodeURL = super.encodeURL(url);
 String s = encodeURL.toString();
 int i = 0;
 if (s.indexOf(jsessionid=) = 0) {
 i = s.indexOf(?);
 if (i = 0) {
 return encodeURL.subSequence(i, encodeURL.length());
 } else {
 return encodeURL;
 }
 } else {
 return encodeURL;
 }
 }

the encodeURL doesNOT have sessionid parameter, but my url in browser
 address bar is still like

 http://192.168.1.164:8080/test/do/;jsessionid=6oghp91zh4es?x=1e7mGct0E7Evt3ol1co31g
 


 I'm not sure about where I have made a mistake. Please help me, thanks very
 much.

 On Wed, Jan 7, 2009 at 1:24 AM, Johan Compagner jcompag...@gmail.comwrote:

 create your own BufferedWebResponse
 and overwrite this method:

 public CharSequence encodeURL(CharSequence url)

 and do nothing, just return the url

 johan


 On Tue, Jan 6, 2009 at 18:14, Quan Zhou betoget...@gmail.com wrote:

  Firstly, i should say i have already read about those past threads which
  are
  concerned with the jsessionid appending in url problem. My experiment
  proved
  the conclusion: the first time people visit the site, the application
  server
  (tomcat) would append the jsessionid into the url no matter whether
  your browser has enabled cookie.  then if you continue clicking other
 links
  on the page ,or if you close the windows in your Firefox and reopen it
  again, the jsessionid parameters would disappear because the cookie has
  been
  set.
  Now here is my scenario. My program should be integrated with other
 forums
  or portal sites. Those sites send their account profiles to my server by
  HTTP request with encrypted parameters.(but not HTTPS). Meanwhile, my
  program mount a url (like loginx) for such requests which does
  some authentication and throws new
 RestartResponseAtInterceptPageException
  to  Home page if success.
  Unfortunately, my Home page is constructed with some Frame Pages which
  means
  users would NOT get browser url changing when they click links or submit
  forms in the page. so the origin jsessionid set by tomcat like we
 mentioned
  above remains forever.What's the worse, users would get into others
 account
  if they could receive the url existing in the browser address bar by
 some
  way. That's terrible for my system.
 
  BTW, I'm using mod_proxy of Lighttpd to proxy the dynamic request to
  the back end Tomcat server which does NOT have any load balance setting
 or
  other cluster usage.
 
  I've tried several methods which turn out to be useless
  1) find out some configuration settings which may force the tomcat use
  cookie rather than both set the cookie and rewrite the url at the first
  time.
  2) mount another page as a proxy connecting with my loginx page and Home
  page, use setResponsePage at its constructor method.
 
  So my question is : how could I avoid appending jsessionid parameters in
  the
  url permanently even at the first time people visit my site?
 
  Thanks in advance. Appreciate if any advices.
 





Re: [OT] wicket users around the world

2008-12-14 Thread Quan Zhou
Beijing China.I'm using wicket to develop webgame named FBM
(www.wedomo.com),it's
600,000 registers, and about 10,000 players online in average.
I also develop my game master tools and log analyzers with wicket.
I love it so much.

2008/12/15 Juri Prokofjev proj...@gmail.com

 Estonia, Tallinn

 I've tried many frameworks, but wicket is one of my favorite.

 On Mon, Dec 15, 2008 at 8:39 AM, Ashika Umanga Umagiliya
 auma...@biggjapan.com wrote:
  Sri Lankan ,working in Japan
 
  Kathmandu, Nepal
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 



 --
 http://www.autoladu.ee  - kõik varuosad ühes kohas

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




how to activate a modalwindow in another frame page

2008-07-15 Thread Quan Zhou
I recently spilt my app page into several small pages and place them into a
frame page with 3 parts. one is on the top (called A), the rest are left(B)
and right(C).
i'm trying my best to solve the problems after splitting. but getting
troubled when dealing with modal window.

in the past version, there're some links which can activated modalwindow in
the origin page. but after changed by frame page, i've to place the link on
frame B , but place the window component on frame C so as to show in the
right side of the screen. I've attempted to make the componter reference of
modalwindow in frame C accessable to frame B , and call its setPageCreator
method when the link is clicked, but failed .

Could someone tell me how can i activated the modalwindow in the other frame
page?
And, i also wonder how to call ajax method in the other frame page (because
i need to change some of the components's style in frame A by clicking some
link on frame B, and i don't want to refresh all the html, instead of part
of them)?
What's the wicket way of doing those?

Thanks in advance.


Re: Localizer cache with 150.000+ entries causing OutOfMemory

2008-06-19 Thread Quan Zhou
I've met the same problem several days away and resovled it by override a
method of Localizer

see:
http://www.nabble.com/Why-Localizer-Retained-so-many-heapsize--to17142582.html#a17182935

that may help you a little.


2008/6/9 Stefan Fußenegger [EMAIL PROTECTED]:


 I am just analysing a heap dump (god bless the
 -XX:+HeapDumpOnOutOfMemoryError flag) of a recent application cache due to
 an OutOfMemoryError (GC overhead limit exceeded to be precise). Using
 jhat, the 175456 instances of class
 org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry immediately got
 my attention. While looking through the 107 instance of ConcurrentHashMap,
 I
 found one *really* big one: Localizer.cache has a hash table length of
 262144, each of its 32 segments with about 5300 entries, where a hash key
 is
 a string, sometimes longer than 500 charactes, similar to (see
 Localizer.getCacheKey(String,Component)):


 fooTitle.bar-org.apache.wicket.markup.html.link.BookmarkablePageLink:fooLink-org.apache.wicket.markup.html.panel.Fragment:track-org.apache.wicket.markup.html.list.ListItem:14-my.company.FooListPanel$1:fooList-my.company.FooListPanel:foos-org.apache.wicket.markup.html.list.ListItem:0-my.company.BarListPanel$1:bars-my.company.FooListPanel:panel-my.company.boxes.BodyBox:2-org.apache.wicket.markup.repeater.RepeatingView:body-my.company.layout.Border:border-my.company.pages.music.FoobarPage:43-de-null

 Those numbers pretty much convinced me: The localizer cache has blown away
 my application.

 Looking at this hash keys, I suspect the following problem: those strings
 are constructed from the position of a localized String on a page, which
 is quite a bad thing if you use nested list views or repeating views to
 construct your page. For instance, I have a panel with a long (pageable)
 list of entries, might be  5000 entries which might appear on various
 positions in a repeating view I use as a container for most of my pages.
 Let's say there are 5 possible positions, this would cause 2500 thousand
 cached entries, each with a key of 300+ characters plus some more
 characters
 for the cached message - feel free to do the maths. From a quick estimate
 I'd say: No wonder, this has blown away my app.

 As a quick fix, I'd suggest to regularly clear the localizer cache, use a
 more sophisticated cache (that expires old entries once in a while!!) or to
 disable the cache completely. However, don't try to overwrite
 Localizer.newCache() and clear the cache regularly: clearCache() will
 replace your cache with a ConcurrentHashMap (not using
 Localizer.newCache()). However, quite unlikely, that this will happen as
 newCache() is private anyway ;) I am going to add some code to clear the
 cache regularly.

 Best regards, Stefan

 PS: I'll also create a JIRA issue, but I am really short on time right now.

 -
 ---
 Stefan Fußenegger
 http://talk-on-tech.blogspot.com // looking for a nicer domain ;)
 --
 View this message in context:
 http://www.nabble.com/Localizer-cache-with-150.000%2B-entries-causing-OutOfMemory-tp17734931p17734931.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




how to do i18n of javascript file with Wicket?

2008-06-01 Thread Quan Zhou
My application's supposed to support both English,Simpilify
Chinese,Traditional Chinese,and even Vietnamese. The great I18N feature of
Wicket helps me solve many i18n problems.
The only remains is how to do i18n of javascript.
Due to the initial design, we put some of messages in the .js file,like
confirm messages or some other tips. I firstly archieved it with change
different js file including in the html head tag.
as :
put  script language=javascript src=js/area_zh_CN.js/script in
a.zh_CN.html
while
put  script language=javascript src=js/area_zh_TW.js/script in
a.zh_TW.html

you know ,that's really a bad way to do so. Sometimes there's no difference
in those two html files. and the only difference between js files are those
I18N MESSAGE values.

Now I've two ideas to improve my current design.
1) write some js file named string_zh_CN.js or string_zh_TW.js which
contains all the Message content occurr in ALL the js file, and provide a
method call getString(message) that return the correct value in current
LOCALE. Then write a component that can load the specific string.xx_xxx.js
file according to the Server LOCALE and add it in the basic page class which
inherited by all my business page. Finally replace all the Message Value
exists in other js files with getString(xxx)

2) design a component CustomScript for handling all the js file download
request so that I could use wicket to stream js file content. Then, i could
write wicket:message tag in my js file.I suppose those tag would be replace
with the value I put in the Application.properties. Finally ,replace all the
script tag with my custom component.

However I was still searching whether there's any best practice for this
problem?  I would try to implemented both two ideas in the following days.
Is there any attentions I should pay to? and I'm not quite sure about idea 2
would work well.

Any help or advice would be appreicated.
Thanks all.


Re: Why Localizer Retained so many heapsize?

2008-05-21 Thread Quan Zhou
i remove the code cursor.getId() from Localizer.getCacheKey and deploy it
to the server.
No more memory leak detected. the server runs well for several days.
Great thanks to Johan.

2008/5/15 Quan Zhou [EMAIL PROTECTED]:

 Maybe you're right.
 Yesterday I deployed the application in a high load with a little fewer
 heapsize than the usual setting to see whether the same thing happened
 again,
 and now the heapsize usage increase little by little. the Full GC interval
 becomes shorter. I'm sure that several hours later.
 I deeply explore the cache key and value; as you said, some thing with same
 value but different key's store in the cache.
 like:

 first :
 woodPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:4-zh_CN-null
 产量:
 ironPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:4-zh_CN-null
 产量:
 cropPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:4-zh_CN-null
 产量:

 later:
 woodPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:6-zh_CN-null
 产量:
 ironPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:6-zh_CN-null
 产量:
 cropPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:6-zh_CN-null
 产量:

 the only difference is PageId .  the source code of Locailzer.getCacheKey
 tells
 //
  for(Component cursor = component; cursor != null; cursor =
 cursor.getParent())
 {
 buffer.append(-).append(cursor.getClass().getName());
 buffer.append(:).append(cursor.getId());
 }

 so is the cursor.getId() useful when it represents a repeater? and whether
 i can remove it when it represents the page class?
 that would really reduce the cacheKey number I think.

 Johan, could you show me the code you fix with this problem please?

 Thanks for your great help!





 2008/5/14 Johan Compagner [EMAIL PROTECTED]:

 i fixed something in the localizer that it doesnt add the page id to the
 cachekey string
 that was your problem
 everypage that was created also creates an localizer entry that is just
 plain wrong.

 So the pageid is not in the path anymore.. i think this is what really
 caused your constant growing cache


 On Wed, May 14, 2008 at 5:04 PM, Quan Zhou [EMAIL PROTECTED] wrote:

  Yes , it would be a bit slower. I'm going to make more test to see what
  havn't store in cache.
  Maybe i can caculate how many percents it effect my application
 performance
  after i deploy it in a high load circumstance.
 
  I'm not sure about what you said about your fix for not including page.
  can you make it some clear? thanks very much.
 
 
  2008/5/14 Johan Compagner [EMAIL PROTECTED]:
 
   ok so you dont store the tested cacheKey 's that returned null..
   so that could result in a bit slower access because it is tried to
  resolve
   everytime
  
   I do think that my fix for not including the page is solving your real
  mem
   leak problem
  
   johan
  
  
   On Wed, May 14, 2008 at 2:03 PM, Quan Zhou [EMAIL PROTECTED]
 wrote:
  
  getResourceSettings().setLocalizer(new Localizer() {
   @Override
   public void putIntoCache(final String cacheKey,final
 String
string) {
   if (string != null  cacheKey!=null)
   super.putIntoCache(cacheKey, string);
   }
   });
   
   
   
2008/5/14 Johan Compagner [EMAIL PROTECTED]:
   
 but what did you do there in that method?
 nothing? you dont cache anything anymore?

 On Wed, May 14, 2008 at 10:29 AM, Quan Zhou [EMAIL PROTECTED]
 
wrote:

  Hello everyone.
 
  I override Localizer.putIntoCache method. and it really reduce
 the
  heapsize
  usage of Localizer.
 
  The application is more stable now although the key remains
 large.
 
  Hope we can find a way to shorter the key length.
 
  thanks everyone.
 
  2008/5/13 Eirik Rude [EMAIL PROTECTED]:
 
  
   A soft reference is very common for this type of thing.  I
 know
   some
of
   ICU's
   resources are stored this way.
  
  
  
   Jonathan Locke wrote:
   
   
maybe localizer should limit its size or use a soft
 reference
cache?
   
   
Johan Compagner wrote:
   
Can you really see what it holds?
Almost 2G in memory in localizer is extreme... Thats really
 a
   lot
of
strings..
You could try to read that dump with yourkit if your
 current
  one
doesnt show enough.
   
On 5/9/08, Quan Zhou [EMAIL PROTECTED] wrote

Re: Why Localizer Retained so many heapsize?

2008-05-14 Thread Quan Zhou
Hello everyone.

I override Localizer.putIntoCache method. and it really reduce the heapsize
usage of Localizer.

The application is more stable now although the key remains large.

Hope we can find a way to shorter the key length.

thanks everyone.

2008/5/13 Eirik Rude [EMAIL PROTECTED]:


 A soft reference is very common for this type of thing.  I know some of
 ICU's
 resources are stored this way.



 Jonathan Locke wrote:
 
 
  maybe localizer should limit its size or use a soft reference cache?
 
 
  Johan Compagner wrote:
 
  Can you really see what it holds?
  Almost 2G in memory in localizer is extreme... Thats really a lot of
  strings..
  You could try to read that dump with yourkit if your current one
  doesnt show enough.
 
  On 5/9/08, Quan Zhou [EMAIL PROTECTED] wrote:
  Hello everyone.
 
  I recently develop my App use Wicket1.3.3. It's my first time to use
  this
  framework and I feel it's really really a perfect framework for me.
  My app support both Simplified Chinese , Traditional Chinese, I
  implement
  this with Wicket i18n feature.
  With the load increasing these days, I found my app would become very
  lag
  abount every 24 hours ,so that i would only restart it
  without any choice.
  when I found the lag, My log records many Exceptions like :
  after 1 minute the Pagemap null is still locked by:
  Thread[http-8080-321,5,main], giving
  up trying to get the page for path xxx
 
  I check the JVM status with jstat -gc , It tells that the Heapsize is
  full
  even after full GC.
  My VM paraemter is -Xms2000m -Xmx2000m -XX:MaxNewSize=250m
  -XX:MaxPermSize=250m
  My deploy server has 2*CPU and 4G memory, Redhat AS4 OS + tomcat 6.0.
  There're 2000 sessions on the day while the timeout threshold is 15
  minutes.
  So i dump the whole heapsize with the command  jmap
  -dump:live,format=b,file=3.dump.hprof processid
  and i truely get a 2G size dump files. I use SAP Memory Analyer to see
  what're stored in HeapMemory.
  and I found a strange number of Retained Heap usage:
  Classname
   ShallowHeap   RetainHeap
RetainedHeap%
  [EMAIL PROTECTED]
  16
  1,755,070,35287.64%
   [EMAIL PROTECTED]
  48 1,755,070,33687.69%
[EMAIL PROTECTED]
   33,554,448
   1,755,069,632   87.69%
 -  [EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -  [EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -  [EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -  [EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -  [EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -  [EMAIL PROTECTED]
 ...
 24   3928
  0.00%
+ 2,863,659 more...
 
  Is that means that the Localizer Object used most of the heap size?
  or Is this number normal for Wicket App?
 
  I wonder whether I forget to release the memory by my mis-using of
 i18n
  feature?
  Is there any attentions I must pay to when dealing with Localizer?
 
  This problem annoys me more the 2 weeks. I really need some help.
 Thanks
  .
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Why-Localizer-Retained-so-many-heapsize--tp17142582p17199950.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Why Localizer Retained so many heapsize?

2008-05-14 Thread Quan Zhou
   getResourceSettings().setLocalizer(new Localizer() {
@Override
public void putIntoCache(final String cacheKey,final String
string) {
if (string != null  cacheKey!=null)
super.putIntoCache(cacheKey, string);
}
});



2008/5/14 Johan Compagner [EMAIL PROTECTED]:

 but what did you do there in that method?
 nothing? you dont cache anything anymore?

 On Wed, May 14, 2008 at 10:29 AM, Quan Zhou [EMAIL PROTECTED] wrote:

  Hello everyone.
 
  I override Localizer.putIntoCache method. and it really reduce the
  heapsize
  usage of Localizer.
 
  The application is more stable now although the key remains large.
 
  Hope we can find a way to shorter the key length.
 
  thanks everyone.
 
  2008/5/13 Eirik Rude [EMAIL PROTECTED]:
 
  
   A soft reference is very common for this type of thing.  I know some of
   ICU's
   resources are stored this way.
  
  
  
   Jonathan Locke wrote:
   
   
maybe localizer should limit its size or use a soft reference cache?
   
   
Johan Compagner wrote:
   
Can you really see what it holds?
Almost 2G in memory in localizer is extreme... Thats really a lot of
strings..
You could try to read that dump with yourkit if your current one
doesnt show enough.
   
On 5/9/08, Quan Zhou [EMAIL PROTECTED] wrote:
Hello everyone.
   
I recently develop my App use Wicket1.3.3. It's my first time to
 use
this
framework and I feel it's really really a perfect framework for me.
My app support both Simplified Chinese , Traditional Chinese, I
implement
this with Wicket i18n feature.
With the load increasing these days, I found my app would become
  very
lag
abount every 24 hours ,so that i would only restart it
without any choice.
when I found the lag, My log records many Exceptions like :
after 1 minute the Pagemap null is still locked by:
Thread[http-8080-321,5,main], giving
up trying to get the page for path xxx
   
I check the JVM status with jstat -gc , It tells that the Heapsize
  is
full
even after full GC.
My VM paraemter is -Xms2000m -Xmx2000m -XX:MaxNewSize=250m
-XX:MaxPermSize=250m
My deploy server has 2*CPU and 4G memory, Redhat AS4 OS + tomcat
  6.0.
There're 2000 sessions on the day while the timeout threshold is 15
minutes.
So i dump the whole heapsize with the command  jmap
-dump:live,format=b,file=3.dump.hprof processid
and i truely get a 2G size dump files. I use SAP Memory Analyer to
  see
what're stored in HeapMemory.
and I found a strange number of Retained Heap usage:
Classname
 ShallowHeap
  RetainHeap
  RetainedHeap%
[EMAIL PROTECTED]
16
1,755,070,35287.64%
 [EMAIL PROTECTED]
48 1,755,070,336
   87.69%
  [EMAIL PROTECTED]
 ...
 33,554,448
 1,755,069,632   87.69%
   -
  [EMAIL PROTECTED]
   ...
   24   3928
0.00%
   -
  [EMAIL PROTECTED]
   ...
   24   3928
0.00%
   -
  [EMAIL PROTECTED]
   ...
   24   3928
0.00%
   -
  [EMAIL PROTECTED]
   ...
   24   3928
0.00%
   -
  [EMAIL PROTECTED]
   ...
   24   3928
0.00%
   -
  [EMAIL PROTECTED]
   ...
   24   3928
0.00%
  + 2,863,659 more...
   
Is that means that the Localizer Object used most of the heap size?
or Is this number normal for Wicket App?
   
I wonder whether I forget to release the memory by my mis-using of
   i18n
feature?
Is there any attentions I must pay to when dealing with Localizer?
   
This problem annoys me more the 2 weeks. I really need some help.
   Thanks
.
   
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
   
  
   --
   View this message in context:
  
 
 http://www.nabble.com/Why-Localizer-Retained-so-many-heapsize--tp17142582p17199950.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 



Re: Why Localizer Retained so many heapsize?

2008-05-14 Thread Quan Zhou
Yes , it would be a bit slower. I'm going to make more test to see what
havn't store in cache.
Maybe i can caculate how many percents it effect my application performance
after i deploy it in a high load circumstance.

I'm not sure about what you said about your fix for not including page.
can you make it some clear? thanks very much.


2008/5/14 Johan Compagner [EMAIL PROTECTED]:

 ok so you dont store the tested cacheKey 's that returned null..
 so that could result in a bit slower access because it is tried to resolve
 everytime

 I do think that my fix for not including the page is solving your real mem
 leak problem

 johan


 On Wed, May 14, 2008 at 2:03 PM, Quan Zhou [EMAIL PROTECTED] wrote:

getResourceSettings().setLocalizer(new Localizer() {
 @Override
 public void putIntoCache(final String cacheKey,final String
  string) {
 if (string != null  cacheKey!=null)
 super.putIntoCache(cacheKey, string);
 }
 });
 
 
 
  2008/5/14 Johan Compagner [EMAIL PROTECTED]:
 
   but what did you do there in that method?
   nothing? you dont cache anything anymore?
  
   On Wed, May 14, 2008 at 10:29 AM, Quan Zhou [EMAIL PROTECTED]
  wrote:
  
Hello everyone.
   
I override Localizer.putIntoCache method. and it really reduce the
heapsize
usage of Localizer.
   
The application is more stable now although the key remains large.
   
Hope we can find a way to shorter the key length.
   
thanks everyone.
   
2008/5/13 Eirik Rude [EMAIL PROTECTED]:
   

 A soft reference is very common for this type of thing.  I know
 some
  of
 ICU's
 resources are stored this way.



 Jonathan Locke wrote:
 
 
  maybe localizer should limit its size or use a soft reference
  cache?
 
 
  Johan Compagner wrote:
 
  Can you really see what it holds?
  Almost 2G in memory in localizer is extreme... Thats really a
 lot
  of
  strings..
  You could try to read that dump with yourkit if your current one
  doesnt show enough.
 
  On 5/9/08, Quan Zhou [EMAIL PROTECTED] wrote:
  Hello everyone.
 
  I recently develop my App use Wicket1.3.3. It's my first time
 to
   use
  this
  framework and I feel it's really really a perfect framework for
  me.
  My app support both Simplified Chinese , Traditional Chinese, I
  implement
  this with Wicket i18n feature.
  With the load increasing these days, I found my app would
 become
very
  lag
  abount every 24 hours ,so that i would only restart it
  without any choice.
  when I found the lag, My log records many Exceptions like :
  after 1 minute the Pagemap null is still locked by:
  Thread[http-8080-321,5,main], giving
  up trying to get the page for path xxx
 
  I check the JVM status with jstat -gc , It tells that the
  Heapsize
is
  full
  even after full GC.
  My VM paraemter is -Xms2000m -Xmx2000m -XX:MaxNewSize=250m
  -XX:MaxPermSize=250m
  My deploy server has 2*CPU and 4G memory, Redhat AS4 OS +
 tomcat
6.0.
  There're 2000 sessions on the day while the timeout threshold
 is
  15
  minutes.
  So i dump the whole heapsize with the command  jmap
  -dump:live,format=b,file=3.dump.hprof processid
  and i truely get a 2G size dump files. I use SAP Memory Analyer
  to
see
  what're stored in HeapMemory.
  and I found a strange number of Retained Heap usage:
  Classname
   ShallowHeap
RetainHeap
RetainedHeap%
  [EMAIL PROTECTED]
  16
  1,755,070,35287.64%
   [EMAIL PROTECTED]
  48 1,755,070,336
 87.69%
 
  [EMAIL PROTECTED]
   ...
   33,554,448
   1,755,069,632   87.69%
 -
[EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -
[EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -
[EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -
[EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -
[EMAIL PROTECTED]
 ...
 24   3928
  0.00%
 -
[EMAIL PROTECTED]
 ...
 24   3928
  0.00%
+ 2,863,659 more...
 
  Is that means that the Localizer Object used most of the heap
  size?
  or Is this number normal for Wicket App?
 
  I wonder whether I forget to release the memory by my mis-using
  of
 i18n
  feature

Re: Why Localizer Retained so many heapsize?

2008-05-14 Thread Quan Zhou
Maybe you're right.
Yesterday I deployed the application in a high load with a little fewer
heapsize than the usual setting to see whether the same thing happened
again,
and now the heapsize usage increase little by little. the Full GC interval
becomes shorter. I'm sure that several hours later.
I deeply explore the cache key and value; as you said, some thing with same
value but different key's store in the cache.
like:

first :
woodPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:4-zh_CN-null
产量:
ironPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:4-zh_CN-null
产量:
cropPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:4-zh_CN-null
产量:

later:
woodPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:6-zh_CN-null
产量:
ironPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:6-zh_CN-null
产量:
cropPr_lab-com.wedomo.webgame.fbm3guo.wicket.reuse.ResourcePanel:resourcepanel-com.wedomo.webgame.fbm3guo.wicket.pages.map.MapSmall:6-zh_CN-null
产量:

the only difference is PageId .  the source code of Locailzer.getCacheKey
tells
//
 for(Component cursor = component; cursor != null; cursor =
cursor.getParent())
{
buffer.append(-).append(cursor.getClass().getName());
buffer.append(:).append(cursor.getId());
}

so is the cursor.getId() useful when it represents a repeater? and whether i
can remove it when it represents the page class?
that would really reduce the cacheKey number I think.

Johan, could you show me the code you fix with this problem please?

Thanks for your great help!




2008/5/14 Johan Compagner [EMAIL PROTECTED]:

 i fixed something in the localizer that it doesnt add the page id to the
 cachekey string
 that was your problem
 everypage that was created also creates an localizer entry that is just
 plain wrong.

 So the pageid is not in the path anymore.. i think this is what really
 caused your constant growing cache


 On Wed, May 14, 2008 at 5:04 PM, Quan Zhou [EMAIL PROTECTED] wrote:

  Yes , it would be a bit slower. I'm going to make more test to see what
  havn't store in cache.
  Maybe i can caculate how many percents it effect my application
 performance
  after i deploy it in a high load circumstance.
 
  I'm not sure about what you said about your fix for not including page.
  can you make it some clear? thanks very much.
 
 
  2008/5/14 Johan Compagner [EMAIL PROTECTED]:
 
   ok so you dont store the tested cacheKey 's that returned null..
   so that could result in a bit slower access because it is tried to
  resolve
   everytime
  
   I do think that my fix for not including the page is solving your real
  mem
   leak problem
  
   johan
  
  
   On Wed, May 14, 2008 at 2:03 PM, Quan Zhou [EMAIL PROTECTED]
 wrote:
  
  getResourceSettings().setLocalizer(new Localizer() {
   @Override
   public void putIntoCache(final String cacheKey,final
 String
string) {
   if (string != null  cacheKey!=null)
   super.putIntoCache(cacheKey, string);
   }
   });
   
   
   
2008/5/14 Johan Compagner [EMAIL PROTECTED]:
   
 but what did you do there in that method?
 nothing? you dont cache anything anymore?

 On Wed, May 14, 2008 at 10:29 AM, Quan Zhou [EMAIL PROTECTED]
wrote:

  Hello everyone.
 
  I override Localizer.putIntoCache method. and it really reduce
 the
  heapsize
  usage of Localizer.
 
  The application is more stable now although the key remains
 large.
 
  Hope we can find a way to shorter the key length.
 
  thanks everyone.
 
  2008/5/13 Eirik Rude [EMAIL PROTECTED]:
 
  
   A soft reference is very common for this type of thing.  I know
   some
of
   ICU's
   resources are stored this way.
  
  
  
   Jonathan Locke wrote:
   
   
maybe localizer should limit its size or use a soft reference
cache?
   
   
Johan Compagner wrote:
   
Can you really see what it holds?
Almost 2G in memory in localizer is extreme... Thats really
 a
   lot
of
strings..
You could try to read that dump with yourkit if your current
  one
doesnt show enough.
   
On 5/9/08, Quan Zhou [EMAIL PROTECTED] wrote:
Hello everyone.
   
I recently develop my App use Wicket1.3.3. It's my first
 time
   to
 use
this
framework and I feel it's really really a perfect framework
  for
me.
My app support both Simplified Chinese , Traditional

Re: Why Localizer Retained so many heapsize?

2008-05-12 Thread Quan Zhou
Thanks for your all replys.

I review the dump file with both SAP MemoryAnalyzer and YourKit
They all show the same hierachy as follows:

-org.apache.wicket.settings.Settings
 - org.apache.wicket.Localizer
  - org.apache.wicket.util.concurrent.ConcurrentHashMap
   - org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry

Localizer Object retaind 87.84% HeapSize. while the DiskPageStore only
retained 0.71%
That's weird,isn't it?

I decrease the max heapsize settings to 50M, and make a load test then
monitor the memory allocation.
It indeed allocated more and more char[] objects time by time.

Iman,how do you solve your problem at last?
could you share some experience with me ? Thank you very much.

2008/5/10 Iman Rahmatizadeh [EMAIL PROTECTED]:

 I've seen this before, altough it wasnt 2GB, but in a small 70MB heap dump
 the cache size was around 25MB. The ConcurrentHashMap caches a lot of
 unneeded string keys, where the keys are quite large, maybe strings of size
 1k characters, like  key :

 org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1:rows-ir.co.meraat.avicenna.web.components.AvicennaDataTable$InnerDataTable:inner-table-ir.co.meraat.avicenna.web.components.AvicennaDataTable$1:filter-form-ir.co.meraat.avicenna.web.components.AvicennaDataTable:table-ir.co.meraat.avicenna.vita.GradesManagementPanel$1:studentSearch-ir.co.meraat.avicenna.vita.GradesManagementPanel:componentId-ir.co.meraat.avicenna.web.CompositePage:5-fa_IR-nullg.apache.wicket.markup.repeater.OddEvenItem:29-

 As you see the component hierarchy is dumped into the string, making it
 very
 large. I guess we're both localizing a lot of strings, so our problem could
 be the same.

 Iman

 On Sat, May 10, 2008 at 9:38 AM, Johan Compagner [EMAIL PROTECTED]
 wrote:

  Can you really see what it holds?
  Almost 2G in memory in localizer is extreme... Thats really a lot of
  strings..
  You could try to read that dump with yourkit if your current one
  doesnt show enough.
 
  On 5/9/08, Quan Zhou [EMAIL PROTECTED] wrote:
   Hello everyone.
  
   I recently develop my App use Wicket1.3.3. It's my first time to use
 this
   framework and I feel it's really really a perfect framework for me.
   My app support both Simplified Chinese , Traditional Chinese, I
 implement
   this with Wicket i18n feature.
   With the load increasing these days, I found my app would become very
 lag
   abount every 24 hours ,so that i would only restart it
   without any choice.
   when I found the lag, My log records many Exceptions like :
   after 1 minute the Pagemap null is still locked by:
   Thread[http-8080-321,5,main], giving
   up trying to get the page for path xxx
  
   I check the JVM status with jstat -gc , It tells that the Heapsize is
  full
   even after full GC.
   My VM paraemter is -Xms2000m -Xmx2000m -XX:MaxNewSize=250m
   -XX:MaxPermSize=250m
   My deploy server has 2*CPU and 4G memory, Redhat AS4 OS + tomcat 6.0.
   There're 2000 sessions on the day while the timeout threshold is 15
  minutes.
   So i dump the whole heapsize with the command  jmap
   -dump:live,format=b,file=3.dump.hprof processid
   and i truely get a 2G size dump files. I use SAP Memory Analyer to see
   what're stored in HeapMemory.
   and I found a strange number of Retained Heap usage:
   Classname
ShallowHeap   RetainHeap
 RetainedHeap%
   [EMAIL PROTECTED]
   16
   1,755,070,35287.64%
[EMAIL PROTECTED]
   48 1,755,070,33687.69%
 [EMAIL PROTECTED]
33,554,448
1,755,069,632   87.69%
  -  [EMAIL PROTECTED]
 ...
  24   3928
   0.00%
  -  [EMAIL PROTECTED]
 ...
  24   3928
   0.00%
  -  [EMAIL PROTECTED]
 ...
  24   3928
   0.00%
  -  [EMAIL PROTECTED]
 ...
  24   3928
   0.00%
  -  [EMAIL PROTECTED]
 ...
  24   3928
   0.00%
  -  [EMAIL PROTECTED]
 ...
  24   3928
   0.00%
 + 2,863,659 more...
  
   Is that means that the Localizer Object used most of the heap size?
   or Is this number normal for Wicket App?
  
   I wonder whether I forget to release the memory by my mis-using of i18n
   feature?
   Is there any attentions I must pay to when dealing with Localizer?
  
   This problem annoys me more the 2 weeks. I really need some help.
 Thanks
  .
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



Re: Why Localizer Retained so many heapsize?

2008-05-12 Thread Quan Zhou
Thanks iman.

I explore many CocurrentHashMap$Entry to check its key/value.
I truly found two things:
1. some key is large , its length would be more than 300 if the component
has deep hierachy.That must be one of the reasons why Localizer is so big.
2. the number of this object is large too. there're 2,863,559 entrys. I
couldn't check the whole objects one by one.but i was wondering
   why there're too many Entrys. There are about 2000 java files at most in
my app, and no more than 500 wicket page/components with 2
properties files , 1 html files in average.  It means there are not huge
properties or name that needs to retain in heapze ,so what things
 would those 2,863,559 entries supposed to contain?

Is there any settings can control the limit of Entry size?or some strategy
can reduce the key name of the entry?


2008/5/12 Iman Rahmatizadeh [EMAIL PROTECTED]:

 Well actually I haven't :-) My localizer gets quite large, but it hasnt
 made
 any problems, yet .
 You see when the localizer wants to find the resource value for a specific
 key, it caches the result into the localizer. Now if your component has a
 deep hierarchy, the generated key will be quite large. In yourkit , use
 the
 object explorer to explore the ConcurrentHashMap entries and see why are
 they so large, as I think the number of entries in the cache is limited,
 So
 the only explanation would be to see why are the key/values taking so much
 space. If you can give a dump of one of the bigger key/values we can help
 more.
 Also the DiskPageStore doesnt hold on to anything in memory, so it wont
 consume any memory, nothing strange about it.

 Iman

 On Mon, May 12, 2008 at 9:31 AM, Quan Zhou [EMAIL PROTECTED] wrote:

  Thanks for your all replys.
 
  I review the dump file with both SAP MemoryAnalyzer and YourKit
  They all show the same hierachy as follows:
 
  -org.apache.wicket.settings.Settings
   - org.apache.wicket.Localizer
   - org.apache.wicket.util.concurrent.ConcurrentHashMap
- org.apache.wicket.util.concurrent.ConcurrentHashMap$Entry
 
  Localizer Object retaind 87.84% HeapSize. while the DiskPageStore only
  retained 0.71%
  That's weird,isn't it?
 
  I decrease the max heapsize settings to 50M, and make a load test then
  monitor the memory allocation.
  It indeed allocated more and more char[] objects time by time.
 
  Iman,how do you solve your problem at last?
  could you share some experience with me ? Thank you very much.
 
  2008/5/10 Iman Rahmatizadeh [EMAIL PROTECTED]:
 
   I've seen this before, altough it wasnt 2GB, but in a small 70MB heap
  dump
   the cache size was around 25MB. The ConcurrentHashMap caches a lot of
   unneeded string keys, where the keys are quite large, maybe strings of
  size
   1k characters, like  key :
  
  
 
 org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable$1:rows-ir.co.meraat.avicenna.web.components.AvicennaDataTable$InnerDataTable:inner-table-ir.co.meraat.avicenna.web.components.AvicennaDataTable$1:filter-form-ir.co.meraat.avicenna.web.components.AvicennaDataTable:table-ir.co.meraat.avicenna.vita.GradesManagementPanel$1:studentSearch-ir.co.meraat.avicenna.vita.GradesManagementPanel:componentId-ir.co.meraat.avicenna.web.CompositePage:5-fa_IR-nullg.apache.wicket.markup.repeater.OddEvenItem:29-
  
   As you see the component hierarchy is dumped into the string, making
 it
   very
   large. I guess we're both localizing a lot of strings, so our problem
  could
   be the same.
  
   Iman
  
   On Sat, May 10, 2008 at 9:38 AM, Johan Compagner [EMAIL PROTECTED]
 
   wrote:
  
Can you really see what it holds?
Almost 2G in memory in localizer is extreme... Thats really a lot of
strings..
You could try to read that dump with yourkit if your current one
doesnt show enough.
   
On 5/9/08, Quan Zhou [EMAIL PROTECTED] wrote:
 Hello everyone.

 I recently develop my App use Wicket1.3.3. It's my first time to
 use
   this
 framework and I feel it's really really a perfect framework for
 me.
 My app support both Simplified Chinese , Traditional Chinese, I
   implement
 this with Wicket i18n feature.
 With the load increasing these days, I found my app would become
  very
   lag
 abount every 24 hours ,so that i would only restart it
 without any choice.
 when I found the lag, My log records many Exceptions like :
 after 1 minute the Pagemap null is still locked by:
 Thread[http-8080-321,5,main], giving
 up trying to get the page for path xxx

 I check the JVM status with jstat -gc , It tells that the Heapsize
  is
full
 even after full GC.
 My VM paraemter is -Xms2000m -Xmx2000m -XX:MaxNewSize=250m
 -XX:MaxPermSize=250m
 My deploy server has 2*CPU and 4G memory, Redhat AS4 OS + tomcat
  6.0.
 There're 2000 sessions on the day while the timeout threshold is
 15
minutes.
 So i dump the whole heapsize with the command  jmap
 -dump:live,format=b

Why Localizer Retained so many heapsize?

2008-05-09 Thread Quan Zhou
Hello everyone.

I recently develop my App use Wicket1.3.3. It's my first time to use this
framework and I feel it's really really a perfect framework for me.
My app support both Simplified Chinese , Traditional Chinese, I implement
this with Wicket i18n feature.
With the load increasing these days, I found my app would become very lag
abount every 24 hours ,so that i would only restart it
without any choice.
when I found the lag, My log records many Exceptions like :
after 1 minute the Pagemap null is still locked by:
Thread[http-8080-321,5,main], giving
up trying to get the page for path xxx

I check the JVM status with jstat -gc , It tells that the Heapsize is full
even after full GC.
My VM paraemter is -Xms2000m -Xmx2000m -XX:MaxNewSize=250m
-XX:MaxPermSize=250m
My deploy server has 2*CPU and 4G memory, Redhat AS4 OS + tomcat 6.0.
There're 2000 sessions on the day while the timeout threshold is 15 minutes.
So i dump the whole heapsize with the command  jmap
-dump:live,format=b,file=3.dump.hprof processid
and i truely get a 2G size dump files. I use SAP Memory Analyer to see
what're stored in HeapMemory.
and I found a strange number of Retained Heap usage:
Classname
 ShallowHeap   RetainHeap
  RetainedHeap%
[EMAIL PROTECTED]
16
1,755,070,35287.64%
 [EMAIL PROTECTED]
48 1,755,070,33687.69%
  [EMAIL PROTECTED]
 33,554,448
 1,755,069,632   87.69%
   -  [EMAIL PROTECTED]
   24   3928
0.00%
   -  [EMAIL PROTECTED]
   24   3928
0.00%
   -  [EMAIL PROTECTED]
   24   3928
0.00%
   -  [EMAIL PROTECTED]
   24   3928
0.00%
   -  [EMAIL PROTECTED]
   24   3928
0.00%
   -  [EMAIL PROTECTED]
   24   3928
0.00%
  + 2,863,659 more...

Is that means that the Localizer Object used most of the heap size?
or Is this number normal for Wicket App?

I wonder whether I forget to release the memory by my mis-using of i18n
feature?
Is there any attentions I must pay to when dealing with Localizer?

This problem annoys me more the 2 weeks. I really need some help. Thanks .