On 26/03/06, Ronald Bradford wrote:
> Hi All,
>
> Has anybody had any luck defining tests that support a number of JDBC
> SQL statements that constitute a transaction. I'm still very new to
> JMeter, but I don't see a way within any Controller to define multiple
> JDBC Requests that constitute a transaction (ie. an all or nothing
> approach).   For a transaction, you would need to ensure the same
> connection is used, and a rollback or commit statement is executed.

These could be added as additional options.

> I forsee only two options, first to define the transactions in question
> into stored procedures within the database, so this in effect masks the
> functionality, or to consider Java or JUnit code to perform said
> transaction.

The issue here is that the connection is obtained/released for each
JDBC sampler.

> I'm presently considering the stored procedures route, having written
> support into JMeter today for that. If anybody has had any experience or
> suggestions, they would be most welcome.
>
> I'm sure given the amount of flexibility already in JMeter, there are
> probably multipl approaches.

I don't think it's possible currently without writing Java code
One could certainly do it in BeanShell, but that would be messy.

We don't want connections to be always held between samples, so there
needs to be some way to tell the JDBC sampler to hold the connection,
and not release it until told to do so.

It's easy enough to store per-thread items (using JMeter variables for
example), so perhaps that would be one way to do it. [Using a JMeter
variable would allow BeanShell access]

Thoughts?

S

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

Reply via email to