org.objectweb.cjdbc.scenario.users
Class SQLInjectionScenario
java.lang.Object
TestCase
org.objectweb.cjdbc.scenario.templates.NoTemplate
org.objectweb.cjdbc.scenario.templates.Template
org.objectweb.cjdbc.scenario.templates.SQLInjectionTemplate
org.objectweb.cjdbc.scenario.users.SQLInjectionScenario
- public final class SQLInjectionScenario
- extends SQLInjectionTemplate
Starts multiple thread that execute inserts on backends. This class defines a
SQLInjectionScenario
- Version:
- 1.0
- Author:
- Nicolas Modrzyk
- See Also:
- Serialized Form
Fields inherited from class org.objectweb.cjdbc.scenario.templates.SQLInjectionTemplate |
bundle, cjdbcpassword, cjdbcurl, cjdbcuser, classes, cm, controller, createTables, dropTables, hm, hm1, hm2, hm3, jdbcdriverclass, jdbcpassword, jdbcurl, jdbcuser, jointhreadtimeout, keyIndex, mainVdb, passwords, standaloneTest, threadcount, threadstartwaittimerange, threadwaittime, unitruncount, urls, users |
Method Summary |
private static void |
displayResult(java.lang.Integer[] res,
java.lang.String string)
|
java.sql.Connection |
getBackendConnection(int index)
|
private static java.lang.Integer |
getId(java.util.ArrayList list)
|
private static java.lang.Integer[] |
getIds(java.sql.Connection con)
|
static int |
getKey()
Return a unique key used for transaction |
void |
testSQLInjection()
Start sql injection test |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG_FILE
static final java.lang.String LOG_FILE
- See Also:
- Constant Field Values
URLS
static final java.lang.String[] URLS
USERS
static final java.lang.String[] USERS
PASSWORDS
static final java.lang.String[] PASSWORDS
CLASSES
static final java.lang.String[] CLASSES
CJDBC_DRIVER
static final java.lang.String CJDBC_DRIVER
- See Also:
- Constant Field Values
CJDBC_URL
static final java.lang.String CJDBC_URL
CJDBC_USER
static final java.lang.String CJDBC_USER
CJDBC_PASSWORD
static final java.lang.String CJDBC_PASSWORD
THREAD_COUNT
static final int THREAD_COUNT
THREAD_START_WAIT_TIME_RANGE
static final int THREAD_START_WAIT_TIME_RANGE
UNIT_RUN_COUNT
static final int UNIT_RUN_COUNT
THREAD_WAIT_TIME
static final int THREAD_WAIT_TIME
JOIN_THREAD_TIMEOUT
static final int JOIN_THREAD_TIMEOUT
DROP_TABLES
static final boolean DROP_TABLES
CREATE_TABLES
static final boolean CREATE_TABLES
SQLgameTrans
static final java.lang.String SQLgameTrans
- See Also:
- Constant Field Values
SQLgame
static final java.lang.String SQLgame
- See Also:
- Constant Field Values
SQLlotto
static final java.lang.String SQLlotto
- See Also:
- Constant Field Values
SQLgameTransMax
static final java.lang.String SQLgameTransMax
- See Also:
- Constant Field Values
SQLgameTransCount
static final java.lang.String SQLgameTransCount
- See Also:
- Constant Field Values
SQLgameMax
static final java.lang.String SQLgameMax
- See Also:
- Constant Field Values
SQLgameCount
static final java.lang.String SQLgameCount
- See Also:
- Constant Field Values
SQLlottoMax
static final java.lang.String SQLlottoMax
- See Also:
- Constant Field Values
SQLlottoCount
static final java.lang.String SQLlottoCount
- See Also:
- Constant Field Values
createGameTransaction
static final java.lang.String createGameTransaction
- See Also:
- Constant Field Values
createGame
static final java.lang.String createGame
- See Also:
- Constant Field Values
createLottery
static final java.lang.String createLottery
- See Also:
- Constant Field Values
logger
static org.apache.log4j.Logger logger
key
static int key
synchObj
static java.lang.Object synchObj
SQLInjectionScenario
public SQLInjectionScenario()
getBackendConnection
public java.sql.Connection getBackendConnection(int index)
throws java.lang.Exception
- Overrides:
getBackendConnection
in class SQLInjectionTemplate
- Throws:
java.lang.Exception
- See Also:
Template.getHypersonicConnection(int)
testSQLInjection
public void testSQLInjection()
- Start sql injection test
displayResult
private static final void displayResult(java.lang.Integer[] res,
java.lang.String string)
getIds
private static final java.lang.Integer[] getIds(java.sql.Connection con)
throws java.lang.Exception
- Throws:
java.lang.Exception
getId
private static final java.lang.Integer getId(java.util.ArrayList list)
getKey
public static int getKey()
- Return a unique key used for transaction
- Returns:
- unique int
Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.