|
WebLogic Server 6.0 Code Examples, BEA Systems, Inc. | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--examples.jdbc.mssqlserver4.ThreadsTests
This example creates n database connections and runs n threads on each. You need valid licenses for the number of connections you want to try. The trial version provides 2 connections only. Contact support@weblogic.com for more connection licenses. Your SQL Server must also be configured to accept the number of connections you want to create.
The threads run for a designated number of seconds, executing a SQL SELECT statement. You can modify the number of seconds and the SQL command in the code.
$ set CLASSPATH=%WL_HOME%/lib/mssqlserver4v65.jar;%CLASSPATH%
$ javac -d %CLIENT_CLASSES% ThreadsTests.java
$ java examples.jdbc.mssqlserver4.ThreadsTests
*
Field Summary | |
(package private) static java.lang.String |
driverName
|
(package private) static int |
kNumberOfConnections
|
(package private) static int |
kTestSeconds
|
(package private) static int |
kThreadsPerConnection
|
(package private) static int |
totalRows
|
(package private) static int |
totalRuns
|
(package private) static java.lang.String |
url
|
Constructor Summary | |
ThreadsTests()
|
Method Summary | |
static void |
main(java.lang.String[] args)
|
(package private) static void |
updateStatistics(int runs,
int rows)
|
Methods inherited from class java.lang.Object |
|
Field Detail |
static java.lang.String driverName
static int kNumberOfConnections
static int kTestSeconds
static int kThreadsPerConnection
static int totalRows
static int totalRuns
static java.lang.String url
Constructor Detail |
public ThreadsTests()
Method Detail |
public static void main(java.lang.String[] args)
static void updateStatistics(int runs, int rows)
|
Documentation is available at http://e-docs.bea.com/wls/docs60 |
|||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |