atom feed51 messages in org.apache.tomcat.usersRE: DBCP Woes! Ahaa!
FromSent OnAttachments
Peng AnnieOct 28, 2002 3:57 am 
Shapira, YoavOct 28, 2002 6:02 am 
Robert L SowdersOct 28, 2002 12:58 pm 
Shapira, YoavOct 28, 2002 1:07 pm 
Ricky LeungOct 28, 2002 3:22 pm 
Craig R. McClanahanOct 28, 2002 3:48 pm 
Craig R. McClanahanOct 28, 2002 4:15 pm 
nealOct 28, 2002 4:24 pm 
nealOct 28, 2002 4:55 pm 
Mike JacksonOct 28, 2002 4:55 pm 
nealOct 28, 2002 4:58 pm 
Robert L SowdersOct 28, 2002 5:42 pm 
Robert L SowdersOct 28, 2002 5:50 pm 
Bill BarkerOct 28, 2002 11:13 pm 
Peng AnnieOct 29, 2002 12:27 am 
David TildesleyOct 29, 2002 12:39 am 
Robert L SowdersOct 29, 2002 12:57 am 
Robert L SowdersOct 29, 2002 1:04 am 
Peng AnnieOct 29, 2002 1:08 am 
Robert L SowdersOct 29, 2002 2:01 am 
Mike JacksonOct 29, 2002 3:24 pm 
nealOct 29, 2002 3:39 pm 
Mike JacksonOct 29, 2002 3:43 pm 
Mike JacksonOct 29, 2002 4:02 pm 
micaelOct 29, 2002 4:05 pm 
nealOct 29, 2002 4:21 pm 
nealOct 29, 2002 4:31 pm 
nealOct 29, 2002 4:52 pm 
Iain SandersonOct 29, 2002 4:57 pm 
micaelOct 29, 2002 5:08 pm 
nealOct 29, 2002 5:15 pm 
Brandon CruzOct 29, 2002 5:17 pm 
nealOct 29, 2002 5:35 pm 
V. CekvenichOct 29, 2002 5:37 pm 
nealOct 29, 2002 5:43 pm 
nealOct 29, 2002 6:20 pm 
nealOct 29, 2002 6:47 pm 
Jacob KjomeOct 29, 2002 9:00 pm 
Craig R. McClanahanOct 29, 2002 10:15 pm 
nealOct 30, 2002 1:34 am 
Reynir HübnerOct 30, 2002 2:17 am 
Luc SanteramoOct 30, 2002 2:21 am 
nealOct 30, 2002 2:21 am 
nealOct 30, 2002 3:14 am 
omar...@telebahiacelular.com.brOct 30, 2002 3:50 am 
Tim FunkOct 30, 2002 3:54 am 
nealOct 30, 2002 4:40 am 
Mike JacksonOct 30, 2002 8:55 am 
Mike JacksonOct 30, 2002 8:58 am 
Craig R. McClanahanOct 30, 2002 9:50 am 
nealOct 30, 2002 1:10 pm 
Subject:RE: DBCP Woes! Ahaa!
From:Mike Jackson (mjac@cdi-hq.com)
Date:Oct 30, 2002 8:58:12 am
List:org.apache.tomcat.users

If it's the common setup then it's probably 10 connections. If it's by webapp then it ought to be 50 connections.

-----Original Message----- From: neal [mailto:neal@yahoo.com] Sent: Wednesday, October 30, 2002 2:22 AM To: Tomcat Users List Subject: RE: DBCP Woes! Ahaa!

One last question on the topic:

If I configure the conn pooling resources indepdently for 5 different Hosts, when I set the maxActive parameter, will this be the maxActive connections *per* Host, or total? If I set the maxActive to 10 for 5 websites,have am I effectively allocating 50 connections?

Thanks Neal

-----Original Message----- From: Craig R. McClanahan [mailto:crai@apache.org] Sent: Tuesday, October 29, 2002 10:16 PM To: Tomcat Users List Subject: RE: DBCP Woes! Ahaa!

On Tue, 29 Oct 2002, neal wrote:

Date: Tue, 29 Oct 2002 18:48:20 -0800 From: neal <neal@yahoo.com> Reply-To: Tomcat Users List <tomc@jakarta.apache.org> To: Tomcat Users List <tomc@jakarta.apache.org> Subject: RE: DBCP Woes! Ahaa!

AHAAA!

I figured it out ... well ... sort of.

My primary content is www.hotel.us. But, I also configured hotel.us, hotel.us.com, etc to all point to www.hotel.us. It turns out that the times I was getting the JDBC not bound to Context error, were the times I was going to the alternat domains, not www.hotel.us!

Ok, so that is the issue! Pheew! BUT, here's another question. Must I configure DBCP in every single one of those other hosts? I was hoping I could jsut switch crossContext=true on the Context containing the correct setup.

The crossContext attribute has nothing at all to do with JNDI resources -- it only determines whether the ServletContext.getContext() method will unconditionally return null or not. See the documentation (hyperlink listed below) for more details.

JNDI resources for each <Context> must be configured individually. If you are using Tomcat 4.1, there is a mechanism to share the physical resources themselves (such as a JDBC data source) by defining the resources in the <GlobalNamingResources> section at the top of server.xml, and then using a <ResourceLink> element nested inside each <Context> element that links to it (analogous to a symbolic link in a filesystem).

Perhaps for this to work the contexts must all be nested within the same host? But to have different urls resolve the only way I know to do it, is via a seperate host node, per domain:

<Host name="hotel.us" appBase="webapps/hotel"> <Context path="" docBase="" debug="5"/> </Host>

Any thoughts?

Are all (or most) of the domain names supposed to resolve to the exact same set of webapps? If so, you're probably best off using the "defaulthost" capability of the <Engine> element:

<Engine name="Standalone" defaulthost="hotel.us"> <Host name="hotel.us" appBase="webapps/hotel"> ... </Host> <Host name="other.com" appBase="..."> ... </Host> </Engine>

In this scenario, any request received by this Tomcat instance, for any unrecognized host name will be forwarded to the hotel.us domain. You can explicitly list the separate hosts that should not be shared, as illustrated with the "other.com" entry above.

For more info about all of the server.xml options, see the docs included in the standard Tomcat distribution at:

http://localhost:8080/tomcat-docs/config/

or online:

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/ http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/

Thanks everyone for your help!!!!

Neal

Craig

<mailto:tomc@jakarta.apache.org> For additional commands, e-mail: <mailto:tomc@jakarta.apache.org>