Java Performance and Load Testing: Best Practices

j2ee The performance test for J2EE application is a difficult task unless you plan well earlier. During development, you need to gather user requirements, understand the business need and make a formal schedule for testing. The performance test is supposed to be based on some use cases. This can be based on past data or anticipated data from future usage. Once you know what needs to be tested , the next approach is how you are going to test it.  I prefer benchmark test in the early stage of development to figure out any repeatable performance regression. The best way to conduct benchmark test is to change one parameter between tests.  You can gather critical information  of repeatable result through benchmark test. Suppose, your application is impacted when you change the JVM memory setting.  You increase the memory in different stages of the test. Then you study the result and corresponding data and record the information.

Full article (391 words) »

Apache Ant: How To Set Property When Initially Unset

Also: How To Flexibly Pass JVM parameters to Apache Ant Java (Runtime) Task

Apache Ant is an excellent Java based build & deployment system using XML configuration file. In Ant properties are extensively used to configure tasks, conditionally run targets and more. In short they are an intergral part of build system. My requirement was simple. I wanted to pass JVM arguments to the Java runtime. However sometime I wanted to invoke it without passing any special runtime arguments. Unfortunately jvmarg element doesn't like it when its value is an empty string or even a string with spaces. Finding no way to fool it, I then tried to find a way to set the property to something when it is initially not set (while invoking). This proved surprisingly hard to do. Here is an elegant (I think) solution I came up with. Full article (231 words) »

Protected by Comment Guard Pro