Re: How can we pass objects created in one beanshell sampler to another

2006-07-17 Thread sebb
It should be possible to pass objects between sampler in the same thread using JMeter variables. However, JMeter variables can only be strings when using get() and put(). You need to use putObject() and getObject() to work with other classes. e.g. vars.putObject("date",new Date()): ... vars.ge

Re: How can we pass objects created in one beanshell sampler to another

2006-06-30 Thread Vikrant Sharma
Hi Vitalie, Thanks for the reply. When i try to store the object into a variable (in first beanshell) using vars.put("varname", "value"); method, it does not complain about anything. But when I get it (in second beanshell) using vars.get("varname") method and try to cast it, it throws error.

Re: How can we pass objects created in one beanshell sampler to another

2006-06-30 Thread Vitalie Valache
just some ideas.. - maybe you can declare a global variable assign the object value to it and use it by casting in the second beanshell, not sure if jmeter variable can store objects but why not! or - save object to a file using serialization if your object is supporting and load it from your

How can we pass objects created in one beanshell sampler to another

2006-06-30 Thread Vikrant Sharma
Hi all, Question on beanshell sampler - How can we pass objects created in one beanshell sampler to another. I have two beanshells in my script. I created an object in first beanshell and want to invoke the methods on the same object in the second beanshell. Is there a way we can pass the