• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Generate Jasper report on web with JVM runtime Xms Xmx attributes

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello ranchers

I have a java program that generates Jasper reports just fine on the web and batch. However, if there is too much data from the database, the program "may" get out of memory error. So by adding the attributes Xmx and Xms when running it works perfectly fine. But I can only do this if I run the program in command prompt.

java -Xms 1024m -Xms 4096m GenReport ....

How do I or is it even possible to issue the Xms and Xmx values if I run the web version? I don't think these will go in the parameter map for the Jasper report itself.

The web project uses JSF and runs on JBoss.

Any insights are appreciated. Thanks.


 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Correct, they would need to become part of the JBoss startup parameters.
 
K. Tsang
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf.

So you are saying if JBoss startup parms are -Xms512m -Xmx1024m then my Jasper Reports use these heap size setting? So once this is set, I can't change it for such and such process? Not even if I start a thread from my web app?

 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Those parameters can't be set or changed after the JVM has been started. Of course, you could start an external JVM process from within the web app to which you could then pass its own set of ms/mx parameters, much like you did with the standalone invocation you mentioned before.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic