Re: Apache2 adn/or Tomcat6?
On Fri, Feb 22, 2008 at 11:55 PM, elvberg [EMAIL PROTECTED] wrote: you can run something like jsvc and set the user to 'tomcat' which allows you to bind Howto? By following the directions in the Tomcat documentation? -- Hassan Schroeder [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]
Re: Apache2 adn/or Tomcat6?
Hassan Schroeder ha scritto: On Fri, Feb 22, 2008 at 7:18 AM, Antonio Petrelli [EMAIL PROTECTED] wrote: Or put Apache 2 in front of your Tomcat, as it is usually done in production environment. I don't know if you have statistics to substantiate that opinion, but it doesn't answer the question, eh? :-) There are definitely people on this list, including me, running Tomcat standalone in production. I launched few performance tests for a tomcat webapp. If you use NIO connector to exploit the CometProcessor the apache frontend has to dispatch through http_proxy module, because AJP connector doesn't offer comet feature. Anyway put apache as HTTP frontend downgrade the performance a lot. If you run tomcat with a single instance then set up tomcat straight to port 80 as you can see in this post: http://www.jroller.com/giancarlo/entry/a_brief_account_of_optimization --- http://gfrison.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NIO Java or TC - What are u using it 4?
On Fri, Feb 22, 2008 at 10:58 PM, Bill Barker wba..com wrote: Well, you need it for Comet Is there a way you can deploy Comet applications to tomcat 5.5 or do you have to upgrade to 6.0 ? -Steve More - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: NIO Java or TC - What are u using it 4?
Stephen More wrote: On Fri, Feb 22, 2008 at 10:58 PM, Bill Barker wba..com wrote: Well, you need it for Comet Is there a way you can deploy Comet applications to tomcat 5.5 or do you have to upgrade to 6.0 ? upgrade to 6, probably a step in the right direction anyway Filip -Steve More - 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]
Re: NIO Java or TC - What are u using it 4?
Johnny Kewl wrote: - Original Message - From: Filip Hanik - Dev Lists [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Friday, February 22, 2008 5:59 PM Subject: Re: NIO Java or TC - What are u using it 4? you're subject has an or in it, what are you actually asking? What kind of projects make one want to move away from normal HttpServlets and start using the NIO stuff that TC has... I understand that it gives one all sorts of async control over the servlet... but I just cant think of examples of when one would use it. Occasionally I see a question or two here, and I'm wondering what practical things designers are using these power sockets for. There are lots of articles like this one http://www.ibm.com/developerworks/library/j-nioserver/ ok, well most likely the servlet spec will one of these days introduce non blocking IO as well, but it will be while, it's a very complex programming model, and in most cases one doesn't need it. if you want async servlets (ie, decouple threads from the connection) then as Bill mentioned, Comet will do an excellent job. switching to something like the link above, you're now dealing with software outside the spec, which in some cases is not a problem, but in other cases can have consequences for a growing project, or a project that needs to be integrated elsewhere. They espouse the power side... but no concrete examples of applications... Its not like people are all diving at it... so I'm wondering if there are times when its the only way to go... Also in TC there is another APR handler, how does that relate to NIO, when will one want to use any of these over the normal, and when APR and when NIO? Just trying to understand it... practical examples sounds like a good way to start... Thanks... To give you an example of the different connectors and how they differ, in a one-to-one scenario, NIO will always be slower, since it has to do simulated blocking to accomodate the current servlet spec. When it comes to SSL, no java connector compares to the APR/OpenSSL, JSSE is simply not optimized enough (yet). Java Blocking Connector Java Nio Blocking Connector APR Connector Classname Http11Protocol Http11NioProtocol Http11AprProtocol Tomcat Version 3.x 4.x 5.x 6.x 6.x 5.5.x 6.x Support Polling NO YES YES Polling Size N/A Unlimited - Restricted by mem Unlimited Read HTTP Request Blocking Non Blocking Blocking Read HTTP BodyBlocking Sim Blocking Blocking Write HTTP Response Blocking Sim Blocking Blocking SSL Support Java SSL Java SSL OpenSSL SSL Handshake Blocking Non blocking Blocking Max Connections maxThreads See polling size See pollsize Filip Filip Johnny Kewl wrote: Cant contain my curiousity anymore? What practical applications is this been used for? I see theres a lot of control over the socket etc... but what are you guys actually doing with it? Trying to get rule of thumb for when one would move to it? --- HARBOR: http://coolharbor.100free.com/index.htm The most powerful application server on earth. The only real POJO Application Server. Making the Java dream come true. --- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.9/1293 - Release Date: 2/22/2008 9:21 AM - 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]
Help getting MySQL connected to Tomcat
Hello, I'm trying to get Tomcat and MySQL to connect. I have the following installations: Tomcat V5.5.26 MySQL V5.0 mysql connector 5.1.5 from the mysql site (copied the jar to tomcat\common\lib I've tried following the directions from the tomcat dist and from the mysql dist but I always get can't connect exceptions when I start tomcat. In mysql I've created a user=javauser with password=javadude and I created a database called javatest with one table and some data in the table. I can connect to the database from the console using C: mysql -u javauser -p and I can then connect to the javatest DB and select * from the table works fine. Then I added the following to in the tomcat/conf/context.xml file Context path=/db-servlet docBase=db-servlet debug=5 reloadable=true crossContext=true Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=javauser password=javadude driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/javatest/ /Context And I stop tomcat, and when I restart tomcat I get the following in the catalina log: ... INFO: Stopping Coyote HTTP/1.1 on http-8080 Feb 23, 2008 8:31:19 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Failed shutdown of Apache Portable Runtime Feb 23, 2008 8:37:40 AM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.init(Socket.java:367) at java.net.Socket.init(Socket.java:180) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) 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:585) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) So why the connection refused? Any help is appreciated. Thanks, Kevin
RE: Help getting MySQL connected to Tomcat
Try: url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true ~LZM~ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Saturday, February 23, 2008 4:01 PM To: users@tomcat.apache.org Subject: Help getting MySQL connected to Tomcat Hello, I'm trying to get Tomcat and MySQL to connect. I have the following installations: Tomcat V5.5.26 MySQL V5.0 mysql connector 5.1.5 from the mysql site (copied the jar to tomcat\common\lib I've tried following the directions from the tomcat dist and from the mysql dist but I always get can't connect exceptions when I start tomcat. In mysql I've created a user=javauser with password=javadude and I created a database called javatest with one table and some data in the table. I can connect to the database from the console using C: mysql -u javauser -p and I can then connect to the javatest DB and select * from the table works fine. Then I added the following to in the tomcat/conf/context.xml file Context path=/db-servlet docBase=db-servlet debug=5 reloadable=true crossContext=true Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource maxActive=100 maxIdle=30 maxWait=1 username=javauser password=javadude driverClassName=com.mysql.jdbc.Driver url=jdbc:mysql://localhost:3306/javatest/ /Context And I stop tomcat, and when I restart tomcat I get the following in the catalina log: ... INFO: Stopping Coyote HTTP/1.1 on http-8080 Feb 23, 2008 8:31:19 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: Failed shutdown of Apache Portable Runtime Feb 23, 2008 8:37:40 AM org.apache.catalina.startup.Catalina stopServer SEVERE: Catalina.stop: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:520) at java.net.Socket.connect(Socket.java:470) at java.net.Socket.init(Socket.java:367) at java.net.Socket.init(Socket.java:180) at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:395) 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:585) at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) So why the connection refused? Any help is appreciated. Thanks, Kevin No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.20.9/1294 - Release Date: 2/22/2008 6:39 PM - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]