Create Multiple Threads that access the database simultaneously
===

I have tried to locate the solutions to my problem in various message boards. However, I am running into walls. I am trying to recreate a problem that is happening on our database "LockWait Timeout" on a Mysql INNODB table. (for information about my issue I am trying to solve, go to: http://bugs.mysql.com/bug.php?id=10641 )I have narrowed down the issue, and I have a solution. But I cannot recreate the issue on a test environment so I can test my solution.

Here is my code:

public static void main(String[] args) {
		
		
		System.out.println("Programm Starting");
		
		int numberOfthreads = 2;
		
		for(int x = 1; x <= numberOfthreads; x++){
			//Create the object UpdateClass
			
			
			// Create the Runable object
			Runnable r = new Runnable() {
				// Start the Runnable
				public void run() {
						System.out.println("Running");
				}
			};
			
			Thread thr = new Thread(r);
			System.out.println("Thread object created");
			
			thr.start();
			final UpdateClass session = new UpdateClass(x);
			System.out.println("Thread object started");
			
			try {
				System.out.println("Starting UpdateClass.runProcess()");
				session.runProcess();
				Thread.sleep(1);
			} 
			catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
			thr.stop();
			
			System.out.println("Thread stopped");
		}
	}

Basically, I am trying to replicate simultaneous UPDATEs to the MySql table to create the LockWait Timeout issue.  My class UpdateClass works the way I need it to, but I cannot recreate the simultaneous events to call the class.  Any help would be appreciated. Thank you

