Re: Tomcat Holding Database Open??????
On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote: : It appears to me, and god knows Im REAL knew to this world, that Tomcat is somehow holding my database open.. not releasing it on DISCONNECT. : : DOES anyone have any idea, I have been at this for a week, day and night, to no avail.. Im desperate for some sound guidance. A couple of questions: are you explicitly closing those DB connections? are you pooling your connections? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Holding Database Open??????
How are you acessing the database ? - dbcp - direct jdbc - taglib - ??? What makes you think it has anything to do with tomcat? If you are using direct jdbc you may try to extract your code to a stand alone application. -Original Message- From: Michael McQuade [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 2:43 PM To: Tomcat Users List Subject: Tomcat Holding Database Open?? I then try to go to my USER Login screen and my database opens with an SQLSTATE = 08002 (connection name in use) and any subsequent attept to access the database reults in an SQLSTATE = 08000 NOW, if I back out to Tomcat App Manager, stop the application, and restart it, I can go back in and get the onetime connection stated above, then the 08002 scenario repeats. It appears to me, and god knows Im REAL knew to this world, that Tomcat is somehow holding my database open.. not releasing it on DISCONNECT. DOES anyone have any idea, I have been at this for a week, day and night, to no avail.. Im desperate for some sound guidance. Thank you for anyone who can help me, and all those that have patience with me. Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Holding Database Open??????
Please forgive me, I dont even understand a lot of these responses, Im a mainframe Cobol coder here, not a Java person, but Im using a Converter that converts Cobol to Java Anyways, I am pretty sure it has to be Tomcat doing this, because my Application ran just fine, using MySQL, and JDBC driver in a Web Server called OmniCron in CGI format. The only thing different now is, Im trying to run SERVLETS using Apache/Tomcat. At the Start of each Servlet I do a connect to database CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan' DRIVER 'com.mysql.jdbc.Driver' Then do my processing and then do a DISCONNECT ALL.. It just does not make sense I can connect ONE TIME only when running a Servlet and have to back out of app, STOP, START, and go back in, to get another one time connection.the 08002, connection name in use, to me, points to Tomcat .. But as I said, Im just a baby in diapers to this world.. I believe its something in one of the .xml files, but I have no idea. As for Connection Pooling,is that for a system taking large numbers of hits on it? Right now, Im just one guy trying to make one connection work. Thank you for being patient. Mike [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 8:55 AM Subject: Re: Tomcat Holding Database Open?? On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote: : It appears to me, and god knows Im REAL knew to this world, that Tomcat is somehow holding my database open.. not releasing it on DISCONNECT. : : DOES anyone have any idea, I have been at this for a week, day and night, to no avail.. Im desperate for some sound guidance. A couple of questions: are you explicitly closing those DB connections? are you pooling your connections? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Holding Database Open??????
On Tue, Aug 31, 2004 at 09:23:56AM -0400, Michael McQuade wrote: : Please forgive me, I dont even understand a lot of these responses, Im a : mainframe Cobol coder here, not a Java person, but Im using a Converter : that converts Cobol to Java Code-generation tools come with their own quirks and headaches. Aside from that, you'd do well to get some serious Java study time or, barring that, work with an experienced Java architect/developer who can guide you through a project or two. -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat Holding Database Open??????
Hi Mike, Some thoughts. If anyone sees errors please let me know - it may save me time in the long run! Tomcat doing this, because my Application ran just fine, using MySQL, and JDBC driver in a Web Server called OmniCron in CGI If I recall correctly, the CGI approach throws everything away after each request. I moved from Perl CGI to Java Servlets a few years back partly to make use of the load-once-then -reuse aspect. I think there was Mod Perl or something that sort of did this with Perl. Any road up, you may find that that is why the CGI version worked. Maybe it was freeing/releasing things when the CGI script/prog finished each request. You got a virgin state every time. format. The only thing different now is, Im trying to run SERVLETS using Apache/Tomcat. At the Start of each Servlet I do a connect to database CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan' DRIVER 'com.mysql.jdbc.Driver' Then do my processing and then do a DISCONNECT ALL.. Are you sure the disconnect all is being fired when you think it is? Also, is there any chance the the disconnect all is freeing something you later depend on in subsequent requests? For example, do you have an init() method in your servlet that (initially) creates/connects, and the doGet/doPost then uses the connection? If this is the case, check the disconnect all is not closing/nullifying the connections since the init() won't get fired again. This might explain why the CGI implementation did make it through. It just does not make sense I can connect ONE TIME only when running a Servlet and have to back out of app, STOP, START, and go back in, to get another one time connection.the 08002, connection name in use, to me, points to Tomcat .. But as I said, Im just a baby in diapers to this world.. I believe its something in one of the .xml files, but I have no idea. I don't know for sure - but it sounds like the sort of right-of-passage problem most of us have had when first starting with servlets. I'd recommend gratuitous use of; System.err.println( Now executing {your method name} ); then stare at the console window for Tomcat to see what's being executed. It's always my last port of call for this sort of thing. As for Connection Pooling,is that for a system taking large numbers of hits on it? Right now, Im just one guy trying to make one connection work. I use connection pooling on my intranet site which has low traffic but large/complex applications on the server. I use it for two reasons; a) It shifts some of the work to a thirdparty bunch of code that I didn't have to write b) Saves time on the creation/connection cycle for DB-centric applications. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Holding Database Open??????
: Please forgive me, I dont even understand a lot of these responses, Im a : mainframe Cobol coder here, not a Java person, but Im using a Converter : that converts Cobol to Java LOL that's the proof that someone still writes on COBOL. seriously, using Converters or interpreters is a risky business when you're trying to implement something so tightly tied to a language like JSP or Servlets, factor that magnifies when you're writing mission critical apps (as i can guess from you writing on cobol, you're trying to develop some financial app). Search Amazon or O'Reilly for java books, they have lots and most of them can help you... also, tutorials at http://java.sun.com may help you -- John Villar Gerente de Proyectos Computadores Flor Hard Soft 2058 C.A. www.florhard.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Holding Database Open??????
Mike, You may want to post some code and let us take a look. May be the simplest solution to get you going. There is a chance that you are not closing the connection properly and it is being held open. There can also be database issues as well (I think someone mentioned this). Doug www.parsonstechnical.com - Original Message - From: Michael McQuade [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 9:23 AM Subject: Re: Tomcat Holding Database Open?? Please forgive me, I dont even understand a lot of these responses, Im a mainframe Cobol coder here, not a Java person, but Im using a Converter that converts Cobol to Java Anyways, I am pretty sure it has to be Tomcat doing this, because my Application ran just fine, using MySQL, and JDBC driver in a Web Server called OmniCron in CGI format. The only thing different now is, Im trying to run SERVLETS using Apache/Tomcat. At the Start of each Servlet I do a connect to database CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan' DRIVER 'com.mysql.jdbc.Driver' Then do my processing and then do a DISCONNECT ALL.. It just does not make sense I can connect ONE TIME only when running a Servlet and have to back out of app, STOP, START, and go back in, to get another one time connection.the 08002, connection name in use, to me, points to Tomcat .. But as I said, Im just a baby in diapers to this world.. I believe its something in one of the .xml files, but I have no idea. As for Connection Pooling,is that for a system taking large numbers of hits on it? Right now, Im just one guy trying to make one connection work. Thank you for being patient. Mike [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 8:55 AM Subject: Re: Tomcat Holding Database Open?? On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote: : It appears to me, and god knows Im REAL knew to this world, that Tomcat is somehow holding my database open.. not releasing it on DISCONNECT. : : DOES anyone have any idea, I have been at this for a week, day and night, to no avail.. Im desperate for some sound guidance. A couple of questions: are you explicitly closing those DB connections? are you pooling your connections? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat Holding Database Open??????
On Tue, 31 Aug 2004 09:23:56 -0400 Michael McQuade [EMAIL PROTECTED] wrote Please forgive me, I dont even understand a lot of these responses, Im a mainframe Cobol coder here, not a Java person, Welcome to Tomcat and Java. but Im using a Converter that converts Cobol to Java Fun days! Anyways, I am pretty sure it has to be Tomcat doing this, (or the converter, or some mismatch between the real and expected CoBOL, Java, and Tomcat environments) because my Application ran just fine, using MySQL, and JDBC driver in a Web Server called OmniCron in CGI format. OmniHTTPd by Omnicron (www.omnicron.ca)? (I don't know anything about them, just did a search on Google and they came up.) So you are running in a MSWindows environment? The only thing different now is, Im trying to run SERVLETS There's one difference. using Apache/Tomcat. There's two more differences. At the Start of each Servlet I do a connect to database CONNECT TO 'jdbc:mysql://127.0.0.1:3306/Imagescan' DRIVER 'com.mysql.jdbc.Driver' Then do my processing and then do a DISCONNECT ALL.. It just does not make sense I can connect ONE TIME only when running a Servlet and have to back out of app, STOP, START, Do you mean stopping and starting Tomcat here? Or the browswer instance? Or the database? and go back in, to get another one time connection.the 08002, connection name in use, to me, points to Tomcat .. 08002? But as I said, Im just a baby in diapers to this world.. Me too. I believe its something in one of the .xml files, but I have no idea. As for Connection Pooling,is that for a system taking large numbers of hits on it? Well, that's what the target would be. The idea is to re-use connections so you don't spend as much time tearing down the Java interpreter and rebuilding it. CGI will start a new Java process for every connection, and when the connection is done tear it down. Right now, Im just one guy trying to make one connection work. So you might want to check that you haven't enabled pooling accidentally. Thank you for being patient. Mike [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, August 31, 2004 8:55 AM Subject: Re: Tomcat Holding Database Open?? On Tue, Aug 31, 2004 at 08:43:00AM -0400, Michael McQuade wrote: : It appears to me, and god knows Im REAL knew to this world, that Tomcat is somehow holding my database open.. not releasing it on DISCONNECT. : : DOES anyone have any idea, I have been at this for a week, day and night, to no avail.. Im desperate for some sound guidance. A couple of questions: are you explicitly closing those DB connections? are you pooling your connections? -QM -- software -- http://www.brandxdev.net tech news -- http://www.RoarNetworX.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joel [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]