Surprising auto-(un)deploy behavior
Hi, I just noticed a surprising behavior change between Tomcat 5.0 and Tomcat 6.0.18 regarding auto-undeployment of war files. I use both versions in default configuration, which means autoDeploy and unpackWARs are both true. (I don't think this matters much, but I tried this with Mac OS X and Java 5 as well as Linux and Java 6). In Tomcat 5.0, I copy the war file to the webapps directory, it is unpacked and deployed. Then I can delete the war file, and the web application runs and will be deployed on next start from the unpacked directory. In Tomcat 6.0 deployment works the same, but when I delete the war file, the application is undeployed and the expanded directory is deleted. Is this change documented somewhere, and is there a way to get the old behavior with tomcat 6.0? Also I think that in Tomcat 5, it was *necessary* to delete the war file to be able to edit the web.xml ofthe deployed application, otherwise it was overwritten from the war file at least at the next server start. What will Tomcat 6 do on startup in this case (a .war file *and* an expanded directory of the same webapp exist, with a newer web.xml in the expanded directory? My question regards development, so there is no need to convince me that autodeployment should not be used in production :-) Regards Rainer Frey - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: mod_jk : recovery_options
On 30.03.2009 22:24, Jorge Medina wrote: I did not get any response to my questions, but from previous messages (posted by Rainer Jung) I believe that using the default values for retry and recovery_options may produce the unexpected result I was having. I changed the recovery_options on my AJP workers to value 27. So far I have not seen the tests failing again. If mod_jk retried a request which might have resulted in duplicate transactions, then you should find info level log messages about that in your mod_jk log. If your application doesn't prevent against duplicate transaction execution, setting the recovery_options to 3 is recommended. Your value of 27 is save, in case duplicate GETs and HEADs are fine for you. One example would be, if you always use POST for requesting changes you don't want to see duplicate. The official semantics of GET and HEAD require them to be idempotent, so with this assumption 27 is fine. Many apps do not satisfy this condition though and for them 3 would be better. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SEVERE: Null component Catalina:type=DataSource
hi Alexandr, listing the arrserv-rt.jar classes shows the following: http://rafb.net/p/FPcEW459.html which was a surprise to me ( i did not knew that appserv-rt.jar) is bundeling this much org.apache.catalina.* classes in theory this should not matter, since each application's classloader is isolated but since these(classes inside the jar) are the same classes the container it self is using i have a doubt here if that will ever work fine. Is there any other version of appserv-rt which does not contains these classes from catalina? Yassine On Tue, Mar 31, 2009 at 7:29 AM, Alexandr Khlystov allex.khlys...@gmail.com wrote: I was wrong, deployment method matters but it is not the root cause, root cause is the Sun Application Server *.jar: appserv-rt.jar; if it is included into mywebapp/WEB-INF/lib directory cause the JNDI to fail, I don't why yet. But problem definetely in this *.jar. We use it because customer installation will be on Sun App Server, but for deployment I want to use Tomcat. Our security logic is made on Acegi, which uses WebPrincipal from appserv-rt.jar. So I don't know how to resolve it now. 2009/3/30 Alexandr Khlystov allex.khlys...@gmail.com Hi, Yassine. As you can see at http://ovservice.org/tomcatConf.PNG - There are no any folders in /conf/ directory. I've followed your instructions, and this error doesn't appear. The difference was in the way of deploying, before the *.war deployment, I just copied the /war/ content via file manager to the Tomcat/webapps directory. Strange but there is a difference! Now I can say Yassine - thanks a lot! On Mon, Mar 30, 2009 at 4:25 PM, Yassine elas...@users.sourceforge.netwrote: Hi Alexandr, this may not solve your problem but could help to identify it, please do the following: - shutdown tomcat - remove any previously created youApplicationName.xml file in the $CATALINA_HOME/conf/Catalina/localhost/youApplicationName.xml it seems to me that when tomcat starts it does find an old instance there see the log: ( INFO: The listener org.springframework.web.context.ContextLoaderListener is already configured for this context. The duplicate definition has been ignored. ) and in addition to that, tomcat does not logs the information that it starts deploying yourApplicationName.xml - remove the $CATALINA_HOME/work/localhost/yourApplicationName directory. - package /war your application - start tomcat and let it cleanly starts until it says that the start up is success full - deploy your yourApplicationName.war into the webapps directory - send the logs again good luck! On Mon, Mar 30, 2009 at 6:22 AM, Alexandr Khlystov allex.khlys...@gmail.com wrote: *META-INF/context.xml*: ?xml version='1.0' encoding='utf-8'? Context WatchedResourceWEB-INF/web.xml/WatchedResource Resource name=jdbc/isDS auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@172.16.4.4:1523:kiptest username=test password=test maxActive=20 maxIdle=10 maxWait=-1 / Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=root password=root driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mysql?autoReconnect=true / /Context *WEB-INF/web.xml, modified a bit to hide private data:* ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app id=WebAppUM resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/isDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref context-param param-namecontextConfigLocation/param-name param-value /WEB-INF/applicationContext-security.xml /WEB-INF/schedulers-context.xml /param-value /context-param context-param param-namelog4jConfigLocation/param-name param-value/WEB-INF/classes/log4j.properties/param-value /context-param filter filter-namespringSecurityFilterChain/filter-name filter-classorg.springframework.web.filter.DelegatingFilterProxy/filter-class /filter filter-mapping filter-namespringSecurityFilterChain/filter-name url-pattern/*/url-pattern /filter-mapping listener listener-classorg.springframework.web.context.ContextLoaderListener/listener-class /listener listener
Re: Surprising auto-(un)deploy behavior
Rainer Frey (Inxmail GmbH) wrote: In Tomcat 6.0 deployment works the same, but when I delete the war file, the application is undeployed and the expanded directory is deleted. Is this change documented somewhere, Doesn't look like it and is there a way to get the old behavior with tomcat 6.0? not unless you patch the source code. Also I think that in Tomcat 5, it was *necessary* to delete the war file to be able to edit the web.xml ofthe deployed application, otherwise it was overwritten from the war file at least at the next server start. What will Tomcat 6 do on startup in this case (a .war file *and* an expanded directory of the same webapp exist, with a newer web.xml in the expanded directory? I believe it will use the one in the expanded directory. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Surprising auto-(un)deploy behavior
tc 6 will definately use the latest deployment-descriptor - tested here with tc 6 on debian. however,if you delete the war, the spp will be undeployed rgds gregor Am 31.03.2009 um 09:42 schrieb Mark Thomas ma...@apache.org: Rainer Frey (Inxmail GmbH) wrote: In Tomcat 6.0 deployment works the same, but when I delete the war file, the application is undeployed and the expanded directory is deleted. Is this change documented somewhere, Doesn't look like it and is there a way to get the old behavior with tomcat 6.0? not unless you patch the source code. Also I think that in Tomcat 5, it was *necessary* to delete the war file to be able to edit the web.xml ofthe deployed application, otherwise it was overwritten from the war file at least at the next server start. What will Tomcat 6 do on startup in this case (a .war file *and* an expanded directory of the same webapp exist, with a newer web.xml in the expanded directory? I believe it will use the one in the expanded directory. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Surprising auto-(un)deploy behavior
On Tuesday 31 March 2009 09:42:58 Mark Thomas wrote: Rainer Frey (Inxmail GmbH) wrote: In Tomcat 6.0 deployment works the same, but when I delete the war file, the application is undeployed and the expanded directory is deleted. Is this change documented somewhere, Doesn't look like it Then, is this intended behavior, or a bug? Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Surprising auto-(un)deploy behavior
On Tue, Mar 31, 2009 at 10:56 AM, Rainer Frey (Inxmail GmbH) rainer.f...@inxmail.de wrote: Then, is this intended behavior, or a bug? Rainer Making a long story short: It's expected behaviour. From the Tomcat 6 documentation (http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html): === [ snip ] Deployment on Tomcat startup If you are not interested in using the Tomcat Manager, or TCD, then you'll need to deploy your web applications statically to Tomcat, followed by a Tomcat startup. The location you deploy web applications to for this type of deployment is called the appBase which is specified per Host. You either copy a so-called exploded web application, i.e non-compressed, to this location, or a compressed web application resource .WAR file. The web applications present in the location specified by the Host's (default Host is localhost) appBase attribute (default appBase is $CATALINA_BASE/webapps) will be deployed on Tomcat startup only if the Host's deployOnStartup attribute is true. The following deployment sequence will occur on Tomcat startup in that case: 1. Any Context Descriptors will be deployed first. 2. Exploded web applications not referenced by any Context Descriptor will then be deployed. If they have an associated .WAR file in the appBase and it is newer than the exploded web application, the exploded directory will be removed and the webapp will be redeployed from the .WAR 3. .WAR files will be deployed Note again that for each deployed web application, a Context Descriptor will be created unless one exists already. === [ snap ] Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hosting Recommendations.
Thanks for all the links everyone I'll look at them all. Regards, Wesley Acheson On Tue, Mar 31, 2009 at 2:21 AM, Ben Stringer b...@burbong.com wrote: Hi Wesley, I've used Rimuhosting for a few years now. Their customer service is good, and they have Java devs on staff, so they know what they are doing. I've had one issue in that time (I rebooted my host and it didn't come back up) and they had the issue fixed within a few hours. I would recommend them. Cheers, Ben Hi is there any hosting recommendations. I've found online that rimuhost seemed to be recommended. Does anyone use that and what you think of it? Regards, Wesley Acheson - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: SEVERE: Null component Catalina:type=DataSource
I'm not the person added this jar to project, I'll answer this later. As I understand problem is in duplicated 'tomcat' classes, Maybe I'll try to just remove them. Anyway I'll report the result here. On Tue, Mar 31, 2009 at 2:31 PM, Yassine elas...@users.sourceforge.netwrote: hi Alexandr, listing the arrserv-rt.jar classes shows the following: http://rafb.net/p/FPcEW459.html which was a surprise to me ( i did not knew that appserv-rt.jar) is bundeling this much org.apache.catalina.* classes in theory this should not matter, since each application's classloader is isolated but since these(classes inside the jar) are the same classes the container it self is using i have a doubt here if that will ever work fine. Is there any other version of appserv-rt which does not contains these classes from catalina? Yassine On Tue, Mar 31, 2009 at 7:29 AM, Alexandr Khlystov allex.khlys...@gmail.com wrote: I was wrong, deployment method matters but it is not the root cause, root cause is the Sun Application Server *.jar: appserv-rt.jar; if it is included into mywebapp/WEB-INF/lib directory cause the JNDI to fail, I don't why yet. But problem definetely in this *.jar. We use it because customer installation will be on Sun App Server, but for deployment I want to use Tomcat. Our security logic is made on Acegi, which uses WebPrincipal from appserv-rt.jar. So I don't know how to resolve it now. 2009/3/30 Alexandr Khlystov allex.khlys...@gmail.com Hi, Yassine. As you can see at http://ovservice.org/tomcatConf.PNG - There are no any folders in /conf/ directory. I've followed your instructions, and this error doesn't appear. The difference was in the way of deploying, before the *.war deployment, I just copied the /war/ content via file manager to the Tomcat/webapps directory. Strange but there is a difference! Now I can say Yassine - thanks a lot! On Mon, Mar 30, 2009 at 4:25 PM, Yassine elas...@users.sourceforge.net wrote: Hi Alexandr, this may not solve your problem but could help to identify it, please do the following: - shutdown tomcat - remove any previously created youApplicationName.xml file in the $CATALINA_HOME/conf/Catalina/localhost/youApplicationName.xml it seems to me that when tomcat starts it does find an old instance there see the log: ( INFO: The listener org.springframework.web.context.ContextLoaderListener is already configured for this context. The duplicate definition has been ignored. ) and in addition to that, tomcat does not logs the information that it starts deploying yourApplicationName.xml - remove the $CATALINA_HOME/work/localhost/yourApplicationName directory. - package /war your application - start tomcat and let it cleanly starts until it says that the start up is success full - deploy your yourApplicationName.war into the webapps directory - send the logs again good luck! On Mon, Mar 30, 2009 at 6:22 AM, Alexandr Khlystov allex.khlys...@gmail.com wrote: *META-INF/context.xml*: ?xml version='1.0' encoding='utf-8'? Context WatchedResourceWEB-INF/web.xml/WatchedResource Resource name=jdbc/isDS auth=Container type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDriver url=jdbc:oracle:thin:@172.16.4.4:1523:kiptest username=test password=test maxActive=20 maxIdle=10 maxWait=-1 / Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=root password=root driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/mysql?autoReconnect=true / /Context *WEB-INF/web.xml, modified a bit to hide private data:* ?xml version=1.0 encoding=UTF-8? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app id=WebAppUM resource-ref descriptionOracle Datasource example/description res-ref-namejdbc/isDS/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref resource-ref descriptionDB Connection/description res-ref-namejdbc/TestDB/res-ref-name res-typejavax.sql.DataSource/res-type res-authContainer/res-auth /resource-ref context-param param-namecontextConfigLocation/param-name param-value /WEB-INF/applicationContext-security.xml /WEB-INF/schedulers-context.xml /param-value /context-param context-param param-namelog4jConfigLocation/param-name param-value/WEB-INF/classes/log4j.properties/param-value /context-param filter filter-namespringSecurityFilterChain/filter-name
Re: WebApp configuration best practice?
Josh McDonald wrote: Hi guys, First, apologies if this is off-topic for the Tomcat list! If so, where should I ask it? My question is simple (I hope). What's the best practice when: 1) you're distributing a .war file 2) the app needs some simple configuration information Customise your build script to include the config, or supply additional config files that contain your extra info to the war file. p 3) it will likely be deployed onto shared hosts with no access to server.xml Any enlightenment will be much appreciated! Cheers, -Josh - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: WebApp configuration best practice?
Use context, and IT would be able to configure your app outside of war file. http://tomcat.apache.org/tomcat-6.0-doc/config/context.html -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Tuesday, March 31, 2009 2:58 PM To: Tomcat Users List Subject: Re: WebApp configuration best practice? Josh McDonald wrote: Hi guys, First, apologies if this is off-topic for the Tomcat list! If so, where should I ask it? My question is simple (I hope). What's the best practice when: 1) you're distributing a .war file 2) the app needs some simple configuration information Customise your build script to include the config, or supply additional config files that contain your extra info to the war file. p 3) it will likely be deployed onto shared hosts with no access to server.xml Any enlightenment will be much appreciated! Cheers, -Josh - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
CPU usage with APR and connectionTimeout impact
Hello, In my project, we are using Tomcat 6.0.18, with APR 1.2.12 and tc native 1.1.14 on an Redhat OS (Linux kernel 2.6.18). There is a behavior that I can't explain: -with connectionTimeout=0, the process tomcat uses a huge percentage of CPU, even if there is no traffic. but we doesn't observe any problem and the response time is good. -with connectionTimeout=5000, the process tomcat uses a normal percentage of CPU, when there is no traffic. -without APR and with connectionTimeout=0, the process tomcat uses a normal percentage of CPU when there is no traffic. After different searches on the web, tomcat manual and mailing lists, I don't find the reason of the link between CPU usage and connectionTimeout/keepAliveTimeout with APR. With the previous release of Tomcat (5.5) and APR, we have a similar CPU usage (without traffic, high CPU load) and when we modify another parameter (firstReadTimeout), the behavior also changes in the same way. I know there is no real trouble, but I'm curious and prudent: I don't like to do something, when I don't understand what is hidden behind. Could somebody explain to me why Tomcat/APR has these behaviors? Is there a performance risk to set connectionTimeout to 5000? Thank you for your answers. Yann - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Renegotiate SSL connection in servlet
Hello all. I'm coding a servlet that does SSL client cert authentication. The requests already arrive on a SSL connector but for this servlet in particular the SSL connection needs to be renegotiated to ask for a client certificate. Is there anyway to do this inside a servlet? With or without APR? I'm running tomcat 6.0.18, java 6 on linux. Thanks and best regards, André Cruz - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Renegotiate SSL connection in servlet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/31/2009 9:28 AM, André Cruz wrote: I'm coding a servlet that does SSL client cert authentication. The requests already arrive on a SSL connector but for this servlet in particular the SSL connection needs to be renegotiated to ask for a client certificate. Is there anyway to do this inside a servlet? With or without APR? I think you just want to set the clientAuth attribute on your connector: Connector ... clientAuth=want / See http://tomcat.apache.org/tomcat-6.0-doc/config/http.html and http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html If you use want, then a certificate will be available if one is provided. If it is /not/ provided, then you will get NULL when you ask for it. I don't know if there's a way to force the browser to renegotiate the SSL connection and provide a certificate the second (or third...) time around. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknSHjAACgkQ9CaO5/Lv0PBBVACdF3/fSYRYEVHOlT953tCVkTrl B/UAn2EYIz/S9stu8neieyVtKPnhT2zL =jcBJ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Renegotiate SSL connection in servlet
On Mar 31, 2009, at 14:44 , Christopher Schultz wrote: On 3/31/2009 9:28 AM, André Cruz wrote: I'm coding a servlet that does SSL client cert authentication. The requests already arrive on a SSL connector but for this servlet in particular the SSL connection needs to be renegotiated to ask for a client certificate. Is there anyway to do this inside a servlet? With or without APR? I think you just want to set the clientAuth attribute on your connector: Connector ... clientAuth=want / The problem with want is that, at least with IE, the browser always prompts the user for a certificate. I just want the prompt to appear when a specific servlet is requested. I can do this with Apache and Location directives but I would like to use a tomcat-only configuration. Best regards, André Cruz - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Profiling tomcat applications with -Xrunhprof (Tomcat runs as a Windows Service)
Hi folks! We have a web application that runs on tomcat 5.5. It`s an productive envrionment. Tomcat 5.5 is installed as a Service on a Windows Server 2003. I have started the tomcat with the java option -Xrunhprof:heap=sites,depth=10,file=C:\hprof.txt. These settings I have done by the tomcat configuration gui (tomcat5w.exe). The file in C:\hprof.txt was already created after starting the service. However no further information except the general infos were written. I cannot force the tomcat to dump the trace file. If you stop as usual the service (with the services in the control settings) no file is created. If you kill the process via the task manager no file is created. I have read that you can force to write that information if you`d start the tomcat via console and afterwards kill the tomcat via CTRL+C. Unfortunately my environment doesn`t use this configuration for tomcat 5.5. The environment is an productive one. Many thanks for help in advanced. Appreciated! Johannes
Re: Replicated context is failing...or not ?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Filip, On 3/30/2009 5:18 PM, Filip Hanik - Dev Lists wrote: remove the 'docBase' attribute from context.xml +1 And remove the path, too, since Tomcat will use the name of the WAR (or directory) for the app's name. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknSKXoACgkQ9CaO5/Lv0PAengCfSGGaq9dmvf70L9QBB1K/npZg JOoAn1h1Plm6kAFYMX9f29PL6+f0yTGR =Gv0I -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Slow servlet response under WinXP Pro
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregor, On 3/30/2009 2:51 PM, Gregor Schneider wrote: Well, maybe try a different scanner? Ever tried McAffee? My experience has been that McAffee's scanner is slow as a dog. I've been asked to fix computers that are running slow because they have been taken over by spyware when the real problem was that McAffee was running and nothing else was getting done. No spyware, no nothing. Just McAffee hogging the CPU and disk. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknSKj8ACgkQ9CaO5/Lv0PDI/gCePAVoXe+XZWkWv/8mBE7YmLkT VRkAoKeE6f4ppouEutKO1eQK9vu7CwWW =mhYc -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Renegotiate SSL connection in servlet
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 3/31/2009 9:51 AM, André Cruz wrote: On Mar 31, 2009, at 14:44 , Christopher Schultz wrote: Connector ... clientAuth=want / The problem with want is that, at least with IE, the browser always prompts the user for a certificate. Hmm... that's not supposed to happen :( I've never used client-cert, so I don't have any particular advice for you, unfortunately. What I do know is that the Connector element is pretty global... you can't have it ask for certs for some requests and not others. Also, your code won't be able to touch anything until after the SSL negotiation is over, so you can't modify the SSL settings or anything like that. Your only other option for Tomcat is to configure another Connector which would require a different IP or port number, which makes it ... inconvenient at best. I just want the prompt to appear when a specific servlet is requested. I can do this with Apache and Location directives but I would like to use a tomcat-only configuration. I think httpd might be required, here, but I'd love to hear what others have to say. If you don't hear anything else for a day or so, re-post a new message with something like CLIENT-CERT 'want' asks for cert on MSIE or something like that. I'm certain that 'want' is not supposed to ask the remote user for a cert. Hmm... maybe I'm wrong. See section 5.1 of this page: http://jack.godau.googlepages.com/jbosscertificatesandopenssl - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknSLJUACgkQ9CaO5/Lv0PAZQwCcDGWCQFeAu5Exwbnag2rkZqXm DFMAoKKIB9Fh0V/n4ig4/ovEHuQErIix =AZGl -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Renegotiate SSL connection in servlet
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Renegotiate SSL connection in servlet Your only other option for Tomcat is to configure another Connector which would require a different IP or port number, which makes it ... inconvenient at best. Using a different port may not work at all with many versions of IE, which know that all HTTPS traffic is on 443 and ignore the port on the URL. Standards? What standards? We don't need no stinkin' standards! - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Re: Profiling tomcat applications with -Xrunhprof (Tomcat runs as a Windows Service)
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johannes, On 3/31/2009 9:56 AM, Haase, Johannes | SCARUS wrote: -Xrunhprof:heap=sites,depth=10,file=C:\hprof.txt. [snip] However no further information except the general infos were written. I cannot force the tomcat to dump the trace file. Are you trying to get profiling data, or are you trying to get a thread dump? I have read that you can force to write that information if you`d start the tomcat via console and afterwards kill the tomcat via CTRL+C. I think you're describing the process to get a thread dump (which is CTRL-\, /not/ CTRL-C, which will kill your process). Which JVM are you using? When I run java -Xrunhprof:help from my Sun 1.5.0 install (on Linux), it says I should be using -agentlib:hprof and that the Xrunhprof interface will be removed in future versions. Perhaps your version has Xrunhprof removed and using agentlib:hprof will work. Try playing with this on the command-line to see what is available at your JVM level. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknSL1kACgkQ9CaO5/Lv0PCZywCggr5nQCkJ9Qq4fxV8yd1IYpbn yBEAnRMYBNTzFPyYpnGIJWuLRMf3poVU =pSVX -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Slow servlet response under WinXP Pro
Chris, my experience with those scanners (slowest on top): - Symantec (Norton) - Kaspersky - McAffee However, those experiences are based on workstations only. I do know that at least some of those scanners do have different enterprise soltutions. However, I guess experiences may vary, so you have to measure. Measuring only works in a defined environment, so that even if there /were/ any benchmarks, they might not mirror the situation within /your/ environment. Therefore, IMHO, if Linux is not an option for some weird political reason, I'd ask those AV-vendors to get me a version which I could test for a month. After 3 months of tests you should know which scanner is best for your requirements. Coming back to the OP's problem: For a quick solution /knowing/ that my actual scanner is the bottleneck, I definately would give some different scanners a try and see if that helps. Cheers Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hosting Recommendations.
Wesley, if Germany is an option, I'd have 2 recommendations for you: One lowcost (starting at @ €40-something) and one premium-hoster (starting @ around € 250 per box). Prices are per month, and it's We're using both of them for our company and we're highly satisfied. Drop me a line if you want their contacts. Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: mod_jk : recovery_options
Danke schön Rainer! Yes, all my transaction requests use POST. We only allow GET to get a couple of static files. -Jorge -Original Message- From: Rainer Jung [mailto:rainer.j...@kippdata.de] Sent: Tuesday, March 31, 2009 3:24 AM To: Tomcat Users List Subject: Re: mod_jk : recovery_options On 30.03.2009 22:24, Jorge Medina wrote: I did not get any response to my questions, but from previous messages (posted by Rainer Jung) I believe that using the default values for retry and recovery_options may produce the unexpected result I was having. I changed the recovery_options on my AJP workers to value 27. So far I have not seen the tests failing again. If mod_jk retried a request which might have resulted in duplicate transactions, then you should find info level log messages about that in your mod_jk log. If your application doesn't prevent against duplicate transaction execution, setting the recovery_options to 3 is recommended. Your value of 27 is save, in case duplicate GETs and HEADs are fine for you. One example would be, if you always use POST for requesting changes you don't want to see duplicate. The official semantics of GET and HEAD require them to be idempotent, so with this assumption 27 is fine. Many apps do not satisfy this condition though and for them 3 would be better. Regards, Rainer - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Hosting Recommendations.
Hi What You Need , Shared Hosting, VPS , Dedicated Server ?? We provide Hosting Very Cheap. Let me know what you need.. Thanks On Tue, Mar 31, 2009 at 2:41 PM, Wesley Acheson wesley.ache...@gmail.comwrote: Thanks for all the links everyone I'll look at them all. Regards, Wesley Acheson On Tue, Mar 31, 2009 at 2:21 AM, Ben Stringer b...@burbong.com wrote: Hi Wesley, I've used Rimuhosting for a few years now. Their customer service is good, and they have Java devs on staff, so they know what they are doing. I've had one issue in that time (I rebooted my host and it didn't come back up) and they had the issue fixed within a few hours. I would recommend them. Cheers, Ben Hi is there any hosting recommendations. I've found online that rimuhost seemed to be recommended. Does anyone use that and what you think of it? Regards, Wesley Acheson - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards Partha Goswami President Global Web IT Solution www.globalwebitsolution.com
Re: Profiling tomcat applications with -Xrunhprof (Tomcat runs as a Windows Service)
Christopher Schultz schrieb: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Johannes, On 3/31/2009 9:56 AM, Haase, Johannes | SCARUS wrote: -Xrunhprof:heap=sites,depth=10,file=C:\hprof.txt. [snip] However no further information except the general infos were written. I cannot force the tomcat to dump the trace file. Are you trying to get profiling data, or are you trying to get a thread dump? Profiling data (-Xrunhprof:*heap*=sites, ...) I have read that you can force to write that information if you`d start the tomcat via console and afterwards kill the tomcat via CTRL+C. I think you're describing the process to get a thread dump (which is CTRL-\, /not/ CTRL-C, which will kill your process). Which JVM are you using? When I run java -Xrunhprof:help from my Sun 1.5.0 install (on Linux), it says I should be using -agentlib:hprof and that the Xrunhprof interface will be removed in future versions. Perhaps your version has Xrunhprof removed and using agentlib:hprof will work. Try playing with this on the command-line to see what is available at your JVM level. What is a thread dump? I need the heap profiling information. Especially how many object are created of a special class. CRTL+C ... ??? I do not know exactly the combination of that shortcut. Generally, I don`t have any console because there is just a windows service that has started the tomcat. My java -version is 1.5.0. I have also used the agentlib option. There ist no difference. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknSL1kACgkQ9CaO5/Lv0PCZywCggr5nQCkJ9Qq4fxV8yd1IYpbn yBEAnRMYBNTzFPyYpnGIJWuLRMf3poVU =pSVX -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: [OT] Slow servlet response under WinXP Pro
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gregor, On 3/31/2009 10:59 AM, Gregor Schneider wrote: For a quick solution /knowing/ that my actual scanner is the bottleneck, I definately would give some different scanners a try and see if that helps. Definitely. Instructing the virus scanner to ignore the database file(s) and/or directory(ies) will certainly help, too. MySQL generally uses files on a regular filesystem (rather than using its own special filesystem) which are subject to virus scanning, which will murder your performance. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknSNBIACgkQ9CaO5/Lv0PBbaQCgsJY0XlJiIsw8msXO2hZvoG+Z NKQAn2DyoyNf/4otZodH31LFor+nLjTS =s+ci -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service)
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service) Are you trying to get profiling data, or are you trying to get a thread dump? No, he's looking for heap profiling. I think you're describing the process to get a thread dump (which is CTRL-\, /not/ CTRL-C, which will kill your process). No, CTRL-C will terminate the process, and get the hprof data, when started from a command prompt. Which JVM are you using? When I run java -Xrunhprof:help from my Sun 1.5.0 install (on Linux), it says I should be using -agentlib:hprof and that the Xrunhprof interface will be removed in future versions. Which it's been saying for quite some time. Like many other deprecated interfaces, the - Xrunhprof will be there for a while; it still works in 1.7. Perhaps your version has Xrunhprof removed and using agentlib:hprof will work. The -Xrunhprof is clearly being recognized, since the C:\hprof.txt file is being created. (And the profiling is definitely occurring - performance is terrible with it on.) Changing it to the newer -agentlib format doesn't make any difference; JVM initialization translates the old -Xrunhprof syntax to the newer JVMTI format internally. In neither case does the hprof file get written, other than the few lines of header. What might work is using JVisualVM instead and just looking at the information in the GUI. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
Cookie handling issue
Hello, I've seen that there was a problem with the encoding base64 within the cookies (only at reading : request.getCookies) When the cookie contains '=' (equals), it seems that the decoding operation stops when it encounters this char. The prob. only happens since Tomcat 5.5.26 ans above. Is there any correction ? Take a look a this url: http://mail-archives.apache.org/mod_mbox/tomcat-dev/200802.mbox/%3c47bb0aac.3080...@hanik.com%3e Second question: how can i search in the archives tomcat list with a filter ? Thank you
Re: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service)
On Tue, Mar 31, 2009 at 5:19 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service) Are you trying to get profiling data, or are you trying to get a thread dump? No, he's looking for heap profiling. I think you're describing the process to get a thread dump (which is CTRL-\, /not/ CTRL-C, which will kill your process). Talking about thread-dumps: I guess Johannes is using a German keyboard. On a German keyboard, a Java-thread-dump is triggered by StrgPause (That's CTRLBREAK translated). HTH Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 @ http://pgp.mit.edu:11371/ - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service)
From: Caldarale, Charles R Subject: RE: Profiling tomcat applications with -Xrunhprof (Tomcat runs asa Windows Service) What might work is using JVisualVM instead and just looking at the information in the GUI. I did get JVisualVM to work with Tomcat running as a service, but I don't think you're going to like it (to paraphrase Douglas Adams). First, the Tomcat service needs to be running under the same Windows account that JVisualVM is started with; JVisualVM cannot find the PID otherwise, and heap profiling doesn't seem to be available through JMX ports (or maybe I just don't know how to configure it). Second, you'll need to run Tomcat under JRE/JDK 1.6. JVisualVM can access Tomcat running under a 1.5 JRE, but heap profiling won't be available. So, the easiest thing may well be to just run Tomcat from the command prompt for the duration of the profiling effort. Since heap profiling has a significant performance impact, you wouldn't want it on very long anyhow. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
RE: A problem with tomcat 6.0.18
From: Paulo Vitor [mailto:foxpv...@gmail.com] Subject: Re: A problem with tomcat 6.0.18 if I change the property end from Integer to Long, than works. That's a workaround, but not a proper fix. I'm still working on updating ELSupport.java to better handle arbitrary Number classes, but it's proving to be tricky. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
redirection
Hello I have a tomcat server running on port 8080. users need to create a dns alias which is on port 80. redirection cannot be done on DNS level of course. do you have any idea how to achieve this in tomcat. For example: http://siroe redirects to http://machineX:8080 that is a tomcat application? thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redirection
Melanie Pfefer wrote: Hello I have a tomcat server running on port 8080. users need to create a dns alias which is on port 80. redirection cannot be done on DNS level of course. do you have any idea how to achieve this in tomcat. For example: http://siroe redirects to http://machineX:8080 that is a tomcat application? thank you mod_proxy or mod_jk (most likely) if you are using apache. -- eats the blues for breakfast does unix for rent rides for the freedom scrapes for the challenge 310-947-8565 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Slow servlet response under WinXP Pro
Tommy, Thanks for the response! I'll change the code to use the newer driver name. I started with a demo app that I wrote about six years ago. That is the reason for the older driver name. 1) Fragmentation of your partition, especially the partition where the DB resides. I'll check into this, but I don't think it is a problem. 2) Size of your database The Navision database is 2GB in size, of which 62% is used. But, I am only accessing a small part of it. Not much I can do about the size of this thing. The MySQL database is nearly empty, since this is the first project using it. 3) Configuration of MySQL So far, I've just used the default installation configuration. Can you suggest any changes that you may have made? 4) Query is optimized (?) My queries are simple: select x,y,z from table1 where q='foo' I'm not using any complicated joins. It is just not required. 5) Sufficient hardware to handle the DB size (?) The production server (Win2003 server) is an IBM server with eight processors, and 4GB of memory. We have about 1.5TB of unused space on it. I would think that is sufficient? 6) SAV configuration This may be key. Can you recommend any option changes based on your experience? One thing I was hoping for was to exclude certain directories/processes from being scanned by Symantec 11.0, but I can not find a way to do this. Does a way exist? Thanks again, Jon Oman From: Tommy Pham tommy...@yahoo.com To: Tomcat Users List users@tomcat.apache.org Sent: Monday, March 30, 2009 12:23:54 PM Subject: Re: Slow servlet response under WinXP Pro Hi Jon, - Original Message From: jo...@catholic-doc.org To: users@tomcat.apache.org Sent: Monday, March 30, 2009 11:45:37 AM Subject: Slow servlet response under WinXP Pro Hello! I am working on a servlet application. It is a data entry application that reads data from a Navision database, and writes data to MySQL. Here is the setup: WinXP Pro with Service Pack 3 (dev. box) / Windows 2003 Server (prod. box) Apache 2.2.11 Tomcat 6.0.18 MySQL 5.1.30 MySQL Connector 5.1.7 Driver for MySQL: org.gjt.mm.mysql.Driver Looking at the source for the connector, you might as well use the com.mysql.jdbc.Driver since the org.gjt.mm.mysql.Driver just extends the com.mysql.jdbc.Driver. I remember reading somewhere that org.gjt.mm.mysql.Driver is for backward compatibility for older apps. It will be phased out eventually. You're recommended to use com.mysql.jdbc.Driver for new application development. Driver for Navision: sun.jdbc.odbc.JdbcOdbcDriver There is no native JDBC driver for Navision, so I have to use the ODBC version. I am having a problem with the time it takes to display a screen, when there is database activity going on. It can take anywhere from 30 seconds to 90 seconds for the screen to appear. This is not the time it takes Tomcat to start up for the first time, it is long after that point. I think I may have found the problem, but I do not know how to fix it. All of our systems (including the production server) have Symantec virus software running. When I turn the virus checking off, the application runs very well, when I turn the virus checking on, I experience the slow screen display. From what you describe, this problem doesn't seem to be Tomcat related since I use Win03 w/ Symantec Anti-Virus along with 3rd party firewall software. Also, the Win03 is configured as a Domain Controller. I don't have this slow response you're reporting. Your performance issue may lie with: 1) Fragmentation of your partition, especially the partition where the DB resides2) Size of your database 3) Configuration of MySQL 4) Query is optimized (?) 5) Sufficient hardware to handle the DB size (?) forgot 1 more :) 6) SAV configuration Regards, Tommy I googled for conflicts of Tomcat with virus scanning software, and only found reference to the fact that it can cause performance problems. But, I could not find a solution, other than turning off the virus scanning. Does anyone know of a solution to this problem? I have been told that turning off the virus scanning on the production box is not an option. I have also been told that Linux is not an option. I have gone through the Symantec software, and can not find a way to exclude Tomcat, etc. from its process. Where do I go from here? Thanks, Jon Oman
Re: Hosting Recommendations.
Are your plans on your website http://www.globalwebitsolution.com/ ? On Tue, Mar 31, 2009 at 5:04 PM, Partha Goswami parthagoswam...@gmail.comwrote: Hi What You Need , Shared Hosting, VPS , Dedicated Server ?? We provide Hosting Very Cheap. Let me know what you need.. Thanks On Tue, Mar 31, 2009 at 2:41 PM, Wesley Acheson wesley.ache...@gmail.com wrote: Thanks for all the links everyone I'll look at them all. Regards, Wesley Acheson On Tue, Mar 31, 2009 at 2:21 AM, Ben Stringer b...@burbong.com wrote: Hi Wesley, I've used Rimuhosting for a few years now. Their customer service is good, and they have Java devs on staff, so they know what they are doing. I've had one issue in that time (I rebooted my host and it didn't come back up) and they had the issue fixed within a few hours. I would recommend them. Cheers, Ben Hi is there any hosting recommendations. I've found online that rimuhost seemed to be recommended. Does anyone use that and what you think of it? Regards, Wesley Acheson - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards Partha Goswami President Global Web IT Solution www.globalwebitsolution.com
Re: Hosting Recommendations.
well, we are updating website, The design has been changed, so, it need sometime, to plan few hrs more. I will email u, when, When It update, thanks for your waiting.. On Tue, Mar 31, 2009 at 10:59 PM, Wesley Acheson wesley.ache...@gmail.comwrote: Are your plans on your website http://www.globalwebitsolution.com/ ? On Tue, Mar 31, 2009 at 5:04 PM, Partha Goswami parthagoswam...@gmail.comwrote: Hi What You Need , Shared Hosting, VPS , Dedicated Server ?? We provide Hosting Very Cheap. Let me know what you need.. Thanks On Tue, Mar 31, 2009 at 2:41 PM, Wesley Acheson wesley.ache...@gmail.com wrote: Thanks for all the links everyone I'll look at them all. Regards, Wesley Acheson On Tue, Mar 31, 2009 at 2:21 AM, Ben Stringer b...@burbong.com wrote: Hi Wesley, I've used Rimuhosting for a few years now. Their customer service is good, and they have Java devs on staff, so they know what they are doing. I've had one issue in that time (I rebooted my host and it didn't come back up) and they had the issue fixed within a few hours. I would recommend them. Cheers, Ben Hi is there any hosting recommendations. I've found online that rimuhost seemed to be recommended. Does anyone use that and what you think of it? Regards, Wesley Acheson - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- Regards Partha Goswami President Global Web IT Solution www.globalwebitsolution.com -- Regards Partha Goswami President Global Web IT Solution www.globalwebitsolution.com
RE: redirection
You need some front-end proxy. Apache web-server could do it. Squid could (AFAIK). Nginx could do it also. -Original Message- From: Melanie Pfefer [mailto:melanie_pfe...@yahoo.co.uk] Sent: Tuesday, March 31, 2009 8:59 PM To: users@tomcat.apache.org Subject: redirection Hello I have a tomcat server running on port 8080. users need to create a dns alias which is on port 80. redirection cannot be done on DNS level of course. do you have any idea how to achieve this in tomcat. For example: http://siroe redirects to http://machineX:8080 that is a tomcat application? thank you - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat error: It is not available the ServletAction
Hi, I am deploying an application using Ant from MyEclipse IDE. When I deploy the application with the Ant, this say me that the application has successfully deployed. I go to webaapps directory and I see into that directory the applicacation deployed with its WAR. But when I try to excute the application, Tomcat gives me the following error: Message: It is not available the Servlet Action Description: The request resource (It doesn`t available the ServletAction) is not available. I f I go to Apache Tomcat`s stdout log I can see two warnings: WARN: No appends could be found for logger (org.apache.commons.beanutils.Convertutils) WARN: Please initialize the log4j system properly But, If I go to the Java Build path of the application I can verify how I have added the commons.beanutils.jar and log4j.jar. I don`t know why it doesn´t run and I am stuck. I would be very grateful somebody could help me tom solve this problem. Regards -- View this message in context: http://www.nabble.com/Tomcat-error%3A-It-is-not-available-the-ServletAction-tp22805251p22805251.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: redirection
From: Melanie Pfefer [mailto:melanie_pfe...@yahoo.co.uk] Subject: redirection I have a tomcat server running on port 8080. Why don't you just configure Tomcat to use port 80? That can either replace the existing Connector for 8080 or be an additional Connector. Look in the conf/server.xml file. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
RE: Slow servlet response under WinXP Pro
1)Put indexes on predicates where q= make sure column q has a unique index created to reference that column 2)I would'nt disable virus-scans..yes they slow down access but you want the peace of mind that comes with your system being 'virus-free' Back to you.. Martin __ Verzicht und Vertraulichkeitanmerkung / Disclaimer and confidentiality note Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided. To: users@tomcat.apache.org Subject: Re: Slow servlet response under WinXP Pro From: jo...@catholic-doc.org Date: Tue, 31 Mar 2009 12:31:26 -0500 Tommy, Thanks for the response! I'll change the code to use the newer driver name. I started with a demo app that I wrote about six years ago. That is the reason for the older driver name. 1) Fragmentation of your partition, especially the partition where the DB resides. I'll check into this, but I don't think it is a problem. 2) Size of your database The Navision database is 2GB in size, of which 62% is used. But, I am only accessing a small part of it. Not much I can do about the size of this thing. The MySQL database is nearly empty, since this is the first project using it. 3) Configuration of MySQL So far, I've just used the default installation configuration. Can you suggest any changes that you may have made? 4) Query is optimized (?) My queries are simple: select x,y,z from table1 where q='foo' I'm not using any complicated joins. It is just not required. 5) Sufficient hardware to handle the DB size (?) The production server (Win2003 server) is an IBM server with eight processors, and 4GB of memory. We have about 1.5TB of unused space on it. I would think that is sufficient? 6) SAV configuration This may be key. Can you recommend any option changes based on your experience? One thing I was hoping for was to exclude certain directories/processes from being scanned by Symantec 11.0, but I can not find a way to do this. Does a way exist? Thanks again, Jon Oman From: Tommy Pham tommy...@yahoo.com To: Tomcat Users List users@tomcat.apache.org Sent: Monday, March 30, 2009 12:23:54 PM Subject: Re: Slow servlet response under WinXP Pro Hi Jon, - Original Message From: jo...@catholic-doc.org To: users@tomcat.apache.org Sent: Monday, March 30, 2009 11:45:37 AM Subject: Slow servlet response under WinXP Pro Hello! I am working on a servlet application. It is a data entry application that reads data from a Navision database, and writes data to MySQL. Here is the setup: WinXP Pro with Service Pack 3 (dev. box) / Windows 2003 Server (prod. box) Apache 2.2.11 Tomcat 6.0.18 MySQL 5.1.30 MySQL Connector 5.1.7 Driver for MySQL: org.gjt.mm.mysql.Driver Looking at the source for the connector, you might as well use the com.mysql.jdbc.Driver since the org.gjt.mm.mysql.Driver just extends the com.mysql.jdbc.Driver. I remember reading somewhere that org.gjt.mm.mysql.Driver is for backward compatibility for older apps. It will be phased out eventually. You're recommended to use com.mysql.jdbc.Driver for new application development. Driver for Navision: sun.jdbc.odbc.JdbcOdbcDriver There is no native JDBC driver for Navision, so I have to use the ODBC version. I am having a problem with the time it takes to display a screen, when there is database activity going on. It can take anywhere from 30 seconds to 90 seconds for the screen to appear. This is not the time it takes Tomcat to start up for the first time, it is long after that point. I think I may have found the problem, but I do not know how to fix it. All of our systems (including the production server) have Symantec virus software running. When I turn the virus checking off, the application runs very well, when I turn the virus checking on, I experience the slow screen display. From what you describe, this problem doesn't seem to be Tomcat related since I use Win03 w/ Symantec
[Fwd: Re: Search on lucene.apache.org]
I would imagine that some people on this list has already seen this, but just in case they haven't, this is a crosspost/forward from the lucene list. As a regular user of the Tomcat list and website, I would love something like that applied to at least the Tomcat on-line documentation. Original Message Subject: Re: Search on lucene.apache.org Date: Tue, 31 Mar 2009 06:54:45 -0400 From: Michael McCandless luc...@mikemccandless.com Reply-To: gene...@lucene.apache.org To: gene...@lucene.apache.org References: 510143ac0903310242u6e980501hf187a7d711d43...@mail.gmail.com +1 This is a great idea: we should certainly eat our own dog food. I think it'd be great to have the search powered by Lucid (Lucid being willing of course...). I would also love to expand this to other Apache sites, but Lucid doesn't (yet?) search other Apache sites. There is some important risks involved... we'd (Lucid'd) need to do a good / responsive job fixing issues, keeping server up, data fresh, etc. If not, then the average new possible user might go through this process: I heard of Lucene; should we use it? Oh, Lucene powers Apache's site, so let's go play with that search. Oh, it has some weird problems, and it's sluggish, and this other search site does a better job, and XYZ, etc... Maybe Lucene isn't right for us. Meaning, if we do this, we really need to do it right. If Lucid powers it, Lucid needs to fix issues quickly; or perhaps Lucid could make available (open source) the underlying configuration / code that powers their Solr instance, so that the community can jump in and produce patches to fix things. EG there are some things about Lucid's search I'd love to fix -- I've interacted with them on these already, but if instead I could open a Jira issue, put a patch on, iterate, have it committed and in 30 minutes it's pushed to a dev instance which we all can test, and every so often production cuts over to that dev instance, then that'd be fabulous. Mike On Tue, Mar 31, 2009 at 5:42 AM, Jukka Zitting jukka.zitt...@gmail.com wrote: Hi, As discussed at the ApacheCon, we're the search experts at Apache but still most of our web sites at lucene.apache.org use a Google search box. And the Google search isn't even that powerful, as it doesn't cover our mailing lists, wikis, issue trackers, etc. Let's fix that using our own search technology! Lucid Imagination already implemented a search at http://www.lucidimagination.com/search/, though that implementation also contains stuff from their web site. Perhaps we could ask them to set up a version that only returns stuff from apache.org. Would people be worried about the Lucid branding on search result pages? I don't think that's too much of a problem as the current search results are already Google-branded. Anyway, if someone feels this is a problem (and has the time and energy to fix it), we could also ask for an infra zone where a similar ASF-hosted search service could be set up. Or perhaps Lucid would be willing to give us an ASF-branded version of the search with just a search results brought to you by Lucid Imagination note attached? PS. I can think of a number of Apache projects who'd love a similar setup. BR, Jukka Zitting - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Renegotiate SSL connection in servlet
Caldarale, Charles R wrote: From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Renegotiate SSL connection in servlet Your only other option for Tomcat is to configure another Connector which would require a different IP or port number, which makes it ... inconvenient at best. Using a different port may not work at all with many versions of IE, which know that all HTTPS traffic is on 443 and ignore the port on the URL. Standards? What standards? We don't need no stinkin' standards! What happens if you define multiple security constraints? ie 1. Requires SSL for whole app 2. Requires CLIENT-CERT auth for part of the app. Mark - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Cookie handling issue
mateo-jl wrote: Hello, I've seen that there was a problem with the encoding base64 within the cookies (only at reading : request.getCookies) When the cookie contains '=' (equals), it seems that the decoding operation stops when it encounters this char. The prob. only happens since Tomcat 5.5.26 ans above. Is there any correction ? Some fixes in 5.5.27 - complete fix hopefully in 5.5.28. Alternatively: - use v1 cookies - use 6.0.19 (assuming it gets released as stable) Take a look a this url: http://mail-archives.apache.org/mod_mbox/tomcat-dev/200802.mbox/%3c47bb0aac.3080...@hanik.com%3e Second question: how can i search in the archives tomcat list with a filter ? http://tomcat.markmail.org/ Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat error: It is not available the ServletAction
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bladu, On 3/31/2009 1:45 PM, bladu wrote: But when I try to execute the application, Tomcat gives me the following error: Message: It is not available the Servlet Action Description: The request resource (It doesn`t available the ServletAction) is not available. I suspect this is not the exact error message. Can you copy-and-paste the full error, including any stack trace that may appear in the browser window /or/ in your catalina.log file (or is that the stdout log that you mentioned)? The log files are likely to hold the key to this problem. If log4j appears to be broken, try running Tomcat with the standard logger just to test to see what's wrong. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAknSjQ8ACgkQ9CaO5/Lv0PCnLQCgpasQDZVKMBR2WyP9jXWbdxZu lkYAnRNMX1xr74RF7Xj0O7zwe8NHy0gm =SGgA -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Illegal access: this web application instance has been stopped already
I am using NetBeans 6.5 with its embeded Tomcat server to write a JavaServer Faces application. I am getting this error: INFO: Illegal access: this web application instance has been stopped already. Could not load java.lang.Object. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. java.lang.IllegalStateException From my research I read setting reloadable to False would solve it (in context.xml) - didn't work Stack Trace: = java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at com.sun.faces.application.ConverterPropertyEditorFactory$DisposableClassLoader.loadClass(ConverterPropertyEditorFactory.java:447) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.newInstance0(Class.java:326) at java.lang.Class.newInstance(Class.java:308) at java.beans.PropertyEditorManager.findEditor(PropertyEditorManager.java:79) at com.sun.faces.application.ApplicationImpl.addPropertyEditorIfNecessary(ApplicationImpl.java:690) at com.sun.faces.application.ApplicationImpl.addConverter(ApplicationImpl.java:660) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:727) at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:489) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:511) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1231) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1471) at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:824) at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:350) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:196) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at
DataSource from Context files - doesn't work
Hi I placed the following in context.xml in META-INF. But the result set is null, what's wrong with my set up?Can anybody please advise? ?xml version=1.0 encoding=UTF-8? Context Resource auth=Container description=DB Connection name=jdbc/vhousehold type=javax.sql.DataSource password=vhousehold driverClassName=com.mysql.jdbc.Driver maxIdle=2 maxWait=5000 validationQuery=select * from family_member; username=vhousehold url=jdbc:mysql://localhost:3306/vhousehold maxActive=4/ /Context Thanks, Ramy.
Connection Pooling questions
Hello, I searched on the mailing list back to 2007 and didn't see the answers I needed for these DataSource related questions (though I did see similar, not quite what I needed though). I'm using Tomcat 5.5, Java 1.5 on Windows XP and have used the excellent guide: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html for configuring the default data source within Tomcat I configure it using the suggested /META-INF/context.xml with: maxActive=30 maxIdle=10 I assumed that maxActive would limit the total amount of DB connections that could ever be open at one time (in this case 30). Yet from what I see it seems like I am limited to maxActive + maxIdle connections open (in this case 40). Is that true? Also, the default behavior seems to be that the connections never close within the pool when they are not being used. I had my Tomcat server sit there for about an hour idle with no client requests incoming and when I ran netstat -a I still saw 39 connections open, they only closed when I killed Tomcat. Do I have to turn on some kind of cleanup explicitly? I do close the connections within my program using conn.close(); as the howto suggests. I thought that when the connections were not used that they would over time be really closed and I would end up with the maxIdle value of 10 open connections within my Pool. thanks! mail2web.com Enhanced email for the mobile individual based on Microsoft® Exchange - http://link.mail2web.com/Personal/EnhancedEmail - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Connection Pooling questions
the configuration you describe only defines parameters to be passed to the Connection Pool Library..which connection pool library are you using? are you using Thread starve algorithm? or explicit no-activity-on-connection algorithm? Most connection pools with close the connection only after statement handles are quiesced (explicit close) or starved for activity ? Martin __ Disclaimer and confidentiality note This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided. From: allen.ir...@smartintegration.com.au To: users@tomcat.apache.org Date: Tue, 31 Mar 2009 21:42:52 -0400 Subject: Connection Pooling questions Hello, I searched on the mailing list back to 2007 and didn't see the answers I needed for these DataSource related questions (though I did see similar, not quite what I needed though). I'm using Tomcat 5.5, Java 1.5 on Windows XP and have used the excellent guide: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html for configuring the default data source within Tomcat I configure it using the suggested /META-INF/context.xml with: maxActive=30 maxIdle=10 I assumed that maxActive would limit the total amount of DB connections that could ever be open at one time (in this case 30). Yet from what I see it seems like I am limited to maxActive + maxIdle connections open (in this case 40). Is that true? Also, the default behavior seems to be that the connections never close within the pool when they are not being used. I had my Tomcat server sit there for about an hour idle with no client requests incoming and when I ran netstat -a I still saw 39 connections open, they only closed when I killed Tomcat. Do I have to turn on some kind of cleanup explicitly? I do close the connections within my program using conn.close(); as the howto suggests. I thought that when the connections were not used that they would over time be really closed and I would end up with the maxIdle value of 10 open connections within my Pool. thanks! mail2web.com – Enhanced email for the mobile individual based on Microsoft® Exchange - http://link.mail2web.com/Personal/EnhancedEmail - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Internet Explorer 8 – Get your Hotmail Accelerated. Download free! http://clk.atdmt.com/MRT/go/141323790/direct/01/
RE: Illegal access: this web application instance has been stoppedalready
From: Paulchwd [mailto:paulc...@sympatico.ca] Subject: Illegal access: this web application instance has been stoppedalready INFO: Illegal access: this web application instance has been stopped already. Could not load java.lang.Object. Whatever you're doing is attempting multiple stops of your webapp. This might be a configuration problem in NetBeans, but since I've never tried to run Tomcat from within an IDE, I can't help you there. Can you try running a standalone Tomcat and see if the problem is reproducible with that? From my research I read setting reloadable to False would solve it (in context.xml) - didn't work You don't say which context.xml you changed; while you're telling us that, also tell us the Tomcat version you're using, the JRE/JDK you're running with, and the platform you're on. Mar 31, 2009 7:54:48 PM org.apache.catalina.core.StandardContext start INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/invoicer] has already been started This is another indication that you're doing something twice within NetBeans; again, try running a standalone Tomcat and see if the problem disappears. If it does, it's a NetBeans, not Tomcat, issue. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Connection Pooling questions
From: allen.ir...@smartintegration.com.au [mailto:allen.ir...@smartintegration.com.au] Subject: Connection Pooling questions I configure it using the suggested /META-INF/context.xml with: maxActive=30 maxIdle=10 Post your entire context.xml so we can see the rest of the Resource element. Your settings may conflict with what the database expects, resulting in orphaned connections. I assumed that maxActive would limit the total amount of DB connections that could ever be open at one time (in this case 30). That limits the number the pool is managing. If the pool considers some of them to be abandoned or in error, the number the DB knows about may be higher. Yet from what I see it seems like I am limited to maxActive + maxIdle connections open (in this case 40). Is that true? Don't think so. Also, the default behavior seems to be that the connections never close within the pool when they are not being used. That is the whole point of having a pool. I do close the connections within my program using conn.close(); The evidence suggests otherwise. You also need to close result sets and statements associated with the connection, and all of the close() calls should be in a finally block to insure they always get executed. I thought that when the connections were not used that they would over time be really closed and I would end up with the maxIdle value of 10 open connections within my Pool. That usually depends entirely on how your DB is configured; if it has a high timeout value (most do), the connections will persist for a long time. You can configure a timeout value for the pool to evict idle connections, but that's disabled by default. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Connection Pooling questions
Thanks for your reply Martin. Your response kind of lost me though. I used the howto guide at http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html which mentions the default Data Source (dbcp I believe). But mentioned nothing about the algorithms you said. Original Message: - From: Martin Gainty mgai...@hotmail.com Date: Tue, 31 Mar 2009 22:33:36 -0400 To: users@tomcat.apache.org Subject: RE: Connection Pooling questions the configuration you describe only defines parameters to be passed to the Connection Pool Library..which connection pool library are you using? are you using Thread starve algorithm? or explicit no-activity-on-connection algorithm? Most connection pools with close the connection only after statement handles are quiesced (explicit close) or starved for activity ? Martin __ Disclaimer and confidentiality note This message is confidential and may be privileged. If you are not the intended recipient, we kindly ask you to please inform the sender. Any unauthorised dissemination or copying hereof is prohibited. This message serves for information purposes only and shall not have any legally binding effect. Given that e-mails can easily be subject to manipulation, we can not accept any liability for the content provided. From: allen.ir...@smartintegration.com.au To: users@tomcat.apache.org Date: Tue, 31 Mar 2009 21:42:52 -0400 Subject: Connection Pooling questions Hello, I searched on the mailing list back to 2007 and didn't see the answers I needed for these DataSource related questions (though I did see similar, not quite what I needed though). I'm using Tomcat 5.5, Java 1.5 on Windows XP and have used the excellent guide: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html for configuring the default data source within Tomcat I configure it using the suggested /META-INF/context.xml with: maxActive=30 maxIdle=10 I assumed that maxActive would limit the total amount of DB connections that could ever be open at one time (in this case 30). Yet from what I see it seems like I am limited to maxActive + maxIdle connections open (in this case 40). Is that true? Also, the default behavior seems to be that the connections never close within the pool when they are not being used. I had my Tomcat server sit there for about an hour idle with no client requests incoming and when I ran netstat -a I still saw 39 connections open, they only closed when I killed Tomcat. Do I have to turn on some kind of cleanup explicitly? I do close the connections within my program using conn.close(); as the howto suggests. I thought that when the connections were not used that they would over time be really closed and I would end up with the maxIdle value of 10 open connections within my Pool. thanks! mail2web.com Enhanced email for the mobile individual based on Microsoft® Exchange - http://link.mail2web.com/Personal/EnhancedEmail - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org _ Internet Explorer 8 Get your Hotmail Accelerated. Download free! http://clk.atdmt.com/MRT/go/141323790/direct/01/ mail2web.com - Microsoft® Exchange solutions from a leading provider - http://link.mail2web.com/Business/Exchange - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Connection Pooling questions
Thank you very much for your reply. my response to your responses follow: Post your entire context.xml so we can see the rest of the Resource element. Your settings may conflict with what the database expects, resulting in orphaned connections. Here it is: Context Resource name=jdbc/AttunitySProcDS auth=Container type=javax.sql.DataSource driverClassName=com.attunity.jdbc.NvDriver url=jdbc:attconnect://10.20.5.107:/baynav;DefTdpName=webdemo maxActive=50 maxIdle=10/ /Context Also, the default behavior seems to be that the connections never close within the pool when they are not being used. That is the whole point of having a pool. so you're saying that the pool will never close any of the connections due to them not being used? The evidence suggests otherwise. You also need to close result sets and statements associated with the connection, and all of the close() calls should be in a finally block to insure they always get executed. Here's the block I use: finally { // cleanup if (cs != null) cs.close(); if (conn != null) conn.close(); } Where cs = the statement. I don't close the result set as closing the statement is supposed to do that. That usually depends entirely on how your DB is configured; if it has a high timeout value (most do), the connections will persist for a long time. You can configure a timeout value for the pool to evict idle connections, but that's disabled by default. Maybe this timeout value is what I'm looking for? Original Message: - From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 31 Mar 2009 21:57:01 -0500 To: users@tomcat.apache.org Subject: RE: Connection Pooling questions From: allen.ir...@smartintegration.com.au [mailto:allen.ir...@smartintegration.com.au] Subject: Connection Pooling questions I configure it using the suggested /META-INF/context.xml with: maxActive=30 maxIdle=10 Post your entire context.xml so we can see the rest of the Resource element. Your settings may conflict with what the database expects, resulting in orphaned connections. I assumed that maxActive would limit the total amount of DB connections that could ever be open at one time (in this case 30). That limits the number the pool is managing. If the pool considers some of them to be abandoned or in error, the number the DB knows about may be higher. Yet from what I see it seems like I am limited to maxActive + maxIdle connections open (in this case 40). Is that true? Don't think so. Also, the default behavior seems to be that the connections never close within the pool when they are not being used. That is the whole point of having a pool. I do close the connections within my program using conn.close(); The evidence suggests otherwise. You also need to close result sets and statements associated with the connection, and all of the close() calls should be in a finally block to insure they always get executed. I thought that when the connections were not used that they would over time be really closed and I would end up with the maxIdle value of 10 open connections within my Pool. That usually depends entirely on how your DB is configured; if it has a high timeout value (most do), the connections will persist for a long time. You can configure a timeout value for the pool to evict idle connections, but that's disabled by default. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org mail2web.com What can On Demand Business Solutions do for you? http://link.mail2web.com/Business/SharePoint - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Connection Pooling questions
From: allen.ir...@smartintegration.com.au [mailto:allen.ir...@smartintegration.com.au] Subject: RE: Connection Pooling questions Resource name=jdbc/AttunitySProcDS auth=Container type=javax.sql.DataSource driverClassName=com.attunity.jdbc.NvDriver url=jdbc:attconnect://10.20.5.107:/baynav;DefTdpName=webdemo maxActive=50 maxIdle=10/ You said maxActive was 30, but it's 50 in your config. I've never used the Attunity drivers, but the above looks ok as far as I can tell; perhaps someone else might see a problem. You might want to consider adding these: removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true That will tell you if the pool thinks you're returning connections or not. Change the timeout setting (in seconds) to whatever you think is appropriate. so you're saying that the pool will never close any of the connections due to them not being used? Correct; that's normally left up to the database. Here's the block I use: finally { // cleanup if (cs != null) cs.close(); if (conn != null) conn.close(); } Where cs = the statement. If the cs.close() throws an exception, you won't close the connection. Do you only ever have one statement per connection? And depending on the location of the finally block relative to the rest of the code, you might not even go through there. I don't close the result set as closing the statement is supposed to do that. Regardless, it's good practice to clean up DB resources explicitly, preferably as soon as you're done with them. Maybe this timeout value is what I'm looking for? Depends on what you want; for a production environment, you never want the connections to close. They're cheap to keep around but expensive to create. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Connection Pooling questions
Sorry, I included an older context.xml than the one I've been testing with. That one has 30 for maxActive (everything else is the same). Thank you very much for your replies Chuck, I think you gave me plenty to think about and play with to resolve my problem. Thanks again! Original Message: - From: Caldarale, Charles R chuck.caldar...@unisys.com Date: Tue, 31 Mar 2009 22:44:32 -0500 To: users@tomcat.apache.org Subject: RE: Connection Pooling questions From: allen.ir...@smartintegration.com.au [mailto:allen.ir...@smartintegration.com.au] Subject: RE: Connection Pooling questions Resource name=jdbc/AttunitySProcDS auth=Container type=javax.sql.DataSource driverClassName=com.attunity.jdbc.NvDriver url=jdbc:attconnect://10.20.5.107:/baynav;DefTdpName=webdemo maxActive=50 maxIdle=10/ You said maxActive was 30, but it's 50 in your config. I've never used the Attunity drivers, but the above looks ok as far as I can tell; perhaps someone else might see a problem. You might want to consider adding these: removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true That will tell you if the pool thinks you're returning connections or not. Change the timeout setting (in seconds) to whatever you think is appropriate. so you're saying that the pool will never close any of the connections due to them not being used? Correct; that's normally left up to the database. Here's the block I use: finally { // cleanup if (cs != null) cs.close(); if (conn != null) conn.close(); } Where cs = the statement. If the cs.close() throws an exception, you won't close the connection. Do you only ever have one statement per connection? And depending on the location of the finally block relative to the rest of the code, you might not even go through there. I don't close the result set as closing the statement is supposed to do that. Regardless, it's good practice to clean up DB resources explicitly, preferably as soon as you're done with them. Maybe this timeout value is what I'm looking for? Depends on what you want; for a production environment, you never want the connections to close. They're cheap to keep around but expensive to create. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org mail2web.com What can On Demand Business Solutions do for you? http://link.mail2web.com/Business/SharePoint - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org