Yep - tried it all, but no luck. Billy. -----Original Message----- From: Mike Marchywka [mailto:[EMAIL PROTECTED]] Sent: 20 September 2001 16:05 To: [EMAIL PROTECTED] Subject: Re: FW: Inconsistent behaviour in Servlet output I'm fairly new myself and I've never done database stuff ( I do applet and servlet stuff for testing compression systems). I thought this was kind of interesting and the question was simple enough I could get something out of it. ( I'm just guess on the database stuff but I sounds like you have some other problem) -> -> con = DriverManager.getConnection(connectionURL); ->Beware also of static hidden in your calls. Apparently, this ->is synchronized but it is also a static method. -> The point here is that you may have static methods you don't know about. Constructors are statics ( there is no "this" pointer passed To them). I don't know if the newInstance() is supposed needed to call the class loader and initialize something or what. Did you take it out all together, restart your serlvet container and try that? ->-----Original Message----- ->From: Graham, Billy [mailto:[EMAIL PROTECTED]] ->Sent: Thursday, September 20, 2001 10:42 AM ->To: [EMAIL PROTECTED] ->Subject: Re: FW: Inconsistent behaviour in Servlet output -> -> ->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. -> ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
***************************************************************** 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 *****************************************************************
