Jeff, look I'm not sure, but it shouldnt do that.
Just make absolutely sure that the app is closing those connections, ie giving them back to the pool.... only reason I can think you get this behaviour.

If you dont close them properly... eventually Tomcat will break... it wont have another connection to hand out.

If you look at the documentation there is an eg at the bottom that shows u how to make sure you do it right.

----- Original Message ----- From: "Jeffrey C. Baldwin" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, June 14, 2007 6:53 PM
Subject: Re: Data Sources Overwritten


I appreciate all the input guys.  I put everything into server.xml and
the application is working great.

One small problem though... if I undeploy the app, then deploy it
again... I get the same database problem, UNTIL I restart the TomCat
service itself.  Once I restart Tomcat, all is well..

So, my question is, I was trying to set it up so that my developers
could just deploy/undeploy/stop/start their apps all through the web,
w/out needing shell access to the server.  Is there a way for them to
restart the Tomcat service through a web interface?

Is it normal that they should have to restart the entire Tomcat service
for their app to be able to talk to the configured database connections
in server.xml?

Thanks!

Johnny Kewl wrote:
Jeff, I dont use JNDI for dbs, got my own, but its sounds like you just
not configuring some xml somewhere...
On your system have a look at this link...
http://localhost:8080/tomcat-docs/jndi-datasource-examples-howto.html

As I said, no expert, but you can see that in the server.xml, thats
where the pool is actually
setup. So those setting will say create 20 dB connections. This is done
so that your app reacts quickly.

Then in Web.xml, just looks like a mapping of the pool objects to a
database object...

and then finally your application will get the context, which really
just grabs a connection from the pool, and returns it as a
javax.sql.DataSource to your application.

Anyway have a look at that and if you think you have it all, post the
equiv snippets of your config, and I'm sure the guru's will spot the
problem.
If I had to guess, I think your problem is in server.xml, because when
you do it yourself, thats where it should have happened.
ie when the server starts up, it will make the pool.... and thats
probably why it kills the pool every time its started.

good luck...



----- Original Message ----- From: "Jeffrey C. Baldwin"
<[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Thursday, June 14, 2007 4:46 PM
Subject: Data Sources Overwritten


(Tomcat 5.0.28 running on CentOS 4.4 using Java 1.4.2_14-b05)

Hello All,

I have a problem with my understanding of data sources within Tomcat.

I have an application (MRS).  I deploy MRS using the Tomcat Manager.  I
then open up Tomcat Administration and I see MRS under:

Tomcat Server - Service (Catalina) - Host (localhost) - Context (mrs)

I then open up Resources -> Data Sources, and I 2 data source entries
have been crated (mssql & db2), however their configuration information
(url, driver class, etc..) is complete empty.  And, of course, the
application doesn't work because the JDBC calls are broken.

I go in, using the Administration tool again, configure the data
sources, providing URL, driver class, etc.. commit the changes and
everything works great.

THIS IS WHERE THE PROBLEM comes in, it all works great until we deploy
the application again.  Then the application, when deployed, just
overwrites all the data source information and I'm forced to enter it
all again for the app to work.

I,  using the Administration tool, tried putting the data source entries
in for the entire Tomcat Server (Tomcat Server - Resources - Data
Sources) versus putting them in for the specific application.  However,
the app. still dosen't work.

My question is, how do I make these data source entires 'stay put', so
that when the app is redeployed it can still make the JDBC calls?
Obviously I don't want to have to keep putting these in every time the
app is deployed.

All help is appreciated.

-jeff


---------------------------------------------------------------------
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]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to