I have over 5000 queries to run on Oracle8i and it sometimes hang the database server. I am wondering if I can declare 2 or 3 datasource/connection pool that after like 500 queries it will switch to the other datasource/connection pool. Thanks !
regards,
Mark
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You cannot do connection pooling in SQLUnit, but you can explicitly declare named multiple connections, which you then reference from your tests. So a test can be forced to work with a specific connection. Theres nothing automatic though...
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
and then give this file a name like
sqlunit-connection1.properties and save it in lib folder
you can create sqlunit-connection2.properties
for another connection
in the test.xml you will have
<connection connection-id="1" extern="sqlunit-connection1" />
<connection connection-id="2" extern="sqlunit-connection2" />
and refer to connection-id="1" or "2" as required
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi guys,
I have over 5000 queries to run on Oracle8i and it sometimes hang the database server. I am wondering if I can declare 2 or 3 datasource/connection pool that after like 500 queries it will switch to the other datasource/connection pool. Thanks !
regards,
Mark
Hi Mark,
You cannot do connection pooling in SQLUnit, but you can explicitly declare named multiple connections, which you then reference from your tests. So a test can be forced to work with a specific connection. Theres nothing automatic though...
-sujit
I do the connection like that:
<connection>
<driver>oracle.jdbc.driver.OracleDriver</driver>
<url>jdbc:oracle:thin:@10.4.36.37:1521:leap1poc</url>
<user>hyperion</user>
<password>hyperion</password>
</connection>
so how to explicitly declare multiple conection?
thanks !
you can have different external connection properties files defined for each connection
and each of them would look like
sqlunit.driver = oracle.jdbc.driver.OracleDriver
sqlunit.url =jdbc:oracle:thin:@10.4.36.37:1521:leap1poc
sqlunit.user = hyperion
sqlunit.password =hyperion
and then give this file a name like
sqlunit-connection1.properties and save it in lib folder
you can create sqlunit-connection2.properties
for another connection
in the test.xml you will have
<connection connection-id="1" extern="sqlunit-connection1" />
<connection connection-id="2" extern="sqlunit-connection2" />
and refer to connection-id="1" or "2" as required