RE: connection pool - DBCP error
I had to add the following before I saw that behavior. You'll have to check the API, to make sure the minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis are set correctly for your pool. But once I added these, I would see abandoned connections get dropped. I put these settings in, because I found that the DBCP pool only evalutes connections on a check-in/out basis. minEvictableIdleTimeMillis5000 timeBetweenEvictionRunsMillis1 testWhileIdletrue validationQueryselect count(*) from dual -Original Message- From: Propes, Barry L [GCG-NAOT] [mailto:[EMAIL PROTECTED] Sent: Monday, February 26, 2007 3:48 PM To: Tomcat Users List Subject: connection pool - DBCP error I am getting a slight error with regards to my connection pool configuration. I may not have totally closed the connection properly, but shouldn't the following account for it? AbandonedObjectPool is used ( [EMAIL PROTECTED]) LogAbandoned: true RemoveAbandoned: true RemoveAbandonedTimeout: 60 in other words, if I have the following configured like so, maxWait 7000 removeAbandoned true removeAbandonedTimeout 60 logAbandoned true shouldn't the RemoveAbandoned params account for an open or vagrant connection and kill it off properly? Am I wrong in the assumption this attribute should have? Thanks, Barry - The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer.
RE: DBCP Logging
We wrote a simple method to return some stats. It's kinda crude, and may not be a 100% accurate, but here is what we did. Hope it helps. We used this documentation here http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/Basic DataSource.html public static void printDataSourceStats(DataSource ds,String dbname, javax.servlet.jsp.JspWriter out) throws SQLException { BasicDataSource bds = (BasicDataSource) ds; try { int bdsNumActive = bds.getNumActive(); int bdsMaxActive = bds.getMaxActive(); int bdsNumIdle = bds.getNumIdle(); long bdsMaxWait = bds.getMaxWait(); String fontcolor = ""; if (bdsNumActive <= 400) { fontcolor = ""; } else if (bdsNumActive > 400 && bdsNumActive <= 500) { fontcolor = ""; } else { fontcolor = ""; } out.print(""); out.print(""); out.print("" + dbname + " DataSource"); out.print(""); out.print(""); out.print("# Active Connections"); out.print("Maximum Active Connections"); out.print("# of Idle Connections"); out.print("Maxium Wait period before timeout"); out.print(""); out.print(""); out.print(""+fontcolor + bdsNumActive + ""); out.print("" + bdsMaxActive + ""); out.print("" + bdsNumIdle + ""); out.print("" + bdsMaxWait + ""); out.print(""); out.print(""); } catch(Exception e) { e.printStackTrace(); } } -Original Message- From: Yannick Haudry [mailto:[EMAIL PROTECTED] Sent: Monday, February 19, 2007 2:37 PM To: Tomcat Users List Subject: Re: DBCP Logging If your datasource is not managed through your container but application driven, I guess Lambda probe (which is a great application) will not be able to give you information about it ? Is there a way to programmatically log the number of connections in use, etc ... ? Thanks Yannick On 2/19/07, David Delbecq <[EMAIL PROTECTED]> wrote: > Lambda probe is a usefull webapplication you can deploy under tomcat > and that, amongst many features, allows you to see the state of your > connection pools. > > En l'instant précis du 02/19/07 14:40, [EMAIL PROTECTED] s'exprimait en > ces termes: > > Hello List, > > > > I've configured DBCP on my Tomcat 5.5.20 Installation. > > > auth="Container" > > type="javax.sql.DataSource" > > maxActive="10" > >maxIdle="2" > >maxWait="1" > > username="aUser" > > password="secret" > >driverClassName="com.sybase.jdbc3.jdbc.SybDriver" > >factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" > > > > url="jdbc:sybase:Tds:194.111.13.30:5000/?charset=iso_1" /> > > > > This runs great and I'm really happy with it until it comes to > > logging and/or monitoring. > > What do I have to do if I want to know the state of the connection > > pool? How can I see how many connections are currently in use? Or - > > more generally - How can I set up logging for the pool? > > > > Thanks! > > > > Jan > > > > > > - To start a new topic, e-mail: users@tomcat.apache.org To > > unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, > e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer.
RE: Question on common-beanutils.jar
Excellent, Thanks Chris, I'll check it out. -Original Message- From: Christopher Schultz [mailto:[EMAIL PROTECTED] Sent: Friday, February 16, 2007 6:12 PM To: Tomcat Users List Subject: Re: Question on common-beanutils.jar -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel, Stephens, Daniel wrote: > Does anyone know the main differences between > commons-beanutils-1.7.0.jar and Tomcat's original > common-beanutils.jar. Try this: $ unzip -p commons-beanutils.jar META-INF/MANIFEST.MF This should give you information about what version you already have. > We have to do a project in struts and want to use version 1.3.5. But > we are wondering if I can just deploy commons-beanutils-1.7.0.jar to > the common/lib, and it not affect the other jar? That will certainly fail. You need to either replace the existing commons-beanutils.jar, or deploy your updated one into your WEB-INF/lib directory (which might not work at all). > Or should I symlink it and make it use commons-beanutils-1.7.0.jar > primarily? Symlinks aside, you need to make sure that 1.7.0 is compatible with the version already in place. You should be able to determine compatibility by checking out the 1.7.0 release notes (http://jakarta.apache.org/commons/beanutils/commons-beanutils-1.7.0/RELEASE -NOTES.txt) and other similar documentation. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF1khZ9CaO5/Lv0PARAky4AKC1wp6Rzizia8+SeLN0hgHFkWmnywCdFH4n qTwC6hXoRdAzRah4EP53QZQ= =SYfX -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Question on common-beanutils.jar
Does anyone know the main differences between commons-beanutils-1.7.0.jar and Tomcat's original common-beanutils.jar. We have to do a project in struts and want to use version 1.3.5. But we are wondering if I can just deploy commons-beanutils-1.7.0.jar to the common/lib, and it not affect the other jar? Or should I symlink it and make it use commons-beanutils-1.7.0.jar primarily? I hope this is the correct place to ask this question.Thanks, in advance.. Danny - The information in this message may be proprietary and/or confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify First Data immediately by replying to this message and deleting it from your computer.