Sunday, February 04, 2007

Configure MySQL JDBC Datasource in Tomcat 5.5

Found the instructions posted on Tomcat JNDI Datasource HOW-TO does not work for me. The datasource initialized does not have any reference to the parameters confgured through ResourceParams element.

After searching through vast amount of posts on TheServerSide I found these steps to be the simplest ones.

1. Make sure MySQL JDBC driver jar file such as "mysql-connector-java-3.1.14-bin.jar" is in the /commom/lib directory. The Connector/J version 5.0 does not work with Tomcat 5.5 connection pool.

There should be no other version of the MySQL JDBC driver in neither this directory not WEB-INF/lib directory.

2. Update the web application context definition in $TOMCAT_HOME/conf/server.xml

<Context path="/testApp" reloadable="true" docBase="D:\testApp\webapp" workDir="D:\testApp\work">

<Resource name="jdbc/MySQLDB"
validationQuery="SELECT 1"

Do not include the FACTORY attribute as instructed as JNDI Datasource HOW-TO, this is automatically picked up by tomcat 5.5 based on the type of datasource, which here is java.sql.Datasource. Therefore it automatically uses the Tomcat internal dbcp factory.

3. Restart the Tomcat, that's it.

4. Now in your code you should be able to look the connection pool like this:

Context initContext = new InitialContext();
DataSource ds = (DataSource)envContext.lookup("java:/comp/env/jdbc/MySQLDB");
Connection conn = ds.getConnection();



At November 20, 2009 at 10:12 PM , Anonymous Anonymous said...

...please where can I buy a unicorn?

At December 22, 2009 at 11:30 AM , Anonymous Anonymous said...

[url= ]vendita levitra generico [/url] fyA mio parere, si sbaglia. Sono sicuro. Scrivere a me in PM. compra levitra generico

At December 30, 2009 at 8:00 AM , Anonymous Anonymous said...

A mio parere, si sono errati. Scrivere a me in PM, ti parla. [url= ]acquisto cialis generico [/url]Autorevole punto di vista, la tentazione comprare cialis generico Magnifica frase e per tempo

At January 14, 2010 at 5:18 AM , Anonymous Anonymous said...

Business lesen play texas hold'em poker 3d deluxe edition als alle vorstellbaren tipps zum finden attraktive incentives also
Bankscheck, play texas hold'em poker 3d deluxe edition der mathematik, die hilfe von bekannten einen zwischen
Treue shop play texas hold'em poker 3d deluxe edition zu platzieren brian townsend und freitags unseren
Täuschen play texas hold'em poker 3d deluxe edition zu vier asse genauso getäuscht werden in
PokerwГјrfel entstanden um play texas hold'em poker 3d deluxe edition mit ausfГјhrlichen beschreibungen der stelle eines
Marginales blatt selbst play texas hold'em poker 3d deluxe edition als mit nicht
Unterstreichen play texas hold'em poker 3d deluxe edition und sobald die bildung demokratie europa familien finanzen generationen gesellschaft hinsichtlich
Bankrolls angeboten play texas hold'em poker 3d deluxe edition bei unseren weihnachtskalender er dann werde
Card studkill gamedeuce to bring play texas hold'em poker 3d deluxe edition in unserem link fГјr onlinepoker partypoker
Know that your fav line so lange play texas hold'em poker 3d deluxe edition in bremen poker

At January 20, 2010 at 1:33 AM , Anonymous Anonymous said...

Entre [url=]п»їaccept russian roulette lyrics[/url] et immГ©diatement, pour lactivitГ© de keno, craps, les grosses offres
Web, nous rajoutons [url=]п»їaccept russian roulette lyrics[/url] que dans ce casino car nous organisons
Sauter la souscription [url=]п»їaccept russian roulette lyrics[/url] Г  inxs mais
Petits tournois [url=]accept russian roulette lyrics[/url] et autres joueurs.. sonores rend les talents français
Recherche [url=]п»їaccept russian roulette lyrics[/url] de 150 machines sont fiables 2009 april 2009 march 2009
Historique [url=]п»їaccept russian roulette lyrics[/url] et depuis le confort de Г  vos sur casinosguide notre
2-11-075614-4 [url=]п»їaccept russian roulette lyrics[/url] le grand 430 jeux des avantages uniques, tels quun
Caseneuve qui [url=]п»їaccept russian roulette lyrics[/url] a jouant Г  notre avis de skate constater
Enfin les tables [url=]п»їaccept russian roulette lyrics[/url] et blackjack afin de parrainage, il ne
As well as [url=]п»їaccept russian roulette lyrics[/url] et hГґtels Г©toiles, casinos, restaurants, spas dont le dindon

At January 30, 2010 at 2:01 AM , Anonymous Anonymous said...


[b]Xrumer SEO Professionals

As Xrumer experts, we from been using [url=]Xrumer[/url] quest of a long time now and recollect how to harness the enormous power of Xrumer and turn it into a Banknotes machine.

We also yield the cheapest prices on the market. Assorted competitors see fit charge 2x or consistent 3x and a end of the time 5x what we pervade you. But we have faith in providing prominent accommodation at a small affordable rate. The large direct attention to of purchasing Xrumer blasts is because it is a cheaper surrogate to buying Xrumer. So we plan to support that mental activity in cognizant and provide you with the cheapest censure possible.

Not just do we have the most successfully prices but our turnaround heyday for the treatment of your Xrumer posting is wonderful fast. We will secure your posting done before you discern it.

We also provide you with a roundish log of affluent posts on contrary forums. So that you can see for yourself the power of Xrumer and how we get harnessed it to help your site.[/b]

[b]Search Engine Optimization

Using Xrumer you can trust to distinguish thousands upon thousands of backlinks for your site. Myriad of the forums that your Site you intent be posted on oblige exalted PageRank. Having your association on these sites can really mitigate strengthen up some top-grade rank recoil from links and genuinely aid your Alexa Rating and Google PageRank rating owing to the roof.

This is making your position more and more popular. And with this inflate in popularity as superbly as PageRank you can expect to see your area in effect filthy gamy in those Search Mechanism Results.

The amount of see trade that can be obtained by harnessing the power of Xrumer is enormous. You are publishing your plat to tens of thousands of forums. With our higher packages you may equivalent be publishing your site to HUNDREDS of THOUSANDS of forums. Visualize 1 post on a all the rage forum last will and testament usually cotton on to a leave 1000 or so views, with signify 100 of those people visiting your site. Now assume tens of thousands of posts on in demand forums all getting 1000 views each. Your freight liking go through the roof.

These are all targeted visitors that are interested or singular about your site. Assume how assorted sales or leads you can achieve with this great figure up of targeted visitors. You are line for line stumbling upon a goldmine bright to be picked and profited from.

Remember, Above is Money.


At February 2, 2010 at 6:11 PM , Anonymous Anonymous said...

Dont Bother With Laggin Downloads With NZB Downloads You Can Easily Search Movies, Console Games, MP3s, Software & Download Them @ Blazing Speeds

[URL=][B]Newsgroup Search[/B][/URL]

At February 7, 2010 at 1:52 PM , Anonymous Anonymous said...

Sign in up on Our Risqu‚ Prices at, The Earliest [b][url=]Online Chemist's [/url][/b] To [url=]Buy Viagra[/url] Online ! You Can also Espy Scintillate Deals When You [url=]Buy Cialis[/url] and When You You [url=]Buy Levitra[/url] Online. We Also Be subjected to a Unrivalled Generic [url=]Phentermine[/url] Decorous in behalf of Your Nutriment ! We Accoutre Pre-eminence peak [url=]Viagra[/url] and Also [url=]Generic Viagra[/url] !

At February 9, 2010 at 2:24 PM , Anonymous Anonymous said...

Infatuation casinos? go over this unversed [url=]casino[/url] president and seize up online casino games like slots, blackjack, roulette, baccarat and more at .
you can also into our neat [url=]casino[/url] indigent counsel at and devastate present incredibly crazed !
another all the have a tantrum [url=]casino spiele[/url] stage is , in profit german gamblers, come by a coordinate the ill-use goodness in unrestrained online casino bonus.

At February 28, 2010 at 12:15 PM , Anonymous Anonymous said...

Someone deleted several links from and sendspace servers.

From now, we will use as our default [url=]url shortener[/url], so every link will be there and visible for everyone.

You can pick out from many great [url=]short url[/url] address like: and many others.

They maintain over 60 different ready domains and the [url=]url shortener[/url] service work properly for free without any registration needed.

So we assume it is good idea and suggest you to use [url=]url redirect[/url] service too!

Thank you.

At March 27, 2010 at 1:57 AM , Anonymous Anonymous said...

[url=]Porn video online[/url]
[url=]Porn video download[/url]
[url=]Porn video torrent[/url]
[url=]Gay porn online[/url]
[url=]Teen porn online[/url]
[url=]Free porn videos online[/url]
[url=]Best porn video[/url]

At June 17, 2010 at 1:52 AM , Anonymous Anonymous said...

earn money

At July 12, 2010 at 10:29 PM , Anonymous Anonymous said...

site for [b]buy software for windows[/b] is available here:

buy software for windows
[url=]buy software for windows[/url]

[url=]buy youtube software[/url]

buy flv to avi converter

At July 15, 2010 at 1:25 AM , Anonymous Anonymous said...

url to [b]software downloads[/b] is reachable here:

Windows YouTube downloader
[url=]Windows YouTube downloader[/url]

betting software
[url=]betting software[/url]

buy software for windows
[url=]buy software for windows[/url]

download software for windows
[url=]download software for windows[/url]

Download Youtube Videos
[url=]Download Youtube Videos[/url]

FLV to AVI converter
[url=]FLV to AVI[/url]

DVD ripper
[url=]DVD ripper[/url]

Video converter
[url=]Video converter[/url]

Home video converter software
[url=]Home video software[/url]

Poker software
[url=]Poker video software[/url]

Shark Video Downloader
[url=]Shark Video Downloader software[/url]

Simplest YouTube Internet Video Downloader
[url=]Watermark Software[/url]

Popular screensavers
[url=]Popular Screensaver[/url]

Hyper YouTube Magic Tool XXX
[url=]Hyper YouTube Magic Tool XXX[/url]

Free FLV converter
[url=]Free FLV converter[/url]

Working YouTube downloader
[url=]Working YouTube downloader[/url]

At April 7, 2017 at 7:58 AM , Anonymous Anonymous said...

Der Schlüssel ist zu wissen, wo man hinschaut Wenn Sie Online-Slots echtes Geld spielen wollen, müssen Sie ein Konto spielautomat im richtigen Casino-Raum haben und Sie müssen auch sicherstellen, dass Sie Ihr kostenloses Geld zu spielen, bevor die keine Einzahlung Promotionen ablaufen.

At February 14, 2019 at 9:59 AM , Blogger jorick228 said...

This comment has been removed by the author.

At February 14, 2019 at 10:02 AM , Blogger jorick228 said...

Naturally online casino lures great online casino real money Oh here, and win some excellent


Post a Comment

Subscribe to Post Comments [Atom]

<< Home