Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@www.apache.org Received: (qmail 61755 invoked from network); 30 Nov 2003 23:30:45 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 30 Nov 2003 23:30:45 -0000 Received: (qmail 33581 invoked by uid 500); 30 Nov 2003 23:30:13 -0000 Delivered-To: apmail-jakarta-struts-user-archive@jakarta.apache.org Received: (qmail 33345 invoked by uid 500); 30 Nov 2003 23:30:12 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 33332 invoked from network); 30 Nov 2003 23:30:11 -0000 Received: from unknown (HELO SWEEPER.lands.nsw) (203.57.8.11) by daedalus.apache.org with SMTP; 30 Nov 2003 23:30:11 -0000 Received: from lands.nsw.gov.au (unverified) by SWEEPER.lands.nsw (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Mon, 1 Dec 2003 10:30:04 +1100 Received: from srv-bx-mail1.lands.nsw (srv-bx-mail1 [190.20.1.8]) by lands.nsw.gov.au (8.9.3 (PHNE_26304)/8.9.3) with ESMTP id KAA18427 for ; Mon, 1 Dec 2003 10:30:02 +1100 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Representing Existing Objects In Forms content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Date: Mon, 1 Dec 2003 10:30:12 +1100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: org.apache.struts.legacy.GenericDataSource Thread-Index: AcO3ic0VCvcYcGRuRUuSdAK87HVkiwAD6E8w From: "Toby Saville" To: "Struts Users Mailing List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N hello all, I am wanting to represent an existing object using a form and was wondering= how to do this.=20 My situation is displaying a customer's details in a form for the purpose o= f allowing them to update them. I cant think how I can populate the form tho. Im new to struts and this list so i apolagise if this has already been answ= ered.=20 Thanks,=20 toby -----Original Message----- From: David Friedman [mailto:humble@ix.netcom.com] Sent: Monday, 1 December 2003 8:35 AM To: Struts Users Mailing List Subject: RE: org.apache.struts.legacy.GenericDataSource Rajat, I haven't had any problems with DBCP. It's just that a different pool came with Hibernate that I used in production by default. I'm using DBCP in testing but I always close my development computer (my desktop) down at night so I have no comments on how DBCP works in reality. I'm sure it's fine in production. Regards, David -----Original Message----- From: Rajat Pandit [mailto:rajatp@centergroupinc.com] Sent: Sunday, November 30, 2003 1:13 AM To: Struts Users Mailing List Subject: Re: org.apache.struts.legacy.GenericDataSource hey david, thanks a lot!, just one last question, what kind of troubles did u have with DBCP. coz this will be used in production so i want to know what to expect, however a refactoring is schedule anyway but not anytime sooner. thanks once again! David Friedman wrote: > Rajit, > > I don't use the Struts DataSource because I had to much trouble with it a > few months ago. However, the commons DBCP expains all parameters here: > http://jakarta.apache.org/commons/dbcp/configuration.html > > You should be able to set any of them in your struts-config.xml data-source > entry with this syntax: > > property=3D"minIdle" > value=3D"XXX" /> > > I checked my testing and production environments and I forgot I've switched > away from DBCP to C3P0 (it comes with Hibernate). However, I'd recommend > the options (listed in the above mentioned web page): > > validationQuery set to "select 1+1" works in MySQL and returns 1 row > testWhileIdle set to "true" > timeBetweenEvictionRunsMillis set to "1800000" (1000 miliseconds * 60 > seconds * 30 minutes) > testOnBorrow set to "true" > minIdle set to "2" (or higher) > > Regards, > David > > -----Original Message----- > From: Rajat Pandit [mailto:rajatp@centergroupinc.com] > Sent: Saturday, November 29, 2003 2:14 PM > To: Struts Users Mailing List > Subject: Re: org.apache.struts.legacy.GenericDataSource > > > hello david, > thanks for the quick reply, could u pls mail me the extract of the > ofcourse remove the l/p :P ) > this would be a great help! and have u have the kind of sucess with DBCP > in dealing with connection pool and idle connections? > thanks! > > David Friedman wrote: > > >>Rajat, >> >>I've had that type of disconnect problem using Hibernate (a product > > roughly > >>like Ibatis). My problem was one of the DBCP settings: minIdle. MySQL >>wasn't seeing any activity on some pool connections overnight, so it was >>disconnecting them. Lowering the minIdle setting seemed to cause DBCP to >>test each pool connection by performing a simple select automatically. > > The > >>query seems to be a non-table select, along the lines of a 'select 1+1;'. >>That allowed MySQL to keep each connection active and not disconnect any >>overnight after being idle for hours. >> >>Regards, >>David >> >>-----Original Message----- >>From: Rajat Pandit [mailto:rajatp@centergroupinc.com] >>Sent: Saturday, November 29, 2003 12:44 PM >>To: Struts Users Mailing List >>Subject: org.apache.struts.legacy.GenericDataSource >> >> >>hello gurus, >>i have an terrible terrible problem with my application, after hosting >>this application it stops to work after 8-10hrs of idle state. then the >>server has to restart and then its fine again. >> >>i learnt that the mysql driver disconects after 8hrs of an idle >>connection so i addred autoreconnect=3Dtrue to the connection url. however >>the problem doesnt seem to get sovled. just extended fro another another >>and then the same problem again. >>i need to know how to remove org.apache.struts.legacy.GenericDataSource >>and use the connection from DBCP (commons lib ie.) and will i need to >>change the settings in the code (struts-config.xml) i also am thinking >>of refactoring the entire codebase usng iBatis. will it solve this issue? >> >>pls help! i need this project to be up and running in the next week. >>thanks once again >>the logs follows. >> >> >> >>NFO: Return allocated connection, activeCount=3D2, useCount=3D1 >>Nov 28, 2003 8:00:15 PM com.hedging.HedgeUser validUser >>INFO: --> Error: Communication link failure: java.io.IOException<-- >>Nov 28, 2003 8:00:15 PM org.apache.struts.legacy.GenericDataSource >>returnConnection >>INFO: releaseConnection(), activeCount=3D2, useCount=3D0 >>Nov 28, 2003 8:00:30 PM org.apache.jk.common.ChannelSocket > > processConnection > >>INFO: connection timeout reached >>Nov 28, 2003 8:00:33 PM org.apache.jk.common.ChannelSocket > > processConnection > >>INFO: connection timeout reached >>Nov 28, 2003 8:00:35 PM org.apache.jk.common.ChannelSocket > > processConnection > >>INFO: connection timeout reached >>Nov 28, 2003 8:00:36 PM org.apache.jk.common.ChannelSocket > > processConnection > >>INFO: connection timeout reached >>Nov 29, 2003 12:33:42 AM org.apache.jk.common.ChannelSocket >>processConnection >>INFO: connection timeout reached >>Nov 29, 2003 12:33:47 AM org.apache.jk.common.ChannelSocket >>processConnection >>INFO: connection timeout reached >>Nov 29, 2003 12:33:58 AM org.apache.struts.legacy.GenericDataSource >>getConnection >>INFO: getConnection() >>Nov 29, 2003 12:33:58 AM org.apache.struts.legacy.GenericDataSource >>getConnection >>INFO: Check for timeout, activeCount=3D2, useCount=3D0 >>Nov 29, 2003 12:33:58 AM org.apache.struts.legacy.GenericDataSource >>getConnection >>INFO: Found available connection >>Nov 29, 2003 12:33:58 AM org.apache.struts.legacy.GenericDataSource >>getConnection >>INFO: Return allocated connection, activeCount=3D2, useCount=3D1 >>Nov 29, 2003 12:33:58 AM com.hedging.HedgeUser validUser >>INFO: --> Error: No operations allowed after connection closed<-- >>Nov 29, 2003 12:33:58 AM org.apache.struts.legacy.GenericDataSource >>returnConnection >>INFO: releaseConnection(), activeCount=3D2, useCount=3D0 >>Nov 29, 2003 12:34:18 AM org.apache.jk.common.ChannelSocket >>processConnection >>-- >> >> >>Rajat Pandit | rajatp@centergroupinc.com >>+91 612 3117606 >>[ Developer and Part Time Human Being] >> >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: struts-user-help@jakarta.apache.org >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: struts-user-help@jakarta.apache.org >> > > > -- > > > Rajat Pandit | rajatp@centergroupinc.com > +91 612 3117606 > [ Developer and Part Time Human Being] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: struts-user-help@jakarta.apache.org > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: struts-user-help@jakarta.apache.org > -- Rajat Pandit | rajatp@centergroupinc.com +91 612 3117606 [ Developer and Part Time Human Being] --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org *************************************************************** This message is intended for the addressee named and=20 may contain confidential information. If you are not the=20 intended recipient, please delete it and notify the sender.=20 Views expressed in this message are those of the=20 individual sender, and are not necessarily the views of=20 the Department of Lands. This email message has been swept by MIMEsweeper=20 for the presence of computer viruses. *************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: struts-user-help@jakarta.apache.org