1. What version of LoadRunner or PerformanceCenter are you using? 8.0
2. What is the protocol you are working with? RMI
3. Which LoadRunner/PerformanceCenter feature or service packs are you using? VuGen
4. What kind of LoadRunner license do you have - subscription, perpetual, Virtual User days, or evaluation?
4.1 If subscription, is subscription current or expired?
5. What platform(s) and Operating Systems? Include version and service packs. windows
6. If you have filed a service request with Mercury, what have they told you at this point with respect to your issue?
I haven't filed.
ok, Im trying to test out a java based message server that uses RMI as the interface. I want to create a Vuser using Java (of course) in order to do load testing. I have 25 virtual users in my license package and want to threads within the virtual user... even though it compiles ok, the vuser seems to have a problem where it just seems to "stop" in the middle of a scenario. I am using the lr api in my threads could this be the cause of the problem?
I did read in the manual that the lr api will not work in a separate thread but the method signatures have them as being static which should be thread safe (except for possibly the ones that store state info such as "start_transaction" "end_transaction"...
any info would be appreciated...
well, guess not too many people are testing a java message server using RMI... but I was able to find out some info by
trial and error (just in case someone might be interested...).
the LoadRunner api not being thread safe really is the culprit here. I got around that by coding the vuser to use a LinkedBlockingQueue which will allow the threads to put an "event" (i.e. general log message, or a "transaction" type of message) onto the queue and have the main thread pull off these "events" so that they may be handled by using the LR api so that LoadRunner doesn't have a problem. its a classic "producer-consumer" type of problem. and seems to work fine...
There is some run time setting in LoadRunner VUGen (General | Miscellaneous | Run VUser as a process). Have you tried if this solves your problem? I have to use this setting for one application i am testing.
yeah, I tried that but it didn't seem to help...
not sure if it was because I was using the loadrunner api or because I spawn 10 threads under the vuser to help "grind" on the message server...
but I appreciate the help...
Thread vs. Process in loadrunner will only insure that multiple users run within a single JVM instead of spawning multiple JVMs for each user. My understanding that you are actually starting a new thread within a Vuser by implementing Runnable interface or subclassing the Thread class --in this case loadrunner api will be an issue.
So the LinkedBlockingQueue sounds like a good answer to your problem