You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Dr. Evil" <dr...@sidereal.kz> on 2001/10/16 22:37:53 UTC

Which connection pool class to use?

Hi, I am using Tomcat 4 and Postgres 7.1.3 for a custom taglibs
project.  Postgres has some JDBC 2.0 support but it doesn't seem to
have connection pool support.  There seem to be a ton of connection
pool classes out there.  Does anyone have a recomendation?  Something
easy to use for a java newbie?

Thanks

Re: Which connection pool class to use?

Posted by Cory Omand <co...@Sun.com>.
I have used the JavaExchange DbConnectionBroker class extensively, and find that it is very easy to use - especially for servlets.  Check it out:

http://javaexchange.com/

C.

"Dr. Evil" wrote:
> 
> Hi, I am using Tomcat 4 and Postgres 7.1.3 for a custom taglibs
> project.  Postgres has some JDBC 2.0 support but it doesn't seem to
> have connection pool support.  There seem to be a ton of connection
> pool classes out there.  Does anyone have a recomendation?  Something
> easy to use for a java newbie?
> 
> Thanks

-- 
===============================================================
 Cory C. Omand - Test Engineer     Direct: 510.574.6096
 Sun Microsystems                     Fax: 510.774.6194
 World Wide Operations              Pager: 510.774.PAGE (7423)
 Newark, CA  USA                           [PIN - 5107742570]
===============================================================

Re: Which connection pool class to use?

Posted by Kamil Kukura <Ka...@sphere-systems.com>.
I adapted one that is described in this book:
http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/

In chapter 8 you can find described and implemented connection pooling and
it's quite easy to understand. I use it in my bean which sits in application
scope and in fact owns one instance of JDCConnectionPool.

--
Kamil


----- Original Message -----
From: "Dr. Evil" <dr...@sidereal.kz>
To: <to...@jakarta.apache.org>
Sent: Tuesday, October 16, 2001 10:37 PM
Subject: Which connection pool class to use?


>
> Hi, I am using Tomcat 4 and Postgres 7.1.3 for a custom taglibs
> project.  Postgres has some JDBC 2.0 support but it doesn't seem to
> have connection pool support.  There seem to be a ton of connection
> pool classes out there.  Does anyone have a recomendation?  Something
> easy to use for a java newbie?
>
> Thanks
>


virtual directory set-up

Posted by Leo Bynum <le...@gisresults.com>.
Re-sending......

Haven't heard anything yet on this. (below)

Any suggestions anyone?

Thanks,

   - Leo

-----Original Message-----
From: Leo Bynum [mailto:leo.bynum@gisresults.com]
Sent: Tuesday, October 16, 2001 3:36 PM
To: tomcat-user@jakarta.apache.org
Subject: virtual directory set-up





Virtual directories anyone?


I am using Tomcat 4.0 as both a servlet container and a Web server. I am not
running any other web server.

Question: How do I add a virtual directory.

I presume that the default path is
"D:\jakarta\jakarta-tomcat-4.0-rc1\webapps" (on my machine)

I would also like to have "D:\Program
Files\ESRI\ArcIMS3.1\Manager\frame.htm" exposed as:

        http://localhost/Manager/frame.htm  (Not to be confused with the
manager directory under tomcat)


If I were using apache 1.3.19 my directions for installing a virtual
directory are to add the following to the "D:\Program Files\Apache
Group\Apache\conf\httpd.conf" file.

	Alias /WEBSITE "C:/ArcIMS/WebSite"
	Alias /website "C:/ArcIMS/WebSite"
	Alias /WebSite "C:/ArcIMS/WebSite"
	Alias /Website "C:/ArcIMS/WebSite"
	Alias /MANAGER "C:/Program Files/ESRI/ArcIMS3.1/Manager"
	Alias /manager "C:/Program Files/ESRI/ArcIMS3.1/Manager"
	Alias /Manager "C:/Program Files/ESRI/ArcIMS3.1/Manager"
	Alias /Output "C:/ArcIMS/Output"
	Alias /output "C:/ArcIMS/Output"
	Alias /OUTPUT "C:/ArcIMS/Output"

	#Apache 1.3.14 users must add these additional lines. Be sure to update
	#the Website pathname for your site.

	 <Directory "C:/ArcIMS/Website">
	        Options Indexes MultiViews
	        AllowOverride None
	        Order allow,deny
	        Allow from all
	 </Directory>

But again, I'm not using Apache, or IIS. I am using Tomcat 4.0 as both web
server and Servlet container.

It appears that maybe I need to add something like "<Context path=......./>"
into the conf\server.xml file but the format and attributes that I need
aren't clear for any documentation I can find.


Thanks in advance......

   - Leo



virtual directory set-up

Posted by Leo Bynum <le...@gisresults.com>.


Virtual directories anyone?


I am using Tomcat 4.0 as both a servlet container and a Web server. I am not
running any other web server.

Question: How do I add a virtual directory.

I presume that the default path is
"D:\jakarta\jakarta-tomcat-4.0-rc1\webapps" (on my machine)

I would also like to have "D:\Program
Files\ESRI\ArcIMS3.1\Manager\frame.htm" exposed as:

        http://localhost/Manager/frame.htm  (Not to be confused with the
manager directory under tomcat)


If I were using apache 1.3.19 my directions for installing a virtual
directory are to add the following to the "D:\Program Files\Apache
Group\Apache\conf\httpd.conf" file.

	Alias /WEBSITE "C:/ArcIMS/WebSite"
	Alias /website "C:/ArcIMS/WebSite"
	Alias /WebSite "C:/ArcIMS/WebSite"
	Alias /Website "C:/ArcIMS/WebSite"
	Alias /MANAGER "C:/Program Files/ESRI/ArcIMS3.1/Manager"
	Alias /manager "C:/Program Files/ESRI/ArcIMS3.1/Manager"
	Alias /Manager "C:/Program Files/ESRI/ArcIMS3.1/Manager"
	Alias /Output "C:/ArcIMS/Output"
	Alias /output "C:/ArcIMS/Output"
	Alias /OUTPUT "C:/ArcIMS/Output"

	#Apache 1.3.14 users must add these additional lines. Be sure to update
	#the Website pathname for your site.

	 <Directory "C:/ArcIMS/Website">
	        Options Indexes MultiViews
	        AllowOverride None
	        Order allow,deny
	        Allow from all
	 </Directory>

But again, I'm not using Apache, or IIS. I am using Tomcat 4.0 as both web
server and Servlet container.

It appears that maybe I need to add something like "<Context path=......./>"
into the conf\server.xml file but the format and attributes that I need
aren't clear for any documentation I can find.


Thanks in advance......

   - Leo



Re: ROOT Index

Posted by Harden ZHU <ha...@sympatico.ca>.
That assume ROOT web app for root app. But I have another webapp. 
And I want that webapp's index.jsp as first page.

Thanks

----- Original Message ----- 
From: "asheesh" <as...@q2aindia.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, October 16, 2001 10:29 PM
Subject: Re: ROOT Index


> Dear Harden
> 
> Chk. for  <welcome-file>  index.htm  </welcome-file> in ur web.xml file.
> 
> I hope this will help.
> 
> regards
> asheesh
> 
> ----- Original Message ----- 
> From: Harden ZHU <ha...@sympatico.ca>
> To: <to...@jakarta.apache.org>
> Sent: Wednesday, October 17, 2001 9:59 AM
> Subject: ROOT Index
> 
> 
> > How to reset root index.html to some other file or directory? Thanks
> > 
> > Harden
> > 
> > 
> 
> 


Re: ROOT Index

Posted by asheesh <as...@q2aindia.com>.
Dear Harden

Chk. for  <welcome-file>  index.htm  </welcome-file> in ur web.xml file.

I hope this will help.

regards
asheesh

----- Original Message ----- 
From: Harden ZHU <ha...@sympatico.ca>
To: <to...@jakarta.apache.org>
Sent: Wednesday, October 17, 2001 9:59 AM
Subject: ROOT Index


> How to reset root index.html to some other file or directory? Thanks
> 
> Harden
> 
> 


ROOT Index

Posted by Harden ZHU <ha...@sympatico.ca>.
How to reset root index.html to some other file or directory? Thanks

Harden


RE: SocketException

Posted by Tomer Bar-Shlomo <to...@012.net.il>.
Shalom Scott Weaver ,

Yes, or he does not close the connection normaly.

Best regards,

Tomer Bar-Shlomo
Web Developer
ICQ UIN 966073
E-Mail Tomar@012.net.il


-----Original Message-----
From: Scott Weaver [mailto:sweaver@wirelesstelematics.com] 
Sent: Tuesday, October 16, 2001 11:39 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: SocketException 

Thanks.
 This person is actually running an application that sends me data and
not
using a browser.
Does this mean he's closing the connection before it finishes?

Scott

-----Original Message-----
From: Tomer Bar-Shlomo [mailto:tomar@012.net.il]
Sent: Tuesday, October 16, 2001 5:28 PM
To: tomcat-user@jakarta.apache.org; sweaver@wirelesstelematics.com
Subject: RE: SocketException


Shalom Scott Weaver ,

Connection reset by peer is caused by a user that closes his browser
window yet the servlet is trying to connect him. Do not worry about it
just happens. If you need an event try
window.open('http:/www.url.com','_blank') on unload using javascript it
will create a popup window.

Best regards,

Tomer Bar-Shlomo
Web Developer
ICQ UIN 966073
E-Mail Tomar@012.net.il


-----Original Message-----
From: Scott Weaver [mailto:sweaver@wirelesstelematics.com]
Sent: Tuesday, October 16, 2001 11:02 PM
To: tomcat-user@jakarta.apache.org
Subject: SocketException

I've been running Tomcat for quite awhile successfully but now I'm
seeing
this for the first time.
What causes this and how can I fix it? I read what it means in the Java
Docs
and it seems that the problem isn't with Tomcat but with the person
POSTing
me the data (is that right?)

Thanks for the help.
Scott



2001-10-16 04:22:38 - ContextManager: SocketException reading request,
ignored - java.net.SocketException: Connection reset by peer: JVM_recv
in
socket input stream read
	at java.net.SocketInputStream.socketRead(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:86)
	at
java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
	at
java.io.BufferedInputStream.read(BufferedInputStream.java:204)
	at
org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdap
ter.
java:115)
	at
org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServlet
Inpu
tStream.java:106)
	at
org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletIn
putS
tream.java:128)
	at
javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138)
	at
org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpRe
ques
tAdapter.java:129)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpC
onnectionHandler.java:195)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
	at java.lang.Thread.run(Thread.java:484)



RE: SocketException

Posted by Scott Weaver <sw...@wirelesstelematics.com>.
Thanks.
 This person is actually running an application that sends me data and not
using a browser.
Does this mean he's closing the connection before it finishes?

Scott

-----Original Message-----
From: Tomer Bar-Shlomo [mailto:tomar@012.net.il]
Sent: Tuesday, October 16, 2001 5:28 PM
To: tomcat-user@jakarta.apache.org; sweaver@wirelesstelematics.com
Subject: RE: SocketException


Shalom Scott Weaver ,

Connection reset by peer is caused by a user that closes his browser
window yet the servlet is trying to connect him. Do not worry about it
just happens. If you need an event try
window.open('http:/www.url.com','_blank') on unload using javascript it
will create a popup window.

Best regards,

Tomer Bar-Shlomo
Web Developer
ICQ UIN 966073
E-Mail Tomar@012.net.il


-----Original Message-----
From: Scott Weaver [mailto:sweaver@wirelesstelematics.com]
Sent: Tuesday, October 16, 2001 11:02 PM
To: tomcat-user@jakarta.apache.org
Subject: SocketException

I've been running Tomcat for quite awhile successfully but now I'm
seeing
this for the first time.
What causes this and how can I fix it? I read what it means in the Java
Docs
and it seems that the problem isn't with Tomcat but with the person
POSTing
me the data (is that right?)

Thanks for the help.
Scott



2001-10-16 04:22:38 - ContextManager: SocketException reading request,
ignored - java.net.SocketException: Connection reset by peer: JVM_recv
in
socket input stream read
	at java.net.SocketInputStream.socketRead(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:86)
	at
java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
	at
java.io.BufferedInputStream.read(BufferedInputStream.java:204)
	at
org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdap
ter.
java:115)
	at
org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServlet
Inpu
tStream.java:106)
	at
org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletIn
putS
tream.java:128)
	at
javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138)
	at
org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpRe
ques
tAdapter.java:129)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpC
onnectionHandler.java:195)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
	at java.lang.Thread.run(Thread.java:484)


RE: SocketException

Posted by Tomer Bar-Shlomo <to...@012.net.il>.
Shalom Scott Weaver ,

Connection reset by peer is caused by a user that closes his browser
window yet the servlet is trying to connect him. Do not worry about it
just happens. If you need an event try
window.open('http:/www.url.com','_blank') on unload using javascript it
will create a popup window.

Best regards,

Tomer Bar-Shlomo
Web Developer
ICQ UIN 966073
E-Mail Tomar@012.net.il


-----Original Message-----
From: Scott Weaver [mailto:sweaver@wirelesstelematics.com] 
Sent: Tuesday, October 16, 2001 11:02 PM
To: tomcat-user@jakarta.apache.org
Subject: SocketException 

I've been running Tomcat for quite awhile successfully but now I'm
seeing
this for the first time.
What causes this and how can I fix it? I read what it means in the Java
Docs
and it seems that the problem isn't with Tomcat but with the person
POSTing
me the data (is that right?)

Thanks for the help.
Scott



2001-10-16 04:22:38 - ContextManager: SocketException reading request,
ignored - java.net.SocketException: Connection reset by peer: JVM_recv
in
socket input stream read
	at java.net.SocketInputStream.socketRead(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:86)
	at
java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
	at
java.io.BufferedInputStream.read(BufferedInputStream.java:204)
	at
org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdap
ter.
java:115)
	at
org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServlet
Inpu
tStream.java:106)
	at
org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletIn
putS
tream.java:128)
	at
javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138)
	at
org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpRe
ques
tAdapter.java:129)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(H
ttpC
onnectionHandler.java:195)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416
)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:49
8)
	at java.lang.Thread.run(Thread.java:484)


SocketException

Posted by Scott Weaver <sw...@wirelesstelematics.com>.
I've been running Tomcat for quite awhile successfully but now I'm seeing
this for the first time.
What causes this and how can I fix it? I read what it means in the Java Docs
and it seems that the problem isn't with Tomcat but with the person POSTing
me the data (is that right?)

Thanks for the help.
Scott



2001-10-16 04:22:38 - ContextManager: SocketException reading request,
ignored - java.net.SocketException: Connection reset by peer: JVM_recv in
socket input stream read
	at java.net.SocketInputStream.socketRead(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:86)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:204)
	at
org.apache.tomcat.service.http.HttpRequestAdapter.doRead(HttpRequestAdapter.
java:115)
	at
org.apache.tomcat.core.BufferedServletInputStream.doRead(BufferedServletInpu
tStream.java:106)
	at
org.apache.tomcat.core.BufferedServletInputStream.read(BufferedServletInputS
tream.java:128)
	at javax.servlet.ServletInputStream.readLine(ServletInputStream.java:138)
	at
org.apache.tomcat.service.http.HttpRequestAdapter.readNextRequest(HttpReques
tAdapter.java:129)
	at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:195)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
	at java.lang.Thread.run(Thread.java:484)