Hi Mike, To answer your first question "What does this do?" - I'm relatively new to java and database programming, as is pretty obvious, so (as most people do) I found a 'good' example to start from (see link below). I'm afraid I can't answer your question as to what it does, except that I hoped it was doing the 'right thing' as it comes from a university Computing site! http://ijsr209.infj.ulst.ac.uk/tutorial/listinginf.html After your e-mail, I referenced my servlet computing book and replaced the line of code with "Class.forName(driverName);" in both servlets (is this correct??). This change works OK but the bug also remains - again the only thing removing the bug is putting 'Synchronized' around the code block. Have you any other suggestions for me to try. Many thanks - regards, Billy. -----Original Message----- From: Mike Marchywka [mailto:[EMAIL PROTECTED]] Sent: 20 September 2001 11:44 To: [EMAIL PROTECTED] Subject: Re: FW: Inconsistent behaviour in Servlet output //connect to the database, pose the query and obtain the results try { Class.forName(driverName).newInstance(); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ What does this do? It can only do ANYTHING via side-effects. Does the no-parameter constructor have side-effects? How long do the side-effects remain effective? con = DriverManager.getConnection(connectionURL); Beware also of static hidden in your calls. Apparently, this is synchronized but it is also a static method.
***************************************************************** This email has been Virus Scanned. Privileged/Confidential Information and/or Copyright Material may be contained in this e-mail. The information and Material is intended for the use of the intended addressee. If you are not the intended addressee, or the person responsible for delivering it to the intended addressee, you may not copy or deliver it to anyone else or use it in any unauthorised manner. To do so is prohibited and may be unlawful. If you receive this e-mail by mistake, advise the sender immediately by using the reply facility in your e-mail software. Thank you. Information Technology Department Belfast City Hospital Trust *****************************************************************
